mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-14 08:30:49 +00:00
Fix uninitialized mPipelineTexture and fix BindCurrentTexture using the wrong handle
This commit is contained in:
parent
b1a0108a96
commit
6c5109ec99
1 changed files with 7 additions and 1 deletions
|
@ -65,6 +65,12 @@ CVAR(Bool, gl_renderbuffers, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG);
|
||||||
|
|
||||||
FGLRenderBuffers::FGLRenderBuffers()
|
FGLRenderBuffers::FGLRenderBuffers()
|
||||||
{
|
{
|
||||||
|
for (int i = 0; i < NumPipelineTextures; i++)
|
||||||
|
{
|
||||||
|
mPipelineTexture[i] = 0;
|
||||||
|
mPipelineFB[i] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
glGetIntegerv(GL_FRAMEBUFFER_BINDING, (GLint*)&mOutputFB);
|
glGetIntegerv(GL_FRAMEBUFFER_BINDING, (GLint*)&mOutputFB);
|
||||||
glGetIntegerv(GL_MAX_SAMPLES, &mMaxSamples);
|
glGetIntegerv(GL_MAX_SAMPLES, &mMaxSamples);
|
||||||
}
|
}
|
||||||
|
@ -477,7 +483,7 @@ void FGLRenderBuffers::BindSceneFB()
|
||||||
void FGLRenderBuffers::BindCurrentTexture(int index)
|
void FGLRenderBuffers::BindCurrentTexture(int index)
|
||||||
{
|
{
|
||||||
glActiveTexture(GL_TEXTURE0 + index);
|
glActiveTexture(GL_TEXTURE0 + index);
|
||||||
glBindTexture(GL_TEXTURE_2D, mPipelineFB[mCurrentPipelineTexture]);
|
glBindTexture(GL_TEXTURE_2D, mPipelineTexture[mCurrentPipelineTexture]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
Loading…
Reference in a new issue