2d console question

Hi, sorry if this is a blatantly stupid question. Me am a newbie

I’m trying to render a bitmap over the 3d world (like a game consol). I’ve being settling for rendering quads in front of the camera and texturing it but this doesn’t work well when the camera moves. Also if I need to place another image over the original image they flicker back and fourth. I’ve also looked at glDrawPixels() but you can’t seem to render another tga over it with Alfa values

Thanks for any help

for console, use orthographic projection. glOrtho or gluOrtho2D. and then render all your HUD including console.

so i render a second sceane using otho instead of perspective… ok i’ll try that thanks :slight_smile:

That’s one option but either way you should also disable depth testing when you render your overlay, that’s what is causing the flickering and can cause intersection with 3d objects in the scene unless you clear z, which would be very inefficient just for the overlay.

A textured quad is by far the most efficient way to do your overlay if the contents of the overlay is unchanging so definitely try to make this work rather than drawing the image direct with a drawpixels.