H3D API  2.4.1
Classes | Namespaces | Functions
ShaderFunctions.h File Reference

Header file for help functions used by shader nodes. More...

#include <H3D/H3DDynamicFieldsObject.h>
#include <GL/glew.h>
#include <H3D/H3DSingleTextureNode.h>
#include <Cg/cg.h>
#include <Cg/cgGL.h>

Go to the source code of this file.

Classes

class  H3D::SFUniform< SF >
 template class to provide value change checking after update for SField More...
 

Namespaces

 H3D
 H3D API namespace.
 

Functions

bool H3DAPI_API H3D::Shaders::setCGUniformVariableValue (CGprogram program_handle, Field *field)
 Set the value of a uniform variable in the given CG shader. More...
 
bool H3DAPI_API H3D::Shaders::setGLSLUniformVariableValue (GLhandleARB program_handle, Field *field, UniformInfo *ui=NULL, bool force=false)
 Set the value of a uniform variable in the given GLSL shader. More...
 

Detailed Description

Header file for help functions used by shader nodes.

Function Documentation

◆ setCGUniformVariableValue()

bool H3D::Shaders::setCGUniformVariableValue ( CGprogram  program_handle,
Field field 
)

Set the value of a uniform variable in the given CG shader.

The name of the uniform variable is the same as the name of the field.

References H3D::Shaders::setCGUniformVariableValue().

Referenced by H3D::Shaders::setCGUniformVariableValue().

◆ setGLSLUniformVariableValue()

bool H3D::Shaders::setGLSLUniformVariableValue ( GLhandleARB  program_handle,
Field field,
UniformInfo *  ui = NULL,
bool  force = false 
)

Set the value of a uniform variable in the given GLSL shader.

The name of the uniform variable is the same as the name of the field.

Parameters
program_handleThe handle to the shader of which to set the uniform.
fieldThe field that will control changes to the uniform.
uiA struct containing information about the uniform.
forceIf true, then the uniform value is always set even if the field value has not changed.

References H3D::Shaders::setGLSLUniformVariableValue().

Referenced by H3D::Shaders::setGLSLUniformVariableValue().