[Croquet-user] Croquet 2d/3d UI question

Andreas Raab andreas.raab at gmx.de
Sun Aug 3 10:23:16 UTC 2003


Hi Josh,

The reason it's done the way it is right now is a mixture between efficiency
and the capabilities of the GPU. Some of the operations we can do in 2D
(such as corner rounding, flash rendering, bordered text) are very expensive
as they don't map very naturally to the GPU's capabilities and would
therefore most likely require textures anyway. In addition, for
significantly complex structures, the overhead of traversal can be
significant.

Probably the best thing you can do right now is to make up your own kind of
morph which implements glRenderOn: and add it as a top-level guy to the
TeapotMorph. Here, you could implement whatever drawing (2D, 3D, or a mix)
you deem appropriate.

Cheers,
  - Andreas


> -----Original Message-----
> From: croquet-user-admin at mail.opencroquet.org 
> [mailto:croquet-user-admin at mail.opencroquet.org] On Behalf Of 
> Joshua 'Schwa' Gargus
> Sent: Saturday, August 02, 2003 9:31 PM
> To: Squeak Mailing List
> Subject: [Croquet-user] Croquet 2d/3d UI question
> 
> 
> Hi,
> 
> I want to create a UI element that contains both 2D and 3D widgets.  I
> would like it to look like a TWindowMorph containing some sliders and
> menus, as well as a display of a 3D scene.  I want to display this
> widget inside a Croquet world (ie: pretty much like a space browser,
> except with 3D widgets as well as 2D).
> 
> I'm confused about how to approach this.  TWindowMorphs look plausible
> for straight 2D, but don't seem right for a mixture of 2D/3D widgets,
> since (as I understand it) the 3D widget would be rendered on the GPU,
> read back into CPU memory (slow), composited with the other 2D/3D
> widgets, and upload the changed texture to the GPU as usual.
> 
> Here's a question that might help me understand things: is the backing
> morph approach used because it is faster than drawing each individual
> element with the GPU, or just because it was easier than making sure
> everything draws identically in OpenGL, or some other reason? 
>  It seems
> like rendering directly to a texture would work well for 
> 2D/3D widgets.
> 
> Did this make any sense?
> Joshua
> _______________________________________________
> Croquet-user mailing list
> Croquet-user at mail.opencroquet.org
> http://mail.opencroquet.org/mailman/listinfo/croquet-user
> 



More information about the Squeak-dev mailing list