Changeset View
Changeset View
Standalone View
Standalone View
source/graphics/ShaderProgram.h
Show All 19 Lines | |||||
#include "graphics/ShaderProgramPtr.h" | #include "graphics/ShaderProgramPtr.h" | ||||
#include "graphics/Texture.h" | #include "graphics/Texture.h" | ||||
#include "lib/ogl.h" | #include "lib/ogl.h" | ||||
#include "lib/file/vfs/vfs_path.h" | #include "lib/file/vfs/vfs_path.h" | ||||
#include "lib/res/handle.h" | #include "lib/res/handle.h" | ||||
#include <map> | #include <map> | ||||
#include <vector> | |||||
struct CColor; | struct CColor; | ||||
class CMatrix3D; | class CMatrix3D; | ||||
class CVector3D; | class CVector3D; | ||||
class CShaderDefines; | class CShaderDefines; | ||||
class CStrIntern; | class CStrIntern; | ||||
// Vertex data stream flags | // Vertex data stream flags | ||||
▲ Show 20 Lines • Show All 152 Lines • ▼ Show 20 Lines | public: | ||||
virtual void VertexAttribIPointer(attrib_id_t id, GLint size, GLenum type, GLsizei stride, const void* pointer); | virtual void VertexAttribIPointer(attrib_id_t id, GLint size, GLenum type, GLsizei stride, const void* pointer); | ||||
/** | /** | ||||
* Checks that all the required vertex attributes have been set. | * Checks that all the required vertex attributes have been set. | ||||
* Call this before calling glDrawArrays/glDrawElements etc to avoid potential crashes. | * Call this before calling glDrawArrays/glDrawElements etc to avoid potential crashes. | ||||
*/ | */ | ||||
void AssertPointersBound(); | void AssertPointersBound(); | ||||
virtual std::vector<VfsPath> GetFileDependencies() const = 0; | |||||
protected: | protected: | ||||
CShaderProgram(int streamflags); | CShaderProgram(int streamflags); | ||||
bool m_IsValid; | bool m_IsValid; | ||||
int m_StreamFlags; | int m_StreamFlags; | ||||
// Non-GLSL client state handling: | // Non-GLSL client state handling: | ||||
void BindClientStates(); | void BindClientStates(); | ||||
void UnbindClientStates(); | void UnbindClientStates(); | ||||
int m_ValidStreams; // which streams have been specified via VertexPointer etc since the last Bind | int m_ValidStreams; // which streams have been specified via VertexPointer etc since the last Bind | ||||
}; | }; | ||||
#endif // INCLUDED_SHADERPROGRAM | #endif // INCLUDED_SHADERPROGRAM |
Wildfire Games · Phabricator