mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-18 01:52:34 +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());
|
FGLDebug::PushGroup(name.GetChars());
|
||||||
|
|
||||||
FGLPostProcessState savedState;
|
FGLPostProcessState savedState;
|
||||||
savedState.SaveTextureBindings(3);
|
|
||||||
|
|
||||||
for (const PPStep &step : hw_postprocess.Effects[name])
|
for (const PPStep &step : hw_postprocess.Effects[name])
|
||||||
{
|
{
|
||||||
// Bind input textures
|
// Bind input textures
|
||||||
for (unsigned int index = 0; index < step.Textures.Size(); index++)
|
for (unsigned int index = 0; index < step.Textures.Size(); index++)
|
||||||
{
|
{
|
||||||
|
savedState.SaveTextureBindings(index + 1);
|
||||||
|
|
||||||
const PPTextureInput &input = step.Textures[index];
|
const PPTextureInput &input = step.Textures[index];
|
||||||
int filter = (input.Filter == PPFilterMode::Nearest) ? GL_NEAREST : GL_LINEAR;
|
int filter = (input.Filter == PPFilterMode::Nearest) ? GL_NEAREST : GL_LINEAR;
|
||||||
int wrap = (input.Wrap == PPWrapMode::Clamp) ? GL_CLAMP : GL_REPEAT;
|
int wrap = (input.Wrap == PPWrapMode::Clamp) ? GL_CLAMP : GL_REPEAT;
|
||||||
|
|
Loading…
Reference in a new issue