1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-07 03:13:49 +00:00

CombinerProgram cleanup

This commit is contained in:
Sergey Lipskiy 2017-01-10 18:15:35 +07:00
parent dd57479838
commit d1ad4538f3
2 changed files with 3 additions and 7 deletions

View File

@ -11,21 +11,18 @@ namespace graphics {
virtual ~CombinerProgram() {} virtual ~CombinerProgram() {}
virtual void activate() = 0; virtual void activate() = 0;
virtual void update(bool _force) = 0; virtual void update(bool _force) = 0;
virtual CombinerKey getKey() const = 0; virtual CombinerKey getKey() const = 0;
virtual bool usesTexture() const = 0; virtual bool usesTexture() const = 0;
virtual bool usesTile(u32 _t) const = 0; virtual bool usesTile(u32 _t) const = 0;
virtual bool usesShade() const = 0; virtual bool usesShade() const = 0;
virtual bool usesLOD() const = 0; virtual bool usesLOD() const = 0;
// TODO implement
void disableBlending() {}
void updateFrameBufferInfo(bool _bForce = false) {}
virtual bool getBinaryForm(std::vector<char> & _buffer) = 0; virtual bool getBinaryForm(std::vector<char> & _buffer) = 0;
static void getShaderCombinerOptionsSet(std::vector<u32> & _vecOptions); static void getShaderCombinerOptionsSet(std::vector<u32> & _vecOptions);
}; };
typedef std::map<CombinerKey, graphics::CombinerProgram *> Combiners; typedef std::map<CombinerKey, graphics::CombinerProgram *> Combiners;
} }

View File

@ -1146,7 +1146,6 @@ void OGLRender::_updateTextures(RENDER_STATE _renderState) const
else else
textureCache().activateDummy(t); textureCache().activateDummy(t);
} }
pCurrentCombiner->updateFrameBufferInfo();
} }
gDP.changed &= ~(CHANGED_TILE | CHANGED_TMEM); gDP.changed &= ~(CHANGED_TILE | CHANGED_TMEM);
gSP.changed &= ~(CHANGED_TEXTURE); gSP.changed &= ~(CHANGED_TEXTURE);
@ -1670,7 +1669,7 @@ bool texturedRectPaletteMod(const OGLRender::TexturedRectParams & _params)
curTile.frameBuffer = nullptr; curTile.frameBuffer = nullptr;
curTile.textureMode = TEXTUREMODE_NORMAL; curTile.textureMode = TEXTUREMODE_NORMAL;
textureCache().update(0); textureCache().update(0);
currentCombiner()->updateFrameBufferInfo(); currentCombiner()->update(false);
} }
return false; return false;
} }