Deferred lighting in progress
Now able to dynamically switch between shaders for lights and objects --HG-- extra : convert_revision : svn%3A7752d6cf-9f14-4ad2-affc-04f1e67b81a5/trunk%4046
This commit is contained in:
@@ -47,16 +47,20 @@ using std::vector;
|
||||
|
||||
class KRShaderManager {
|
||||
public:
|
||||
KRShaderManager(const GLchar *szVertShaderSource, const GLchar *szFragShaderSource);
|
||||
KRShaderManager();
|
||||
~KRShaderManager();
|
||||
|
||||
void loadFragmentShader(const std::string &name, const std::string &path);
|
||||
void loadVertexShader(const std::string &name, const std::string &path);
|
||||
|
||||
|
||||
KRShader *getShader(std::string shader_name, KRCamera *pCamera, bool bDiffuseMap, bool bNormalMap, bool bSpecMap, int iShadowQuality, bool bLightMap, bool bDiffuseMapScale,bool bSpecMapScale, bool bNormalMapScale, bool bDiffuseMapOffset, bool bSpecMapOffset, bool bNormalMapOffset, int gBufferPass);
|
||||
|
||||
private:
|
||||
std::map<std::string, KRShader *> m_shaders;
|
||||
|
||||
GLchar *m_szFragShaderSource;
|
||||
GLchar *m_szVertShaderSource;
|
||||
std::map<std::string, std::string> m_fragShaderSource;
|
||||
std::map<std::string, std::string> m_vertShaderSource;
|
||||
|
||||
KRShader *m_pShader;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user