Pyrogenesis
13997
|
CShaderProgramFFP allows rendering code to use the shader-based API even if the 'shader' is actually implemented with the fixed-function pipeline instead of anything programmable. More...
Public Member Functions | |
CShaderProgramFFP (int streamflags) | |
~CShaderProgramFFP () | |
virtual void | Reload () |
int | GetUniformIndex (CStrIntern id) |
virtual Binding | GetTextureBinding (uniform_id_t id) |
virtual void | BindTexture (texture_id_t id, Handle tex) |
virtual void | BindTexture (texture_id_t id, GLuint tex) |
virtual void | BindTexture (Binding id, Handle tex) |
virtual Binding | GetUniformBinding (uniform_id_t id) |
virtual void | Uniform (Binding id, float v0, float v1, float v2, float v3) |
virtual void | Uniform (Binding id, const CMatrix3D &v) |
virtual void | Uniform (Binding id, size_t count, const CMatrix3D *v) |
![]() | |
virtual | ~CShaderProgram () |
bool | IsValid () const |
Returns whether this shader was successfully loaded. More... | |
virtual void | Bind ()=0 |
Binds the shader into the GL context. More... | |
virtual void | Unbind ()=0 |
Unbinds the shader from the GL context. More... | |
int | GetStreamFlags () const |
Returns bitset of STREAM_* value, indicating what vertex data streams the vertex shader needs (e.g. More... | |
void | BindTexture (texture_id_t id, CTexturePtr tex) |
void | Uniform (Binding id, int v) |
void | Uniform (Binding id, float v) |
void | Uniform (Binding id, float v0, float v1) |
void | Uniform (Binding id, const CVector3D &v) |
void | Uniform (Binding id, const CColor &v) |
void | Uniform (uniform_id_t id, int v) |
void | Uniform (uniform_id_t id, float v) |
void | Uniform (uniform_id_t id, float v0, float v1) |
void | Uniform (uniform_id_t id, const CVector3D &v) |
void | Uniform (uniform_id_t id, const CColor &v) |
void | Uniform (uniform_id_t id, float v0, float v1, float v2, float v3) |
void | Uniform (uniform_id_t id, const CMatrix3D &v) |
void | Uniform (uniform_id_t id, size_t count, const CMatrix3D *v) |
virtual void | VertexPointer (GLint size, GLenum type, GLsizei stride, void *pointer) |
virtual void | NormalPointer (GLenum type, GLsizei stride, void *pointer) |
virtual void | ColorPointer (GLint size, GLenum type, GLsizei stride, void *pointer) |
virtual void | TexCoordPointer (GLenum texture, GLint size, GLenum type, GLsizei stride, void *pointer) |
virtual void | VertexAttribPointer (attrib_id_t id, GLint size, GLenum type, GLboolean normalized, GLsizei stride, void *pointer) |
virtual void | VertexAttribIPointer (attrib_id_t id, GLint size, GLenum type, GLsizei stride, void *pointer) |
void | AssertPointersBound () |
Checks that all the required vertex attributes have been set. More... | |
Protected Member Functions | |
void | SetUniformIndex (const char *id, int value) |
![]() | |
CShaderProgram (int streamflags) | |
void | BindClientStates () |
void | UnbindClientStates () |
Protected Attributes | |
std::map< CStrIntern, int > | m_UniformIndexes |
![]() | |
bool | m_IsValid |
int | m_StreamFlags |
int | m_ValidStreams |
Additional Inherited Members | |
![]() | |
typedef CStrIntern | attrib_id_t |
typedef CStrIntern | texture_id_t |
typedef CStrIntern | uniform_id_t |
typedef std::pair< int, GLenum > | frag_index_pair_t |
![]() | |
static CShaderProgram * | ConstructARB (const VfsPath &vertexFile, const VfsPath &fragmentFile, const CShaderDefines &defines, const std::map< CStrIntern, int > &vertexIndexes, const std::map< CStrIntern, frag_index_pair_t > &fragmentIndexes, int streamflags) |
Construct based on ARB vertex/fragment program files. More... | |
static CShaderProgram * | ConstructGLSL (const VfsPath &vertexFile, const VfsPath &fragmentFile, const CShaderDefines &defines, const std::map< CStrIntern, int > &vertexAttribs, int streamflags) |
Construct based on GLSL vertex/fragment shader files. More... | |
static CShaderProgram * | ConstructFFP (const std::string &id, const CShaderDefines &defines) |
Construct an instance of a pre-defined fixed-function pipeline setup. More... | |
CShaderProgramFFP allows rendering code to use the shader-based API even if the 'shader' is actually implemented with the fixed-function pipeline instead of anything programmable.
Currently we just hard-code a number of FFP programs as subclasses of this. If we have lots, it might be nicer to abstract out the common functionality and load these from text files or something.
Definition at line 42 of file ShaderProgramFFP.cpp.
|
inline |
Definition at line 45 of file ShaderProgramFFP.cpp.
|
inline |
Definition at line 50 of file ShaderProgramFFP.cpp.
|
inlinevirtual |
Implements CShaderProgram.
Definition at line 76 of file ShaderProgramFFP.cpp.
|
inlinevirtual |
Implements CShaderProgram.
Definition at line 83 of file ShaderProgramFFP.cpp.
Implements CShaderProgram.
Definition at line 93 of file ShaderProgramFFP.cpp.
|
inlinevirtual |
Implements CShaderProgram.
Definition at line 67 of file ShaderProgramFFP.cpp.
|
inlinevirtual |
Implements CShaderProgram.
Definition at line 100 of file ShaderProgramFFP.cpp.
|
inline |
Definition at line 59 of file ShaderProgramFFP.cpp.
|
inlinevirtual |
Implements CShaderProgram.
Definition at line 54 of file ShaderProgramFFP.cpp.
|
inlineprotected |
Definition at line 120 of file ShaderProgramFFP.cpp.
|
inlinevirtual |
Implements CShaderProgram.
Reimplemented in CShaderProgramFFP_ModelSolid, CShaderProgramFFP_ModelColor, CShaderProgramFFP_Model_Base, CShaderProgramFFP_GuiSolid, CShaderProgramFFP_GuiAdd, CShaderProgramFFP_GuiText, and CShaderProgramFFP_OverlayLine.
Definition at line 105 of file ShaderProgramFFP.cpp.
Implements CShaderProgram.
Reimplemented in CShaderProgramFFP_Model_Base, CShaderProgramFFP_Gui_Base, CShaderProgramFFP_GuiText, and CShaderProgramFFP_OverlayLine.
Definition at line 109 of file ShaderProgramFFP.cpp.
|
inlinevirtual |
Implements CShaderProgram.
Definition at line 113 of file ShaderProgramFFP.cpp.
|
protected |
Definition at line 118 of file ShaderProgramFFP.cpp.