mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-02 14:42:32 +00:00
This commit is contained in:
commit
a90692330b
2 changed files with 9 additions and 1 deletions
|
@ -214,6 +214,11 @@ OpenGLSWFrameBuffer::OpenGLSWFrameBuffer(void *hMonitor, int width, int height,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gl_LoadExtensions();
|
gl_LoadExtensions();
|
||||||
|
if (gl.legacyMode)
|
||||||
|
{
|
||||||
|
Printf("Legacy OpenGL path is active. No Acceleration will be used.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
InitializeState();
|
InitializeState();
|
||||||
if (first)
|
if (first)
|
||||||
{
|
{
|
||||||
|
@ -360,8 +365,11 @@ bool OpenGLSWFrameBuffer::CreatePixelShader(FString vertexsrc, FString fragments
|
||||||
auto shader = std::make_unique<HWPixelShader>();
|
auto shader = std::make_unique<HWPixelShader>();
|
||||||
|
|
||||||
shader->Program = glCreateProgram();
|
shader->Program = glCreateProgram();
|
||||||
|
if (shader->Program == 0) { Printf("glCreateProgram failed. Disabling OpenGL hardware acceleration.\n"); return false; }
|
||||||
shader->VertexShader = glCreateShader(GL_VERTEX_SHADER);
|
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);
|
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 maxGlslVersion = 330;
|
||||||
int shaderVersion = MIN((int)round(gl.glslversion * 10) * 10, maxGlslVersion);
|
int shaderVersion = MIN((int)round(gl.glslversion * 10) * 10, maxGlslVersion);
|
||||||
|
|
|
@ -62,7 +62,7 @@ CUSTOM_CVAR(Bool, gl_debug, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINI
|
||||||
{
|
{
|
||||||
Printf("This won't take effect until " GAMENAME " is restarted.\n");
|
Printf("This won't take effect until " GAMENAME " is restarted.\n");
|
||||||
}
|
}
|
||||||
CUSTOM_CVAR(Bool, vid_glswfb, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
CUSTOM_CVAR(Bool, vid_glswfb, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
||||||
{
|
{
|
||||||
Printf("This won't take effect until " GAMENAME " is restarted.\n");
|
Printf("This won't take effect until " GAMENAME " is restarted.\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue