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