Jump to content
  • Advertisement
Sign in to follow this  

OpenGL Pop Up Menu Win32 and OpenGL

This topic is 4941 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everybody!!! As you no doubt guess I need help! I am writing some OpenGl app under win32; I have some DrawGLScene; When I click right mouse I get Pop Up Menu; But if dont select anything and click left bottom outside the menu I get BLACK SCREEN and my Scene dosnt draw. Whats going on??? Where the BUG??

Share this post

Link to post
Share on other sites
impossible to say without further info
r u refreshing the opengl window as much as possible (eg 60fps)

Share this post

Link to post
Share on other sites
I am Sorry! I was wrong!
Lets start from begining.
My draw function:

int DrawGLScene(GLvoid) {


glFlush ();
return TRUE;

When I click mouse rigth button I get pop up menu.
If I select some item everything goes OK.
But if I DONT select anything and click left button outside the menu
My scene disappear and I get NOT BLACK WINDOW like I said befor
but clean screen of glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT) function.

This is PopUpMenu handle function:
if( (hPopMenu = LoadMenu(hInstance, MAKEINTRESOURCE(IDR_POPUP))) == NULL )
return 0;
hMenuTrackPopup = GetSubMenu(hPopMenu, 0);



So do you know what is going on???

Share this post

Link to post
Share on other sites
You can try return 0; instead of the break; at the end.
Probably I'm totally wrong ...
but the only thing I can imagine is that it tries to deal with the else case again and again!?
If nothing else this is a BUMP ...

Also ... put code or source tags around your code.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!