Implement D3D SetGammaRamp

What it says on the tin: a place to discuss proposed new features.

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.
SamJ
Halfling
 
Posts: 40
Kudos: 0
Joined: 25 Jan 2011

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 :)
drwbns
Orc Shaman
 
Posts: 752
Kudos: 22
Joined: 18 Jan 2010
Location: Costa Mesa, California

Re: Implement D3D SetGammaRamp

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

Hey, you could post the patch, can be useful.
User avatar
hallucinogen
Gnoblar
 
Posts: 7
Kudos: 0
Joined: 01 Jun 2012

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.
Image
User avatar
Jabberwocky
OGRE Moderator
OGRE Moderator
 
Posts: 2818
Kudos: 213
Joined: 05 Mar 2007
Location: Canada

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.
User avatar
Kojack
OGRE Moderator
OGRE Moderator
 
Posts: 6520
Kudos: 420
Joined: 25 Jan 2004
Location: Brisbane, Australia


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron