add new programs for various gpu render tasks, and some more uniform

setter
This commit is contained in:
Jupeyy 2017-09-12 20:09:40 +02:00
parent a477540358
commit bcb5f0ca8d
2 changed files with 36 additions and 2 deletions

View file

@ -45,6 +45,10 @@ void CGLSLProgram::SetUniformVec4(int Loc, int Count, const float* Value) {
glUniform4fv(Loc, Count, Value);
}
void CGLSLProgram::SetUniformVec2(int Loc, int Count, const float* Value) {
glUniform2fv(Loc, Count, Value);
}
void CGLSLProgram::SetUniform(int Loc, const int Value) {
glUniform1i(Loc, Value);
}

View file

@ -18,6 +18,7 @@ public:
void DetachShader(CGLSL* pShader);
//Support various types
void SetUniformVec2(int Loc, int Count, const float* Value);
void SetUniformVec4(int Loc, int Count, const float* Value);
void SetUniform(int Loc, const int Value);
void SetUniform(int Loc, const unsigned int Value);
@ -35,10 +36,39 @@ protected:
bool m_IsLinked;
};
class CGLSLQuadProgram : public CGLSLProgram {
public:
class CGLSLTWProgram : public CGLSLProgram {
public:
int m_LocPos;
int m_LocIsTextured;
int m_LocTextureSampler;
};
class CGLSLQuadProgram : public CGLSLTWProgram {
public:
};
class CGLSLPrimitiveProgram : public CGLSLTWProgram {
public:
};
class CGLSLTileProgram : public CGLSLTWProgram {
public:
int m_LocColor;
int m_LocZoomFactor;
};
class CGLSLBorderTileProgram : public CGLSLTileProgram {
public:
int m_LocOffset;
int m_LocDir;
int m_LocNum;
int m_LocJumpIndex;
};
class CGLSLBorderTileLineProgram : public CGLSLTileProgram {
public:
int m_LocDir;
int m_LocNum;
};