Move a 2D texture in 3D

BlitzMax Forums/BlitzMax Programming/Move a 2D texture in 3D

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

If it's possible to change the projection matrix between drawing commands, this would be possible. As far as I know you can change the projection matrix as you like (at least under GL), so this should work:

<Set Ortho-Projection>
<Draw 2D-Stuff>
<Set 3D-Perspective-Projection>
<Draw 3D>
<Flip>

Have a look at the NeHe-Tutorials (in the BMax-Tutorials-Forum) for the 3D-Matrix and other stuff, should be easy to create a testapp.

You can manually set a 2D-Matrix by:

glMatrixMode GL_PROJECTION
glLoadIdentity
glOrtho 0,screenwidth%,screenheight%,0,-1,1

Don't know about the DirectX side, but should be possible, too.