OGL: require GL version >= 3.0

This "fix" a crash because of glVertexAttribI only available on gl3+ contexts.
This commit is contained in:
degasus 2014-11-26 21:33:47 +01:00
parent f151f5ed23
commit c63a38088a
1 changed files with 11 additions and 4 deletions

View File

@ -441,13 +441,20 @@ Renderer::Renderer()
bSuccess = false; bSuccess = false;
} }
if (!GLExtensions::Supports("GL_ARB_sampler_objects") && bSuccess) if (!GLExtensions::Supports("GL_ARB_sampler_objects"))
{ {
// Our sampler cache uses this extension. It could easyly be workaround and it's by far the // Our sampler cache uses this extension. It could easyly be workaround and it's by far the
// highest requirement, but it seems that no driver lacks support for it. // highest requirement, but it seems that no driver lacks support for it.
PanicAlert("GPU: OGL ERROR: Need GL_ARB_sampler_objects." PanicAlert("GPU: OGL ERROR: Need GL_ARB_sampler_objects.\n"
"GPU: Does your video card support OpenGL 3.3?" "GPU: Does your video card support OpenGL 3.3?");
"Please report this issue, then there will be a workaround"); bSuccess = false;
}
if (GLExtensions::Version() < 300)
{
// integer vertex attributes require a gl3 only function
PanicAlert("GPU: OGL ERROR: Need OpenGL version 3.\n"
"GPU: Does your video card support OpenGL 3?");
bSuccess = false; bSuccess = false;
} }