Commit 34d1b8b8 authored by hybrid's avatar hybrid

Some patches from balrog

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3808 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 4ed280b7
...@@ -681,9 +681,12 @@ bool COpenGLDriver::genericDriverInit() ...@@ -681,9 +681,12 @@ bool COpenGLDriver::genericDriverInit()
Params.HandleSRGB &= ((FeatureAvailable[IRR_ARB_framebuffer_sRGB] || FeatureAvailable[IRR_EXT_framebuffer_sRGB]) && Params.HandleSRGB &= ((FeatureAvailable[IRR_ARB_framebuffer_sRGB] || FeatureAvailable[IRR_EXT_framebuffer_sRGB]) &&
FeatureAvailable[IRR_EXT_texture_sRGB]); FeatureAvailable[IRR_EXT_texture_sRGB]);
#if defined(GL_ARB_framebuffer_sRGB) || defined(GL_EXT_framebuffer_sRGB) #if defined(GL_ARB_framebuffer_sRGB)
if (Params.HandleSRGB) if (Params.HandleSRGB)
glEnable(GL_FRAMEBUFFER_SRGB); glEnable(GL_FRAMEBUFFER_SRGB);
#elif defined(GL_EXT_framebuffer_sRGB)
if (Params.HandleSRGB)
glEnable(GL_FRAMEBUFFER_SRGB_EXT);
#endif #endif
// This is a fast replacement for NORMALIZE_NORMALS // This is a fast replacement for NORMALIZE_NORMALS
...@@ -4301,7 +4304,7 @@ IImage* COpenGLDriver::createScreenShot(video::ECOLOR_FORMAT format, video::E_RE ...@@ -4301,7 +4304,7 @@ IImage* COpenGLDriver::createScreenShot(video::ECOLOR_FORMAT format, video::E_RE
fmt = GL_LUMINANCE; fmt = GL_LUMINANCE;
#ifdef GL_ARB_half_float_pixel #ifdef GL_ARB_half_float_pixel
if (FeatureAvailable[IRR_ARB_half_float_pixel]) if (FeatureAvailable[IRR_ARB_half_float_pixel])
type = GL_HALF_FLOAT; type = GL_HALF_FLOAT_ARB;
else else
#endif #endif
{ {
...@@ -4318,7 +4321,7 @@ IImage* COpenGLDriver::createScreenShot(video::ECOLOR_FORMAT format, video::E_RE ...@@ -4318,7 +4321,7 @@ IImage* COpenGLDriver::createScreenShot(video::ECOLOR_FORMAT format, video::E_RE
fmt = GL_LUMINANCE_ALPHA; fmt = GL_LUMINANCE_ALPHA;
#ifdef GL_ARB_half_float_pixel #ifdef GL_ARB_half_float_pixel
if (FeatureAvailable[IRR_ARB_half_float_pixel]) if (FeatureAvailable[IRR_ARB_half_float_pixel])
type = GL_HALF_FLOAT; type = GL_HALF_FLOAT_ARB;
else else
#endif #endif
{ {
...@@ -4330,7 +4333,7 @@ IImage* COpenGLDriver::createScreenShot(video::ECOLOR_FORMAT format, video::E_RE ...@@ -4330,7 +4333,7 @@ IImage* COpenGLDriver::createScreenShot(video::ECOLOR_FORMAT format, video::E_RE
fmt = GL_BGRA; fmt = GL_BGRA;
#ifdef GL_ARB_half_float_pixel #ifdef GL_ARB_half_float_pixel
if (FeatureAvailable[IRR_ARB_half_float_pixel]) if (FeatureAvailable[IRR_ARB_half_float_pixel])
type = GL_HALF_FLOAT; type = GL_HALF_FLOAT_ARB;
else else
#endif #endif
{ {
......
...@@ -632,7 +632,7 @@ bool CIrrDeviceMacOSX::createWindow() ...@@ -632,7 +632,7 @@ bool CIrrDeviceMacOSX::createWindow()
CGLSetParameter(CGLContext,kCGLCPSwapInterval,&newSwapInterval); CGLSetParameter(CGLContext,kCGLCPSwapInterval,&newSwapInterval);
if (IsSoftwareRenderer && CreationParams.DriverType != video::EDT_NULL) if (IsSoftwareRenderer && CreationParams.DriverType != video::EDT_NULL)
{ {
long order = -1; // below window GLint order = -1; // below window
CGLSetParameter(CGLContext, kCGLCPSurfaceOrder, &order); CGLSetParameter(CGLContext, kCGLCPSurfaceOrder, &order);
} }
} }
...@@ -677,7 +677,7 @@ void CIrrDeviceMacOSX::createDriver() ...@@ -677,7 +677,7 @@ void CIrrDeviceMacOSX::createDriver()
case video::EDT_BURNINGSVIDEO: case video::EDT_BURNINGSVIDEO:
#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_
VideoDriver = video::createSoftwareDriver2(CreationParams.WindowSize, CreationParams.Fullscreen, FileSystem, this); VideoDriver = video::createSoftwareDriver2(CreationParams, FileSystem, this);
IsSoftwareRenderer = true; IsSoftwareRenderer = true;
#else #else
os::Printer::log("Burning's video driver was not compiled in.", ELL_ERROR); os::Printer::log("Burning's video driver was not compiled in.", ELL_ERROR);
......
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