SimpleGL  1.1.0
A framework for platform independent rendering
Public Member Functions | List of all members
sgl::Shader Class Reference

This class wraps an OpenGL shader object. More...

#include <shader_objects.hpp>

Public Member Functions

 Shader (ShaderType type)
 Creates a new shader object with specified type. More...
 
 ~Shader (void)
 Deletes the shader object. More...
 
GLuint getHandle ()
 Returns the handle of the shader object. More...
 
void source (std::string source)
 Sets the source code of the shader object. More...
 
void compile ()
 Compiles the shader object. More...
 
bool getCompileStatus ()
 Checks the compile status of the shader object. More...
 
std::string getInfoLog ()
 Gets the info log of the shader object. More...
 

Detailed Description

This class wraps an OpenGL shader object.

Definition at line 40 of file shader_objects.hpp.

Constructor & Destructor Documentation

sgl::Shader::Shader ( ShaderType  type)

Creates a new shader object with specified type.

Parameters
typeThe shader object type.

Definition at line 21 of file shader_objects.cpp.

sgl::Shader::~Shader ( void  )

Deletes the shader object.

Definition at line 25 of file shader_objects.cpp.

Member Function Documentation

void sgl::Shader::compile ( )

Compiles the shader object.

Definition at line 38 of file shader_objects.cpp.

bool sgl::Shader::getCompileStatus ( )

Checks the compile status of the shader object.

Returns
true if the compilation was successful, else false.

Definition at line 42 of file shader_objects.cpp.

GLuint sgl::Shader::getHandle ( )

Returns the handle of the shader object.

Returns
The handle of the shader object.

Definition at line 29 of file shader_objects.cpp.

std::string sgl::Shader::getInfoLog ( )

Gets the info log of the shader object.

Returns
Information log of the shader object.

Definition at line 48 of file shader_objects.cpp.

void sgl::Shader::source ( std::string  source)

Sets the source code of the shader object.

Parameters
sourceSource code to set.

Definition at line 33 of file shader_objects.cpp.


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