<br><br><div class="gmail_quote">On Feb 2, 2008 2:03 AM, Igor Stasenko &lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br>Why keeping 2D and 3D apart? What i like in Opengl, that it can handle<br>both 2D/3D drawing primitives, so there is no need in using another<br>library to make your content 3D aware.</blockquote><div><br><br>Because 2-D widgets are composed of lines and pixels placed on a 2-D canvas. A button is a 2-D rectangle with a border and some black text.<br>
<br>3-D widgets on the other hand might be rendered... well... in 3-D. For example, you could make a button that is a very nice curved 3-D object that casts a slight shadow on the area of the window just below it, with actual 3-D embossed text, and has just enough subtle specular reflection added to it that you could swear you could see your own face in it. This is the sort of CPU-wasting stuff that would make Steve Jobs want to lick his screen.<br>
<br>2-D widgets and 3-D widgets in this example would need different implementations.<br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><div class="Ih2E3d"><br>&gt;<br>&gt; - Introduce a &quot;needsRedraw&quot; system of some sort. A Canvas implementation may<br>&gt; or may not cache its contents (as a bitmap or vectored graphics/display<br>&gt; list). Various implementations may discard the cached contents at times, or<br>
&gt; perhaps not even cache content.<br>&gt;<br></div>Yes, cached content can be sent multiple times to device, but if we<br>talking about generic architecture, then you can&#39;t have any sorts of<br>redraws, because you can&#39;t redraw just printed page on a printer, you<br>
only can draw new one :)<br>And i&#39;m strongly for keeping this straight: once drawing command is<br>sent, there is no way back. You should not manipulate device state in<br>such manner, because many devices simply can&#39;t return back to previous<br>
state, or it will take too much resources and time, so &nbsp;this will be a<br>performance killer.<br></blockquote><div><br><br>I don&#39;t think I explained this one very well. I was referring to the Canvas either setting a flag in itself saying &quot;I&#39;m dirty and need to be redrawn&quot; which would be polled by the application, or sending an event to the application saying &quot;please redraw yourself on me!&quot;. This would happen for example when a canvas is uncovered (e.g. a window move/resize) and the content was not cached.<br>
<br>Of course, printers and fully cached implementations would never need to do this.<br><br></div>Gulik.</div><br clear="all"><br>-- <br><a href="http://people.squeakfoundation.org/person/mikevdg">http://people.squeakfoundation.org/person/mikevdg</a><br>
<a href="http://gulik.pbwiki.com/">http://gulik.pbwiki.com/</a>