mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-25 05:21:02 +00:00
- fix saved texture bindings to work for any number of binds
This commit is contained in:
parent
5b3212df13
commit
4482ad2b78
1 changed files with 2 additions and 1 deletions
|
@ -839,13 +839,14 @@ void FGLRenderBuffers::RenderEffect(const FString &name)
|
|||
FGLDebug::PushGroup(name.GetChars());
|
||||
|
||||
FGLPostProcessState savedState;
|
||||
savedState.SaveTextureBindings(3);
|
||||
|
||||
for (const PPStep &step : hw_postprocess.Effects[name])
|
||||
{
|
||||
// Bind input textures
|
||||
for (unsigned int index = 0; index < step.Textures.Size(); index++)
|
||||
{
|
||||
savedState.SaveTextureBindings(index + 1);
|
||||
|
||||
const PPTextureInput &input = step.Textures[index];
|
||||
int filter = (input.Filter == PPFilterMode::Nearest) ? GL_NEAREST : GL_LINEAR;
|
||||
int wrap = (input.Wrap == PPWrapMode::Clamp) ? GL_CLAMP : GL_REPEAT;
|
||||
|
|
Loading…
Reference in a new issue