mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 23:33:00 +00:00
- Check if glCreateProgram or glCreateShader fails, because apparently AMD found a way to make exactly that happen
This commit is contained in:
parent
b1e1f25218
commit
35c35fc26f
1 changed files with 3 additions and 0 deletions
|
@ -360,8 +360,11 @@ bool OpenGLSWFrameBuffer::CreatePixelShader(FString vertexsrc, FString fragments
|
|||
auto shader = std::make_unique<HWPixelShader>();
|
||||
|
||||
shader->Program = glCreateProgram();
|
||||
if (shader->Program == 0) { Printf("glCreateProgram failed. Disabling OpenGL hardware acceleration.\n"); return false; }
|
||||
shader->VertexShader = glCreateShader(GL_VERTEX_SHADER);
|
||||
if (shader->VertexShader == 0) { Printf("glCreateShader(GL_VERTEX_SHADER) failed. Disabling OpenGL hardware acceleration.\n"); return false; }
|
||||
shader->FragmentShader = glCreateShader(GL_FRAGMENT_SHADER);
|
||||
if (shader->FragmentShader == 0) { Printf("glCreateShader(GL_FRAGMENT_SHADER) failed. Disabling OpenGL hardware acceleration.\n"); return false; }
|
||||
|
||||
int maxGlslVersion = 330;
|
||||
int shaderVersion = MIN((int)round(gl.glslversion * 10) * 10, maxGlslVersion);
|
||||
|
|
Loading…
Reference in a new issue