diff --git a/src/gl/dynlights/gl_lightbuffer.cpp b/src/gl/dynlights/gl_lightbuffer.cpp index 05dc7ec55..3031d3916 100644 --- a/src/gl/dynlights/gl_lightbuffer.cpp +++ b/src/gl/dynlights/gl_lightbuffer.cpp @@ -54,7 +54,7 @@ FLightBuffer::FLightBuffer() mBufferSize = INITIAL_BUFFER_SIZE; mByteSize = mBufferSize * sizeof(float); - if (gl.flags & RFL_SHADER_STORAGE_BUFFER) + if (gl.flags & RFL_BUFFER_STORAGE) { mBufferType = GL_SHADER_STORAGE_BUFFER; mBlockAlign = -1; @@ -70,7 +70,7 @@ FLightBuffer::FLightBuffer() glGenBuffers(1, &mBufferId); glBindBufferBase(mBufferType, LIGHTBUF_BINDINGPOINT, mBufferId); - if (gl.flags & RFL_SHADER_STORAGE_BUFFER) + if (gl.flags & RFL_BUFFER_STORAGE) { glBufferStorage(mBufferType, mByteSize, NULL, GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT); mBufferPointer = (float*)glMapBufferRange(mBufferType, 0, mByteSize, GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT); @@ -148,7 +148,7 @@ int FLightBuffer::UploadLights(FDynLightData &data) // create the new buffer's storage (twice as large as the old one) mBufferSize *= 2; mByteSize *= 2; - if (gl.flags & RFL_SHADER_STORAGE_BUFFER) + if (gl.flags & RFL_BUFFER_STORAGE) { glBufferStorage(mBufferType, mByteSize, NULL, GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT); mBufferPointer = (float*)glMapBufferRange(mBufferType, 0, mByteSize, GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT); @@ -187,7 +187,7 @@ int FLightBuffer::UploadLights(FDynLightData &data) void FLightBuffer::Begin() { - if (!(gl.flags & RFL_SHADER_STORAGE_BUFFER)) + if (!(gl.flags & RFL_BUFFER_STORAGE)) { glBindBuffer(mBufferType, mBufferId); mBufferPointer = (float*)glMapBufferRange(mBufferType, 0, mByteSize, GL_MAP_WRITE_BIT|GL_MAP_INVALIDATE_BUFFER_BIT); @@ -196,7 +196,7 @@ void FLightBuffer::Begin() void FLightBuffer::Finish() { - if (!(gl.flags & RFL_SHADER_STORAGE_BUFFER)) + if (!(gl.flags & RFL_BUFFER_STORAGE)) { glBindBuffer(mBufferType, mBufferId); glUnmapBuffer(mBufferType); diff --git a/src/gl/scene/gl_scene.cpp b/src/gl/scene/gl_scene.cpp index 93bda9494..afd9259f2 100644 --- a/src/gl/scene/gl_scene.cpp +++ b/src/gl/scene/gl_scene.cpp @@ -346,7 +346,7 @@ void FGLRenderer::RenderScene(int recursion) // if we don't have a persistently mapped buffer, we have to process all the dynamic lights up front, // so that we don't have to do repeated map/unmap calls on the buffer. - if (mLightCount > 0 && gl_fixedcolormap == CM_DEFAULT && gl_lights && !(gl.flags & RFL_SHADER_STORAGE_BUFFER)) + if (mLightCount > 0 && gl_fixedcolormap == CM_DEFAULT && gl_lights && !(gl.flags & RFL_BUFFER_STORAGE)) { GLRenderer->mLights->Begin(); gl_drawinfo->drawlists[GLDL_PLAIN].Draw(GLPASS_LIGHTSONLY); @@ -364,7 +364,7 @@ void FGLRenderer::RenderScene(int recursion) int pass; - if (mLightCount > 0 && gl_fixedcolormap == CM_DEFAULT && gl_lights && (gl.flags & RFL_SHADER_STORAGE_BUFFER)) + if (mLightCount > 0 && gl_fixedcolormap == CM_DEFAULT && gl_lights && (gl.flags & RFL_BUFFER_STORAGE)) { pass = GLPASS_ALL; }