Ogre 1.9 RenderSystem_GL Steam Overlay fix

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
pontus
Gnoblar
Posts: 9
Joined: Wed Feb 17, 2010 8:29 pm
Location: Stockholm, Sweden
x 7

Ogre 1.9 RenderSystem_GL Steam Overlay fix

Post by pontus »

In a recent steam overlay update (today) steam overlay does more setup code.
The steam overlay setup is hooked up in the wglMakeCurrent(...) call.
The Ogre GL RenderSystem (v1-9) makes an excessive amount of wglMakeCurrent calls.
As a result the fps drops to an unacceptable value if you have a complex rendering setup with many rendertargets.
I made a patch that only changes context if the context really need to change.

https://www.dropbox.com/s/wb9r9qku4241b ... patch?dl=0

Cheers Pontus
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4308
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 137

Re: Ogre 1.9 RenderSystem_GL Steam Overlay fix

Post by spacegaier »

Would it be possible to send us your patch as a pull-request, so that it does not get overlooked, or at least put it in a JIRA ticket (https://ogre3d.atlassian.net/projects/OGRE). Thank you.
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
BAntDit
Kobold
Posts: 32
Joined: Mon Oct 27, 2014 5:43 pm
x 2

Re: Ogre 1.9 RenderSystem_GL Steam Overlay fix

Post by BAntDit »

Yay!

I've put this fix to my Ogre3D 1.9 fork. I have many render targets in renderer(reflection, refraction, shadowing, decals and etc) - the fix gives me +40 fps.
pontus
Gnoblar
Posts: 9
Joined: Wed Feb 17, 2010 8:29 pm
Location: Stockholm, Sweden
x 7

Re: Ogre 1.9 RenderSystem_GL Steam Overlay fix

Post by pontus »

spacegaier wrote:Would it be possible to send us your patch as a pull-request, so that it does not get overlooked, or at least put it in a JIRA ticket (https://ogre3d.atlassian.net/projects/OGRE). Thank you.
Ok. I'll do the pull request thing.
Sorry for not checking the post for a while.
BAntDit wrote:I've put this fix to my Ogre3D 1.9 fork. I have many render targets in renderer(reflection, refraction, shadowing, decals and etc) - the fix gives me +40 fps.
I'm glad this helped :)