Advertisement

Help with GUI direction

Started by February 11, 2002 08:05 PM
1 comment, last by NewB 23 years ago
I having been trying to figure out the best way to go about making a GUI for my opengl programs. I have been reading conflicting information on what is a good and fast (in terms of render speed) way to go. Should I switch between ortho and back for drawing text, or should I use something like a bitmapped quad and not switch to ortho mode. How would I tell if the mouse if over a certain area of the scene or certain object in the scene (should I be using opengl selection or is it slow?). What are some of your ideas for fast text handling and menu handling. Any tips are very welcome, or examples (preferably with source) would be great. I have not yet seen a cool interface coded in opengl, and would like to find something that can help me get started making my own. Thank you! =)
Just do it all (the GUI) in orthographic mode. Use glViewport to make screen coordinates the same as mouse coordinates. That way you don''t have to worry about the selection buffer. Then just do 2D quads (and/or other primitives).

Advertisement
Yes, orthographic is the way to go.
You don''t need the selection buffer because your GUI will probably be a set of rectangles, thus detecting if a point is in a rectangle is a very easy task.
Selection buffer is specialized for complex geometries that are transformed in the modelview/projection matrices.
Since your matrices will be kind of identity matrices, you gotta forget about selection buffer.

This topic is closed to new replies.

Advertisement