small patch for --no-graphics mode
This commit is contained in:
parent
20959f970a
commit
585b79f555
@ -436,16 +436,24 @@ void IrrDriver::initDevice()
|
|||||||
|
|
||||||
GLMajorVersion = 2;
|
GLMajorVersion = 2;
|
||||||
GLMinorVersion = 1;
|
GLMinorVersion = 1;
|
||||||
glGetIntegerv(GL_MAJOR_VERSION, &GLMajorVersion);
|
// Call to glGetIntegerv should not be made if --no-graphics is used
|
||||||
glGetIntegerv(GL_MINOR_VERSION, &GLMinorVersion);
|
if(!ProfileWorld::isNoGraphics())
|
||||||
|
{
|
||||||
|
glGetIntegerv(GL_MAJOR_VERSION, &GLMajorVersion);
|
||||||
|
glGetIntegerv(GL_MINOR_VERSION, &GLMinorVersion);
|
||||||
|
}
|
||||||
Log::info("IrrDriver", "OPENGL VERSION IS %d.%d", GLMajorVersion, GLMinorVersion);
|
Log::info("IrrDriver", "OPENGL VERSION IS %d.%d", GLMajorVersion, GLMinorVersion);
|
||||||
m_glsl = (GLMajorVersion > 3 || (GLMajorVersion == 3 && GLMinorVersion >= 1));
|
m_glsl = (GLMajorVersion > 3 || (GLMajorVersion == 3 && GLMinorVersion >= 1));
|
||||||
|
|
||||||
// Parse extensions
|
// Parse extensions
|
||||||
hasVSLayer = false;
|
hasVSLayer = false;
|
||||||
const GLubyte *extensions = glGetString(GL_EXTENSIONS);
|
// Default false value for hasVSLayer if --no-graphics argument is used
|
||||||
if (extensions && strstr((const char*)extensions, "GL_AMD_vertex_shader_layer") != NULL)
|
if (!ProfileWorld::isNoGraphics())
|
||||||
|
{
|
||||||
|
const GLubyte *extensions = glGetString(GL_EXTENSIONS);
|
||||||
|
if (extensions && strstr((const char*)extensions, "GL_AMD_vertex_shader_layer") != NULL)
|
||||||
hasVSLayer = true;
|
hasVSLayer = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user