Initial removal of Nvidia CG. Still some more cleanup to go

This commit is contained in:
Ryan Houdek
2012-12-24 11:09:52 -06:00
parent cf8f936abb
commit 9209253e0d
28 changed files with 197 additions and 2570 deletions

View File

@ -29,18 +29,14 @@ namespace OGL
struct VERTEXSHADER
{
VERTEXSHADER() : glprogid(0), bGLSL(0) {}
VERTEXSHADER() : glprogid(0) {}
void Destroy()
{
if (bGLSL)
glDeleteShader(glprogid);
else
glDeleteProgramsARB(1, &glprogid);
glDeleteShader(glprogid);
glprogid = 0;
}
GLuint glprogid; // opengl program id
bool bGLSL;
std::string strprog;
};
@ -73,23 +69,7 @@ public:
static VERTEXSHADER* SetShader(u32 components);
static bool CompileVertexShader(VERTEXSHADER& ps, const char* pstrprogram);
static void SetCurrentShader(GLuint Shader);
static void DisableShader();
};
// GLSL Specific
void SetGLSLVSConstant4f(unsigned int const_number, float f1, float f2, float f3, float f4);
void SetGLSLVSConstant4fv(unsigned int const_number, const float *f);
void SetMultiGLSLVSConstant4fv(unsigned int const_number, unsigned int count, const float *f);
void SetMultiGLSLVSConstant3fv(unsigned int const_number, unsigned int count, const float *f);
bool CompileGLSLVertexShader(VERTEXSHADER& vs, const char* pstrprogram);
// CG Specific
void SetCGVSConstant4f(unsigned int const_number, float f1, float f2, float f3, float f4);
void SetCGVSConstant4fv(unsigned int const_number, const float *f);
void SetMultiCGVSConstant4fv(unsigned int const_number, unsigned int count, const float *f);
void SetMultiCGVSConstant3fv(unsigned int const_number, unsigned int count, const float *f);
bool CompileCGVertexShader(VERTEXSHADER& vs, const char* pstrprogram);
} // namespace OGL
#endif // _VERTEXSHADERCACHE_H_