hello everyone,
i have a huge terrain being loaded up onto my window. i have a 2d othro projection in my display rountine, then i have a perspective projection. how can i add another ortho projection to my display routine. is it possible?
im using my 2d othro projection to show up a backrground image and a scale showing the elevation and the associated color. what happens is when i zoom in all the way into my sceen, the scale hides behind the scene, cause its being rendered before the perspective projection shows the terrain and other info. i want to bring the scale in front.

i m using VB6

'load the projection matrix with identity
glMatrixMode mmProjection
glLoadIdentity

…
… Render the terrain
…
…
glPopMatrix 'pop projection matrix
glPopMatrix 'pop modelview matrix
glPopMatrix 'pop the scene

do i have to add another projection matrix and a modelview matrix or can i somehow use the earlier set ortho projection, cause the new one is exactly equal to the old one.

do i have to add another projection matrix and a modelview matrix or can i somehow use the earlier set ortho projection, cause the new one is exactly equal to the old one.
you can use an earlier matrix, that’s the point of pushing the stack to begin with, to save the matrix state.

the second push of the projection matrix (in your code), right before the switch to modelview, is not needed.

you can use an earlier matrix, that’s the point of pushing the stack to begin with, to save the matrix state.

the second push of the projection matrix (in your code), right before the switch to modelview, is not needed.[/b]
that is exactly what i am tryin to do, but my background is not being rendered. my scale shows up fine n so does my scene rendered in the perspective proj. ne help would be really appreciated.

this is how it looks :

'clear the color buffer
glClear clrColorBufferBit

'load the projection matrix with identity
glMatrixMode mmProjection
glLoadIdentity
'set projection to 2D othrographic to render the frame buffer image
glOrtho -mintWidth / 2, mintWidth / 2, -mintHeight / 2, mintHeight / 2, -10, 10 '(mdblzmax - mdblzmin) / 2, -(mdblzmax - mdblzmin) / 2
glMatrixMode GL_MODELVIEW
glLoadIdentity

…
… Render the background
…

glPushMatrix

'set the projection to perspective
glMatrixMode GL_PROJECTION
glPushMatrix
glLoadIdentity
gluPerspective msngFieldOfView, msngAspectRatio, mdblNearField, mdblFarField
glMatrixMode GL_MODELVIEW
glLoadIdentity

…
… Load terrain
…
glPopMatrix 'pop projection matrix
glPopMatrix 'pop the scene

with this setup, neither my scale nor my background img is being shown.

now, the scale shows , but the backgound img doesnt. the only error i get is 1280 = invalid enum. i dont know what it really means, but i get this msg when im tryin to map a texture as my background.