From d750ac66fae9c77eed20ebcadf95c76e61a2006e Mon Sep 17 00:00:00 2001 From: Emile Belanger Date: Wed, 5 May 2021 19:14:12 +0100 Subject: [PATCH] Fixes for Raze --- src/common/rendering/gles/gles_framebuffer.cpp | 6 ++---- src/common/rendering/gles/gles_shader.cpp | 4 +++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/rendering/gles/gles_framebuffer.cpp b/src/common/rendering/gles/gles_framebuffer.cpp index 7581426ac..67cacd76e 100644 --- a/src/common/rendering/gles/gles_framebuffer.cpp +++ b/src/common/rendering/gles/gles_framebuffer.cpp @@ -123,12 +123,8 @@ void OpenGLFrameBuffer::InitializeState() { static bool first=true; - gl_customshader = false; // Unlikely work with GLSL v1.00 - gl_sort_textures = true; // Faster - mPipelineNbr = gl_pipeline_depth; - InitGLES(); // Move some state to the framebuffer object for easier access. @@ -250,6 +246,8 @@ void OpenGLFrameBuffer::Swap() mVertexData->NextPipelineBuffer(); + RenderState()->SetVertexBuffer(screen->mVertexData); // Needed for Raze because it does not reset it + Finish.Unclock(); camtexcount = 0; FHardwareTexture::UnbindAll(); diff --git a/src/common/rendering/gles/gles_shader.cpp b/src/common/rendering/gles/gles_shader.cpp index 13ab55073..892133857 100644 --- a/src/common/rendering/gles/gles_shader.cpp +++ b/src/common/rendering/gles/gles_shader.cpp @@ -629,7 +629,9 @@ bool FShader::Load(const char * name, const char * vert_prog_lump_, const char * shaderData->muTextureModulateColor.Init(shaderData->hShader, "uTextureModulateColor"); shaderData->muTextureBlendColor.Init(shaderData->hShader, "uTextureBlendColor"); shaderData->muTimer.Init(shaderData->hShader, "timer"); - +#ifdef NPOT_EMULATION + shaderData->muNpotEmulation.Init(shaderData->hShader, "uNpotEmulation"); +#endif shaderData->muFixedColormapStart.Init(shaderData->hShader, "uFixedColormapStart"); shaderData->muFixedColormapRange.Init(shaderData->hShader, "uFixedColormapRange");