mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
add new programs for various gpu render tasks, and some more uniform
setter
This commit is contained in:
parent
a477540358
commit
bcb5f0ca8d
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
};
|
Loading…
Reference in a new issue