33 #if defined(TARGET_OS_IOS)
35 typedef std::map<string, int>
SLLocMap;
59 const string& vertShaderFile,
60 const string& fragShaderFile,
61 const string& geomShaderFile =
"",
62 const string& programName =
"");
69 void initTF(
const char* writeBackAttrib[],
int size);
118 GLboolean transpose =
false)
const;
122 GLboolean transpose =
false)
const;
126 GLboolean transpose =
false)
const;
130 GLboolean transpose =
false)
const;
134 GLboolean transpose =
false)
const;
138 GLboolean transpose =
false)
const;
std::map< string, int > SLLocMap
vector< SLGLShader * > SLVGLShader
STL vector type for SLGLShader pointers.
vector< SLGLProgram * > SLVGLProgram
STL vector of SLGLProgram pointers.
Singleton class for global render state.
vector< SLLight * > SLVLight
STL vector of light pointers.
Toplevel holder of the assets meshes, materials, textures and shaders.
Active or visible camera node class.
Encapsulation of an OpenGL shader program object.
SLint uniformMatrix4fv(const SLchar *name, SLsizei count, const SLfloat *value, GLboolean transpose=false) const
Passes a 4x4 float matrix values py pointer to the uniform variable "name".
SLint uniform4fv(const SLchar *name, SLsizei count, const SLfloat *value) const
Passes 4 float values py pointer to the uniform variable "name".
void deleteDataGpu()
Delete all Gpu data.
SLint uniform4f(const SLchar *name, SLfloat v0, SLfloat v1, SLfloat v2, SLfloat v3) const
Passes the float values v0,v1,v2 & v3 to the uniform variable "name".
SLint uniform3fv(const SLchar *name, SLsizei count, const SLfloat *value) const
Passes 3 float values py pointer to the uniform variable "name".
virtual void beginShader(SLCamera *cam, SLMaterial *mat, SLVLight *lights)=0
starter for derived classes
SLint uniform3i(const SLchar *name, SLint v0, SLint v1, SLint v2) const
Passes the int values v0, v1 & v2 to the uniform variable "name".
SLint uniform2iv(const SLchar *name, SLsizei count, const SLint *value) const
Passes 2 int values py pointer to the uniform variable "name".
SLint uniform3iv(const SLchar *name, SLsizei count, const SLint *value) const
Passes 3 int values py pointer to the uniform variable "name".
SLint uniformMatrix3fv(const SLchar *name, SLsizei count, const SLfloat *value, GLboolean transpose=false) const
Passes a 3x3 float matrix values py pointer to the uniform variable "name".
SLint uniform2fv(const SLchar *name, SLsizei count, const SLfloat *value) const
Passes 2 float values py pointer to the uniform variable "name".
SLint uniform1f(const SLchar *name, SLfloat v0) const
Passes the float value v0 to the uniform variable "name".
void initTF(const char *writeBackAttrib[], int size)
void beginUse(SLCamera *cam, SLMaterial *mat, SLVLight *lights)
void addShader(SLGLShader *shader)
SLGLProgram::addShader adds a shader to the shader list.
SLint uniform2f(const SLchar *name, SLfloat v0, SLfloat v1) const
Passes the float values v0 & v1 to the uniform variable "name".
void addUniform1i(SLGLUniform1i *u)
add int uniform
SLuint _progID
OpenGL shader program object ID.
SLint uniform1fv(const SLchar *name, SLsizei count, const SLfloat *value) const
Passes 1 float value py pointer to the uniform variable "name".
SLint getUniformLocation(const SLchar *name) const
SLVUniform1f _uniforms1f
Vector of uniform1f variables.
void addUniform1f(SLGLUniform1f *u)
add float uniform
SLint uniform3f(const SLchar *name, SLfloat v0, SLfloat v1, SLfloat v2) const
Passes the float values v0, v1 & v2 to the uniform variable "name".
SLint uniformMatrix2fv(const SLchar *name, SLsizei count, const SLfloat *value, GLboolean transpose=false) const
Passes a 2x2 float matrix values py pointer to the uniform variable "name".
SLVGLShader _shaders
Vector of all shader objects.
void init(SLVLight *lights)
SLint passLightsToUniforms(SLVLight *lights, SLuint nextTexUnit) const
SLint uniform1iv(const SLchar *name, SLsizei count, const SLint *value) const
Passes 1 int value py pointer to the uniform variable "name".
SLVUniform1i _uniforms1i
Vector of uniform1i variables.
SLint uniform1i(const SLchar *name, SLint v0) const
Passes the int values v0 to the uniform variable "name".
virtual void endShader()=0
SLint uniform2i(const SLchar *name, SLint v0, SLint v1) const
Passes the int values v0 & v1 to the uniform variable "name".
SLint uniform4iv(const SLchar *name, GLsizei count, const SLint *value) const
Passes 4 int values py pointer to the uniform variable "name".
SLbool _isLinked
Flag if program is linked.
SLGLProgram(SLAssetManager *am, const string &vertShaderFile, const string &fragShaderFile, const string &geomShaderFile="", const string &programName="")
Ctor with a vertex and a fragment shader filename.
void endUse()
SLGLProgram::endUse stops the shader program.
SLint uniform4i(const SLchar *name, SLint v0, SLint v1, SLint v2, SLint v3) const
Passes the int values v0, v1, v2 & v3 to the uniform variable "name".
Encapsulation of an OpenGL shader object.
Singleton class holding all OpenGL states.
Defines a standard CG material with textures and a shader program.
Base class for all other classes.
const SLstring & name() const
The SLScene class represents the top level instance holding the scene structure.
Skybox node class with a SLBox mesh.
V3 v3(float x, float y, float z)