Osiris Framework
0.3
|
Class that represents a shader object that make up shader programs. More...
#include <OsirisSDK/OShaderObject.h>
Public Types | |
enum | ShaderType { ShaderType_Vertex =GL_VERTEX_SHADER, ShaderType_Fragment =GL_FRAGMENT_SHADER } |
Shader object type. More... | |
Public Member Functions | |
OShaderObject (const char *shaderName, ShaderType shaderType, const char *source="") | |
Class constructor. More... | |
virtual | ~OShaderObject () |
Class destructor. | |
void | setSource (const char *source) |
Set shader source code. | |
void | setSourceFromResource (int resourceId) |
Set shader source code from DLL resource (WIN32 only). More... | |
GLuint | compile () |
Compiles the shader object code. | |
GLuint | glReference () const |
Returns the OpenGL shader object reference ID. | |
Class that represents a shader object that make up shader programs.
OShaderObject::OShaderObject | ( | const char * | shaderName, |
ShaderType | shaderType, | ||
const char * | source = "" |
||
) |
Class constructor.
shaderName | Shader name. |
shaderType | Shader type. |
source | Shader source code. |
void OShaderObject::setSourceFromResource | ( | int | resourceId | ) |
Set shader source code from DLL resource (WIN32 only).
resourceId | Visual Studio resource file ID. |