Additionnal work.
This commit is contained in:
parent
f320b36db3
commit
032447bf30
@ -818,7 +818,8 @@ bool COpenGLDriver::genericDriverInit()
|
||||
// glEnable(GL_RESCALE_NORMAL_EXT);
|
||||
|
||||
glClearDepth(1.0);
|
||||
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
|
||||
if (!useCoreContext)
|
||||
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
|
||||
glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
|
||||
glHint(GL_POINT_SMOOTH_HINT, GL_FASTEST);
|
||||
glDepthFunc(GL_LEQUAL);
|
||||
@ -2659,7 +2660,8 @@ void COpenGLDriver::setRenderStates3DMode()
|
||||
{
|
||||
// Reset Texture Stages
|
||||
glDisable(GL_BLEND);
|
||||
glDisable(GL_ALPHA_TEST);
|
||||
if (!useCoreContext)
|
||||
glDisable(GL_ALPHA_TEST);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
// switch back the matrices
|
||||
@ -2858,7 +2860,7 @@ void COpenGLDriver::setBasicRenderStates(const SMaterial& material, const SMater
|
||||
glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
|
||||
break;
|
||||
}
|
||||
if (material.ColorMaterial != ECM_NONE)
|
||||
if (material.ColorMaterial != ECM_NONE && !useCoreContext)
|
||||
glEnable(GL_COLOR_MATERIAL);
|
||||
}
|
||||
|
||||
@ -2996,9 +2998,9 @@ void COpenGLDriver::setBasicRenderStates(const SMaterial& material, const SMater
|
||||
// lighting
|
||||
if (resetAllRenderStates || (lastmaterial.Lighting != material.Lighting))
|
||||
{
|
||||
if (material.Lighting)
|
||||
if (material.Lighting && !useCoreContext)
|
||||
glEnable(GL_LIGHTING);
|
||||
else
|
||||
else if (!useCoreContext)
|
||||
glDisable(GL_LIGHTING);
|
||||
}
|
||||
|
||||
@ -3079,18 +3081,18 @@ void COpenGLDriver::setBasicRenderStates(const SMaterial& material, const SMater
|
||||
// fog
|
||||
if (resetAllRenderStates || lastmaterial.FogEnable != material.FogEnable)
|
||||
{
|
||||
if (material.FogEnable)
|
||||
if (material.FogEnable && !useCoreContext)
|
||||
glEnable(GL_FOG);
|
||||
else
|
||||
else if (!useCoreContext)
|
||||
glDisable(GL_FOG);
|
||||
}
|
||||
|
||||
// normalization
|
||||
if (resetAllRenderStates || lastmaterial.NormalizeNormals != material.NormalizeNormals)
|
||||
{
|
||||
if (material.NormalizeNormals)
|
||||
if (material.NormalizeNormals && !useCoreContext)
|
||||
glEnable(GL_NORMALIZE);
|
||||
else
|
||||
else if (!useCoreContext)
|
||||
glDisable(GL_NORMALIZE);
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ namespace irr
|
||||
{
|
||||
namespace video
|
||||
{
|
||||
|
||||
extern bool useCoreContext;
|
||||
COpenGLExtensionHandler::COpenGLExtensionHandler() :
|
||||
StencilBuffer(false), MultiTextureExtension(false),
|
||||
TextureCompressionExtension(false),
|
||||
@ -568,7 +568,8 @@ void COpenGLExtensionHandler::initExtensions(bool stencilBuffer)
|
||||
if (Version>102 || FeatureAvailable[IRR_ARB_multitexture])
|
||||
{
|
||||
#if defined(GL_MAX_TEXTURE_UNITS)
|
||||
glGetIntegerv(GL_MAX_TEXTURE_UNITS, &num);
|
||||
if (!useCoreContext)
|
||||
glGetIntegerv(GL_MAX_TEXTURE_UNITS, &num);
|
||||
#elif defined(GL_MAX_TEXTURE_UNITS_ARB)
|
||||
glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &num);
|
||||
#endif
|
||||
@ -587,7 +588,8 @@ void COpenGLExtensionHandler::initExtensions(bool stencilBuffer)
|
||||
MaxSupportedTextures=core::max_(MaxSupportedTextures,static_cast<u8>(num));
|
||||
}
|
||||
#endif
|
||||
glGetIntegerv(GL_MAX_LIGHTS, &num);
|
||||
if (!useCoreContext)
|
||||
glGetIntegerv(GL_MAX_LIGHTS, &num);
|
||||
MaxLights=static_cast<u8>(num);
|
||||
#ifdef GL_EXT_texture_filter_anisotropic
|
||||
if (FeatureAvailable[IRR_EXT_texture_filter_anisotropic])
|
||||
@ -621,7 +623,8 @@ void COpenGLExtensionHandler::initExtensions(bool stencilBuffer)
|
||||
#endif
|
||||
glGetIntegerv(GL_MAX_CLIP_PLANES, &num);
|
||||
MaxUserClipPlanes=static_cast<u8>(num);
|
||||
glGetIntegerv(GL_AUX_BUFFERS, &num);
|
||||
if (!useCoreContext)
|
||||
glGetIntegerv(GL_AUX_BUFFERS, &num);
|
||||
MaxAuxBuffers=static_cast<u8>(num);
|
||||
#ifdef GL_ARB_draw_buffers
|
||||
if (FeatureAvailable[IRR_ARB_draw_buffers])
|
||||
@ -641,7 +644,8 @@ void COpenGLExtensionHandler::initExtensions(bool stencilBuffer)
|
||||
}
|
||||
#endif
|
||||
glGetFloatv(GL_ALIASED_LINE_WIDTH_RANGE, DimAliasedLine);
|
||||
glGetFloatv(GL_ALIASED_POINT_SIZE_RANGE, DimAliasedPoint);
|
||||
if (!useCoreContext)
|
||||
glGetFloatv(GL_ALIASED_POINT_SIZE_RANGE, DimAliasedPoint);
|
||||
glGetFloatv(GL_SMOOTH_LINE_WIDTH_RANGE, DimSmoothedLine);
|
||||
glGetFloatv(GL_SMOOTH_POINT_SIZE_RANGE, DimSmoothedPoint);
|
||||
#if defined(GL_ARB_shading_language_100) || defined (GL_VERSION_2_0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user