Fixed static variable in Renderer

Could not be used because of GPU-switching technologies like NVidia
Optimus


Former-commit-id: 7602e81747a40b1aceacc6b7d728ba269a30e333
This commit is contained in:
Lynix
2012-12-24 19:06:55 +01:00
parent f2271a6f87
commit 1a5cf8cc0f
4 changed files with 26 additions and 34 deletions

View File

@@ -1254,10 +1254,7 @@ bool NzTexture::IsFormatSupported(nzPixelFormat format)
case nzPixelFormat_Depth24:
case nzPixelFormat_Depth32:
case nzPixelFormat_Depth24Stencil8:
{
static const bool supported = NzOpenGL::IsSupported(nzOpenGLExtension_FrameBufferObject);
return supported;
}
return NzOpenGL::IsSupported(nzOpenGLExtension_FrameBufferObject);
// Formats de stencil (Non supportés pour les textures)
case nzPixelFormat_Stencil1:
@@ -1275,10 +1272,7 @@ bool NzTexture::IsFormatSupported(nzPixelFormat format)
case nzPixelFormat_DXT1:
case nzPixelFormat_DXT3:
case nzPixelFormat_DXT5:
{
static const bool supported = NzOpenGL::IsSupported(nzOpenGLExtension_TextureCompression_s3tc);
return supported;
}
return NzOpenGL::IsSupported(nzOpenGLExtension_TextureCompression_s3tc);
case nzPixelFormat_Undefined:
break;
@@ -1306,10 +1300,7 @@ bool NzTexture::IsTypeSupported(nzImageType type)
case nzImageType_1D_Array:
case nzImageType_2D_Array:
{
static bool supported = NzOpenGL::IsSupported(nzOpenGLExtension_TextureArray);
return supported;
}
return NzOpenGL::IsSupported(nzOpenGLExtension_TextureArray);
}
NazaraError("Image type not handled (0x" + NzString::Number(type, 16) + ')');