Osiris Framework  0.3
OShaderObject Class Reference

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.
 

Detailed Description

Class that represents a shader object that make up shader programs.

Member Enumeration Documentation

Shader object type.

Enumerator
ShaderType_Vertex 

Vertex shader.

ShaderType_Fragment 

Fragment shader.

Constructor & Destructor Documentation

OShaderObject::OShaderObject ( const char *  shaderName,
ShaderType  shaderType,
const char *  source = "" 
)

Class constructor.

Parameters
shaderNameShader name.
shaderTypeShader type.
sourceShader source code.

Member Function Documentation

void OShaderObject::setSourceFromResource ( int  resourceId)

Set shader source code from DLL resource (WIN32 only).

Parameters
resourceIdVisual Studio resource file ID.

The documentation for this class was generated from the following files: