gKitGL
 All Classes Namespaces Functions Variables Typedefs Enumerator Friends
Public Types | Public Member Functions | Static Public Attributes | Protected Attributes
gk::GLShaderObject Class Reference

utilisation interne. abstraction d'un shader object, ressource openGL. More...

#include <GLShaderObject.h>

Inheritance diagram for gk::GLShaderObject:
gk::GLResource gk::GLControlShader gk::GLEvaluationShader gk::GLFragmentShader gk::GLGeometryShader gk::GLVertexShader

List of all members.

Public Types

enum  {
  VERTEX = 0, FRAGMENT, GEOMETRY, CONTROL,
  EVALUATION, SHADERTYPE_LAST
}
 types de shaders. More...

Public Member Functions

 GLShaderObject (const unsigned int type)
 constructeur,
virtual ~GLShaderObject ()
 destructeur.
int pushDefinition (const std::string &definition, const std::string &value="")
 ajoute une definition au source. "#define 'definition' 'value'".
int setDefinitions (const std::vector< std::string > &definitions)
 remplace l'ensemble de definitions.
const std::vector< std::string > * definitions ()
 renvoie les definitions.
int pushSource (const TextFile *text)
 ajoute le contenu d'un fichier source.
TextFilesource () const
 renvoie le source du shader.
void printSource () const
 affiche les sources du shader.
void printErrors ()
 affiche les erreurs de compilation du shader.
int createGLResource ()
 cree l'objet openGL.
int releaseGLResource ()
 detruit l'objet openGL.
int clear ()
 reinitialise l'etat du shader.
bool errors () const
 renvoie vrai ou faux, si erreurs de lecture du source.
unsigned int type () const
 renvoie le type du shader.
GLuint name () const
 renvoie l'identifiant de l'objet openGL.

Static Public Attributes

static GLenum ShaderType []
static const char * ShaderTypeString []

Protected Attributes

TextFilem_text
unsigned int m_type
bool m_errors
GLuint m_name

Detailed Description

utilisation interne. abstraction d'un shader object, ressource openGL.


Member Enumeration Documentation

anonymous enum

types de shaders.

Enumerator:
VERTEX 

type d'un vertex shader,

FRAGMENT 

type d'un fragment shader,

GEOMETRY 

type d'un geometry shader,

CONTROL 

type d'un control shader,

EVALUATION 

type d'un evaluation shader.


Constructor & Destructor Documentation

gk::GLShaderObject::GLShaderObject ( const unsigned int  type)

constructeur,

Parameters:
typecorrespond a une contante gk::GLShaderObject::VERTEX, etc.

Member Data Documentation

GLenum gk::GLShaderObject::ShaderType [static]
Initial value:
 {
    GL_VERTEX_SHADER,
    GL_FRAGMENT_SHADER,
    GL_GEOMETRY_SHADER,
    GL_TESS_CONTROL_SHADER,
    GL_TESS_EVALUATION_SHADER,
    0
}
const char * gk::GLShaderObject::ShaderTypeString [static]
Initial value:
 {
    "vertex",
    "fragment",
    "geometry",
    "control",
    "evaluation",
    ""
}

The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerator Friends