Greetings, I am coding a 3D game, and although the main screen is 3D, I of course wanna do a 2D interface. I also need to be able to draw images (.bmp files) on this interface
I know how to do this using DirectDraw, but not with GL
Any help would be appreciated
To have your 2d interface, you just disable writing to the depth buffer and you use glOrtho. There is a simpler way with gluOrtho2D. You only to set the lower left corner and the width and the height of your projection.
To draw bitmaps, you’ll have to draw a polygon and texture map it using your bitmap.
There was some document with OGLSDK, in which they told how to make glDrawPixels fast. You had to disable almost every OpenGL state in order to do it. Never tested it though…