Commit d2702c7f authored by hybrid's avatar hybrid

Fixed two places which would create an glError and increased extension check performance.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@851 dfc29bdd-3216-0410-991c-e03cc46cb475
parent b02c9893
......@@ -55,8 +55,8 @@ namespace irr
//! notifies the device that it should close itself
virtual void closeDevice();
//! \return Returns a pointer to a list with all video modes supported
//! by the gfx adapter.
//! \return Returns a pointer to a list with all video modes
//! supported by the gfx adapter.
video::IVideoModeList* getVideoModeList();
//! Notifies the device, that it has been resized
......
......@@ -1145,7 +1145,8 @@ void COpenGLDriver::setRenderStates3DMode()
if (CurrentRenderMode != ERM_3D)
{
// Reset Texture Stages
glTexEnvi( GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_MODULATE );
if (FeatureAvailable[IRR_ARB_texture_env_combine])
glTexEnvi( GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_MODULATE );
glDisable(GL_ALPHA_TEST);
glDisable( GL_BLEND );
glBlendFunc( GL_ONE, GL_ONE_MINUS_SRC_COLOR );
......@@ -1953,7 +1954,8 @@ void COpenGLDriver::setFog(SColor c, bool linearFog, f32 start,
glFogi(GL_FOG_MODE, linearFog ? GL_LINEAR : GL_EXP);
#ifdef GL_EXT_fog_coord
glFogi(GL_FOG_COORDINATE_SOURCE, GL_FRAGMENT_DEPTH);
if (FeatureAvailable[IRR_EXT_fog_coord])
glFogi(GL_FOG_COORDINATE_SOURCE, GL_FRAGMENT_DEPTH);
#endif
if(linearFog)
......
......@@ -92,8 +92,13 @@ void COpenGLExtensionHandler::initExtensions(bool stencilBuffer)
{
str[i] = 0;
for (u32 i=0; i<IRR_OpenGL_Feature_Count; ++i)
{
if (strstr(p, OpenGLFeatureStrings[i]))
{
FeatureAvailable[i] = true;
break;
}
}
p = p + strlen(p) + 1;
}
......
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