Fix crash happening with glGetFloatv on GPDXD devices

This commit is contained in:
Romain Graillot 2018-03-12 23:11:58 +01:00
parent cd75c46d47
commit ad37e7ce45

View File

@ -22,7 +22,12 @@ extern void bindDefaultFBO();
GLuint g_defaultFBO = 0;
void GLQueueRunner::CreateDeviceObjects() {
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &maxAnisotropyLevel_);
if (gl_extensions.EXT_texture_filter_anisotropic) {
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &maxAnisotropyLevel_);
} else {
maxAnisotropyLevel_ = 0.0f;
}
if (gl_extensions.ARB_vertex_array_object) {
glGenVertexArrays(1, &globalVAO_);
}