scg3  0.6
scg::OGLConstants Class Reference

OpenGL attribute names and locations, uniform names, etc., to be used by ShaderCore, ShaderCoreFactory, and GeometryCore. More...

#include "scg_internals.h"

Collaboration diagram for scg::OGLConstants:
[legend]

Static Public Member Functions

static void bindAttribFragDataLocations (GLuint program)
 
static void bindUniformBlocks (GLuint program)
 
static void bindSamplers (GLuint program)
 

Static Public Attributes

static const OGLAttrib VERTEX = { "vVertex", 0 }
 
static const OGLAttrib COLOR = { "vColor", 1 }
 
static const OGLAttrib NORMAL = { "vNormal", 2 }
 
static const OGLAttrib TEX_COORD_0 = { "vTexCoord0", 3 }
 
static const OGLAttrib TEX_COORD_1 = { "vTexCoord1", 4 }
 
static const OGLAttrib TANGENT = { "vTangent", 5 }
 
static const OGLAttrib BINORMAL = { "vBinormal", 6 }
 
static const OGLFragData FRAG_COLOR = { "fragColor", 0 }
 
static const OGLUniformBlock LIGHT = { "LightBlock", 0 }
 
static const OGLUniformBlock MATERIAL = { "MaterialBlock", 1 }
 
static const char * MODEL_VIEW_MATRIX = "modelViewMatrix"
 
static const char * PROJECTION_MATRIX = "projectionMatrix"
 
static const char * MVP_MATRIX = "mvpMatrix"
 
static const char * NORMAL_MATRIX = "normalMatrix"
 
static const char * TEXTURE_MATRIX = "textureMatrix"
 
static const char * COLOR_MATRIX = "colorMatrix"
 
static const char * N_LIGHTS = "nLights"
 
static const char * GLOBAL_AMBIENT_LIGHT = "globalAmbientLight"
 
static const char * TIME = "time"
 
static const OGLSampler TEXTURE0 = { "texture0", 0 }
 
static const OGLSampler TEXTURE1 = { "texture1", 1 }
 
static const int MAX_NUMBER_OF_LIGHTS = 10
 

Detailed Description

OpenGL attribute names and locations, uniform names, etc., to be used by ShaderCore, ShaderCoreFactory, and GeometryCore.

Definition at line 263 of file scg_internals.h.

Member Function Documentation

◆ bindAttribFragDataLocations()

void scg::OGLConstants::bindAttribFragDataLocations ( GLuint  program)
static

Bind standard attribute and fragment data locations defined above, to be called by ShaderCoreFactory.

Definition at line 59 of file scg_internals.cpp.

◆ bindSamplers()

void scg::OGLConstants::bindSamplers ( GLuint  program)
static

Bind uniform sampler texture units defined above, to be called by ShaderCoreFactory.

Definition at line 88 of file scg_internals.cpp.

◆ bindUniformBlocks()

void scg::OGLConstants::bindUniformBlocks ( GLuint  program)
static

Bind uniform block indices defined above, to be called by ShaderCoreFactory.

Definition at line 74 of file scg_internals.cpp.

Member Data Documentation

◆ BINORMAL

const OGLAttrib scg::OGLConstants::BINORMAL = { "vBinormal", 6 }
static

Definition at line 294 of file scg_internals.h.

◆ COLOR

const OGLAttrib scg::OGLConstants::COLOR = { "vColor", 1 }
static

Definition at line 289 of file scg_internals.h.

◆ COLOR_MATRIX

const char * scg::OGLConstants::COLOR_MATRIX = "colorMatrix"
static

Definition at line 309 of file scg_internals.h.

◆ FRAG_COLOR

const OGLFragData scg::OGLConstants::FRAG_COLOR = { "fragColor", 0 }
static

Definition at line 297 of file scg_internals.h.

◆ GLOBAL_AMBIENT_LIGHT

const char * scg::OGLConstants::GLOBAL_AMBIENT_LIGHT = "globalAmbientLight"
static

Definition at line 311 of file scg_internals.h.

◆ LIGHT

const OGLUniformBlock scg::OGLConstants::LIGHT = { "LightBlock", 0 }
static

Definition at line 300 of file scg_internals.h.

◆ MATERIAL

const OGLUniformBlock scg::OGLConstants::MATERIAL = { "MaterialBlock", 1 }
static

Definition at line 301 of file scg_internals.h.

◆ MAX_NUMBER_OF_LIGHTS

const int scg::OGLConstants::MAX_NUMBER_OF_LIGHTS = 10
static

Definition at line 319 of file scg_internals.h.

◆ MODEL_VIEW_MATRIX

const char * scg::OGLConstants::MODEL_VIEW_MATRIX = "modelViewMatrix"
static

Definition at line 304 of file scg_internals.h.

◆ MVP_MATRIX

const char * scg::OGLConstants::MVP_MATRIX = "mvpMatrix"
static

Definition at line 306 of file scg_internals.h.

◆ N_LIGHTS

const char * scg::OGLConstants::N_LIGHTS = "nLights"
static

Definition at line 310 of file scg_internals.h.

◆ NORMAL

const OGLAttrib scg::OGLConstants::NORMAL = { "vNormal", 2 }
static

Definition at line 290 of file scg_internals.h.

◆ NORMAL_MATRIX

const char * scg::OGLConstants::NORMAL_MATRIX = "normalMatrix"
static

Definition at line 307 of file scg_internals.h.

◆ PROJECTION_MATRIX

const char * scg::OGLConstants::PROJECTION_MATRIX = "projectionMatrix"
static

Definition at line 305 of file scg_internals.h.

◆ TANGENT

const OGLAttrib scg::OGLConstants::TANGENT = { "vTangent", 5 }
static

Definition at line 293 of file scg_internals.h.

◆ TEX_COORD_0

const OGLAttrib scg::OGLConstants::TEX_COORD_0 = { "vTexCoord0", 3 }
static

Definition at line 291 of file scg_internals.h.

◆ TEX_COORD_1

const OGLAttrib scg::OGLConstants::TEX_COORD_1 = { "vTexCoord1", 4 }
static

Definition at line 292 of file scg_internals.h.

◆ TEXTURE0

const OGLSampler scg::OGLConstants::TEXTURE0 = { "texture0", 0 }
static

Definition at line 315 of file scg_internals.h.

◆ TEXTURE1

const OGLSampler scg::OGLConstants::TEXTURE1 = { "texture1", 1 }
static

Definition at line 316 of file scg_internals.h.

◆ TEXTURE_MATRIX

const char * scg::OGLConstants::TEXTURE_MATRIX = "textureMatrix"
static

Definition at line 308 of file scg_internals.h.

◆ TIME

const char * scg::OGLConstants::TIME = "time"
static

Definition at line 312 of file scg_internals.h.

◆ VERTEX

const OGLAttrib scg::OGLConstants::VERTEX = { "vVertex", 0 }
static

Definition at line 288 of file scg_internals.h.


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