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

Make ShaderProgram descendant of CombinerProgram.

This commit is contained in:
Sergey Lipskiy 2017-01-13 17:52:33 +07:00
parent 52aa260153
commit 4b2aef86da
2 changed files with 17 additions and 4 deletions

View File

@ -290,14 +290,18 @@ void CombinerInfo::updateParameters()
void CombinerInfo::setDepthFogCombiner()
{
if (m_shadowmapProgram)
if (m_shadowmapProgram) {
m_shadowmapProgram->activate();
m_pCurrent = m_shadowmapProgram.get();
}
}
void CombinerInfo::setMonochromeCombiner()
{
if (m_monochromeProgram)
if (m_monochromeProgram) {
m_monochromeProgram->activate();
m_pCurrent = m_monochromeProgram.get();
}
}
void CombinerInfo::setPolygonMode(OGLRender::RENDER_STATE _renderState)

View File

@ -1,13 +1,22 @@
#pragma once
#include <Types.h>
#include "CombinerProgram.h"
namespace graphics {
class ShaderProgram
class ShaderProgram : public CombinerProgram
{
public:
virtual ~ShaderProgram() {}
virtual void activate() = 0;
void update(bool _force) override {}
CombinerKey getKey() const override {return CombinerKey();}
bool usesTexture() const override {return true;}
virtual bool usesTile(u32 _t) const override {return _t == 0 ? true : false;}
virtual bool usesShade() const override {return false;}
virtual bool usesLOD() const override {return false;}
virtual bool usesHwLighting() const override {return false;}
virtual bool getBinaryForm(std::vector<char> & _buffer) override {return false;}
};
class TexDrawerShaderProgram : public ShaderProgram