Quick Question

How do I draw 2D shapes to Xith3D canvas?
In Opengl, I would make use of ortho2D mode to say implement a frame counter based on display lists, mode that is accessible through

 gl.glOrtho(0.0f,640,480,0.0f,-1.0f,1.0f);     

Come to think about it, there is ortho and orthoMesa functions in Transform3D.
Brb

Hi,

If you don’t want to mix 2D and true 3D rendering, you can use setting of projection policy in View - it will do everything for you.

If you want to mix… …well, you have to calculate it (transform) yourself for now. I thought about a kind of multipass rendering for this, but this is more design question than implementation task…

Yuri

Hey Yuri how ya been man?
I’m thinking about making a little game and it will be all 2D.
Having said that, I would appreciate any sample code that will get me started :slight_smile:
Thanks

Hi, Dude!

Check Xith3DProjectionPolicyTest - it will give you an idea on how to switch between Parallel-Projection (needed for 2D game) and Perspective (for 3D) - just hit space when you see the box and plane :slight_smile:

Yuri

Hey, how are you…

I tryed to make a 2D game and put the Xith3d GUI with the parallel projection, and it doesnt paitn the GUI… i will apreciate some help.