mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-12 07:34:50 +00:00
- screwed by the editor's autocompletion... (wrong GL flag was used...)
This commit is contained in:
parent
00d7707aef
commit
a2dc4afe3f
2 changed files with 7 additions and 7 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue