H3D API  2.4.1
Classes | Public Member Functions | Static Public Attributes | Static Protected Attributes | List of all members
H3D::X3DProgrammableShaderObject Class Reference

This abstract node type is the base type for all node types that specify arbitrary fields for interfacing with per-object attribute values. More...

#include <H3D/X3DProgrammableShaderObject.h>

Inheritance diagram for H3D::X3DProgrammableShaderObject:
Inheritance graph

Classes

class  UpdateTextures
 For bindless textures handle the updating of the textures list of all shader fields that contain the texture. More...
 

Public Member Functions

 X3DProgrammableShaderObject (H3DNodeDatabase *_database)
 Constructor.
 
virtual bool addField (const string &name, const Field::AccessType &access, Field *field)
 Add a shader field uniform.
 
virtual bool removeField (const string &_name)
 Remove a shader field uniform.
 
virtual void clearFields ()
 Remove all dynamic fields that have been previously added.
 
virtual ~X3DProgrammableShaderObject ()
 Destructor.
 
- Public Member Functions inherited from H3D::H3DDynamicFieldsObject
field_iterator firstField ()
 Get an iterator to the first of the dynamic fields.
 
field_iterator endField ()
 Get an iterator pointing to the end of the dynamic fields.
 
 H3DDynamicFieldsObject ()
 Constructor.
 

Static Public Attributes

static bool use_bindless_textures = false
 True if we should use bindless textures.
 

Static Protected Attributes

static bool use_bindless_textures_set = false
 True if use_bindless_textures has already be set once.
 

Detailed Description

This abstract node type is the base type for all node types that specify arbitrary fields for interfacing with per-object attribute values.

A concrete X3DProgrammableShaderObject node instance is used to program behaviour for a shader in a scene. The shader is able to receive and process events that are sent to it. Each event that can be received shall be declared in the shader node using the same field syntax as is used in a prototype definition:

inputOnly type name

The type can be any of the standard X3D fields. Name shall be an identifier that is unique for this shader node and is used to map the value to the shader program's uniform variable of the same name. If a shader program does not have a matching uniform variable, the field value is ignored.

outputOnly fields are not required to generate output events from a shader. Current hardware shader technology does not support this capability, though future versions may.

It is recommended that user-defined field or event names defined in shader nodes follow the naming conventions described in ISO/IEC 19775-2.


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