Jump to content
  • Advertisement
Sign in to follow this  
y2jsave

OpenGL two opengl window problem

This topic is 3770 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

i made in my prog a opengl window which when clicked at a specific point , creates another openglwindow.. but i am not able to return from the second window properly when i closed my second window, my mouse clicks on first window are not recognised by the function ie first window i think becomes inactive please help

Share this post


Link to post
Share on other sites
Advertisement
u need to supply more info

eg
with SDL u can do

while( SDL_PollEvent( &event ) )
{
switch( event.type )
{
case SDL_ACTIVEEVENT:
{
if ( event.active.gain == 0 && event.active.state & SDL_APPINPUTFOCUS )
{
have_focus = false;
LOG_MESSAGE_DEBUG( "application loses focus" );
}
else
{
have_focus = true;
LOG_MESSAGE_DEBUG( "application has focus" );
}
break;
}

which will get triggered when the person switches away from the app (so u can stop running it, give the cpu a rest)
+ also when the person focuses it again where u may need to reinitialize the input etc

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!