Commit 308ba135 authored by hybrid's avatar hybrid

Add gamma support to SDL device.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2572 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 3248afa9
......@@ -778,6 +778,21 @@ bool CIrrDeviceSDL::isWindowMinimized() const
}
//! Set the current Gamma Value for the Display
bool CIrrDeviceSDL::setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast )
{
return (SDL_SetGamma(red, green, blue) != -1);
}
//! Get the current Gamma Value for the Display
bool CIrrDeviceSDL::getGammaRamp( f32 &red, f32 &green, f32 &blue, f32 &brightness, f32 &contrast )
{
brightness = 0.f;
contrast = 0.f;
return (SDL_GetGamma(&red, &green, &blue) != -1);
}
//! returns color format of the window.
video::ECOLOR_FORMAT CIrrDeviceSDL::getColorFormat() const
{
......
......@@ -74,6 +74,12 @@ namespace irr
//! Activate any joysticks, and generate events for them.
virtual bool activateJoysticks(core::array<SJoystickInfo> & joystickInfo);
//! Set the current Gamma Value for the Display
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast );
//! Get the current Gamma Value for the Display
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue, f32 &brightness, f32 &contrast );
//! Get the device type
virtual E_DEVICE_TYPE getType() const
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment