OpenGLDriver: Calling makeCurrent() on every beginScene() ?

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.

OpenGLDriver: Calling makeCurrent() on every beginScene() ?

Postby devsh » Thu Jan 21, 2016 6:51 pm

Why are you doing this to me?

No, but really, what is the reason for calling changeRenderContext every frame?

*Its like the most painfully slow OpenGL call you can make (takes roughly 0.25ms)
We chose to stream mesh data from Multiple OpenGL Contexts in many threads and do the other things, not because they are easy, but because they are hard! - JFK
User avatar
devsh
Competition winner
 
Posts: 1739
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK

Re: OpenGLDriver: Calling makeCurrent() on every beginScene(

Postby Nadro » Thu Jan 21, 2016 7:01 pm

Hi,

Thanks for a report this issue, it'll be fixed in the upcoming commit.

Cheers,
Nadro
 
Posts: 1644
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: OpenGLDriver: Calling makeCurrent() on every beginScene(

Postby hendu » Thu Jan 21, 2016 7:25 pm

I wonder if that's needed for the Qt and WxWidgets embedders?
hendu
 
Posts: 2567
Joined: Sat Dec 18, 2010 12:53 pm

Re: OpenGLDriver: Calling makeCurrent() on every beginScene(

Postby elvman » Thu Jan 21, 2016 8:28 pm

Actually this is needed for OSX, because render context can be changed by OSX GUI. I fixed this bug for cocos2d-x by also making the context current before every frame: https://github.com/cocos2d/cocos2d-x/pull/14598
Ouzel – 2D game engine
Realistic water node
elvman
 
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia

Re: OpenGLDriver: Calling makeCurrent() on every beginScene(

Postby Mel » Fri Jan 22, 2016 12:37 am

Perhaps you could make that "changeRenderContext" OSX specific then?
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
User avatar
Mel
Competition winner
 
Posts: 2192
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: OpenGLDriver: Calling makeCurrent() on every beginScene(

Postby hendu » Fri Jan 22, 2016 11:55 am

Qt and Wx also run on Linux, Windows, etc. So if they need it, you can't filter by platform.
hendu
 
Posts: 2567
Joined: Sat Dec 18, 2010 12:53 pm

Re: OpenGLDriver: Calling makeCurrent() on every beginScene(

Postby Nadro » Fri Jan 22, 2016 6:49 pm

I'll check how this situation looks at OSX 10.9. If it will be required for Qt, wx etc. we can call glMakeCurrent only when SIrrlichtCreationParams::windowId isn't equal NULL, however IIRC this issue is just my mistake (missing simple 'if') :P
Nadro
 
Posts: 1644
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland


Return to Bug reports

Who is online

Users browsing this forum: No registered users and 1 guest