Jump to content

  • Log In with Google      Sign In   
  • Create Account

#Actualmiggs

Posted 07 February 2013 - 10:34 AM

i do call wglMakeCurrent, but the thing is: i don't call it in each thread, since i only run 1 thread. I do run both window computations and draw methods one after the other. (both windows don't need a lot of computations so this works for me i'd like to keep it simple)

 

imagine my loop is like:

instance1 = new inst... // an instance containing it's scene logic, window, and opengl context
instance2 = new inst...

while(myloopShouldBeRunning)
{
    instance1->update()->draw(); // calls makecurrent does it's stuff and renders
    instance2->update()->draw(); 
}

 

could the problem be that i run multiple contexts on the same thread?

 

 

EDIT:

problem solved

 

a background worker thread had some old not cleaned up messy code that switched the context in some cases at uncontrolled times...


#3miggs

Posted 06 February 2013 - 01:35 PM

i do call wglMakeCurrent, but the thing is: i don't call it in each thread, since i only run 1 thread. I do run both window computations and draw methods one after the other. (both windows don't need a lot of computations so this works for me i'd like to keep it simple)

 

imagine my loop is like:

instance1 = new inst... // an instance containing it's scene logic, window, and opengl context
instance2 = new inst...

while(myloopShouldBeRunning)
{
    instance1->update()->draw(); // calls makecurrent does it's stuff and renders
    instance2->update()->draw(); 
}

 

could the problem be that i run multiple contexts on the same thread?


#2miggs

Posted 06 February 2013 - 11:21 AM

i do call wglMakeCurrent, but the thing is: i don't call it in each thread, since i only run 1 thread. I do run both window computations and draw methods one after the other.

 

imagine my loop is like:

instance1 = new inst... // an instance containing it's scene logic, window, and opengl context
instance2 = new inst...

while(myloopShouldBeRunning)
{
    instance1->update()->draw(); // calls makecurrent does it's stuff and renders
    instance2->update()->draw(); 
}

 

could the problem be that i run multiple contexts on the same thread?


#1miggs

Posted 06 February 2013 - 11:18 AM

i do call wglMakeCurrent, but the thing is: i don't call it in each thread, since i only run 1 thread. I do run both window computations and draw methods one after the other.

 

imagine my loop is like:

 

 

 

instance1 = new inst... // an instance containing it's scene logic, window, and opengl context
instance2 = new inst...

while(myloopShouldBeRunning)
{
instance1.update().draw(); // calls makecurrent does it's stuff and renders
instance2.update().draw(); 
}

 

could the problem be that i run multiple contexts on the same thread?


PARTNERS