OpenGL GUI and menus

Started by
1 comment, last by ajm113 15 years, 11 months ago
I've been working on an OpenGL rendered GUI and I've run into a snag with the Menu system. At first I rendered Menus inside of the main window, which caused some drawbacks, such as Menus were restricted within the window itself and were not actually 'layered' on top of the window. Furthermore, lots of special instance code had to be put in to deal with it. Now I've reworked it so every Menu that is created is rendered within its own window, that appears on top of the main window. It all works perfectly fine, except every time a window appears the main window loses focus, which I would like to avoid. So does anybody know of a way to either avoid this, somehow use the HMENU object and custom draw the entire thing with OpenGL OR is there some other method I'm overlooking.
Author Freeworld3Dhttp://www.freeworld3d.org
Advertisement
There is a Win32 function for setting the force : SetFocus
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
I am not trying too spam, but www.marek-knows.com has videos on creating a GUI. Though I think it's made in Win32 that mite help you out.
Check out my open source code projects/libraries! My Homepage You may learn something.

This topic is closed to new replies.

Advertisement