Implement D3D SetGammaRamp

What it says on the tin: a place to discuss proposed new features.
Posts: 40
Joined: Tue Jan 25, 2011 9:12 pm

Implement D3D SetGammaRamp

Postby SamJ » Sat Apr 09, 2011 3:22 pm

I can send the patch for this if the maintainers are interested.

SetGammaRamp is the function that all windows commercial games use to set gamma correction. It relies on a hardware capability implemented on 99% of the current GPUs. Sure there are some really old gpus that don't support it, but if it's good enough for Blizzard Entertainment it's good enough for you.

Ogre3D doesn't implement that because there's no OpenGL equivalent. The thing is that you *really* want to use that because other solutions are either too complicated (full transformation of all your textures, shaders, vertex colours) or have a performance hit (compositor). Crippling the D3D version of the game (which let's face it, it's the important one) just because you can't do the same in OpenGL is not nice. It forces you include the D3D headers and link against D3D directly in your app, ugh! And you guys are always telling us that doing direct3d calls is missing the point of ogre and that we should never do it, but you don't give us access to essential features like this, what's up with that, ogre team?

So, can we have this, pleeease? You don't even have to do anything, I will send the patch. Just let me know how you would like it implemented if you feel it necessary (in what class to place the call, etc). The function would call SetGammaRamp in D3D and do nothing on OpenGL.
0 x

Orc Shaman
Posts: 777
Joined: Mon Jan 18, 2010 6:06 pm
Location: Costa Mesa, California

Re: Implement D3D SetGammaRamp

Postby drwbns » Fri Jun 01, 2012 12:41 am

You should just post the patch here in case other devs want to use it :)
0 x

User avatar
Posts: 7
Joined: Fri Jun 01, 2012 7:44 am

Re: Implement D3D SetGammaRamp

Postby hallucinogen » Fri Jun 01, 2012 8:01 am

Hey, you could post the patch, can be useful.
0 x

User avatar
OGRE Moderator
OGRE Moderator
Posts: 2819
Joined: Mon Mar 05, 2007 11:17 pm
Location: Canada

Re: Implement D3D SetGammaRamp

Postby Jabberwocky » Fri Jun 01, 2012 9:03 pm

I played around with SetGammaRamp recently, and had some issues with it.
1. it would affect the whole screen, not just the game (if running in windows mode)
2. it would leave the computer in the altered state if the game didn't properly shut down.

Since I don't see this happen with other modern games, either I was doing something wrong, or else people aren't using SetGammaRamp anymore.
0 x

User avatar
OGRE Moderator
OGRE Moderator
Posts: 7130
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia

Re: Implement D3D SetGammaRamp

Postby Kojack » Sat Jun 02, 2012 2:54 am

That sounds like what Unreal used to do (got hit by it the other day running the Swat 4 editor). Mess with everything's gamma and not restore it if it crashed.
0 x

Return to “Feature Requests”

Who is online

Users browsing this forum: No registered users and 5 guests