H3D API  2.4.1
Public Member Functions | Protected Member Functions | List of all members
H3D::ShaderPart::SFShaderString Class Reference

Update the string to use as shader depending from the urls given. More...

#include <H3D/ShaderPart.h>

Inheritance diagram for H3D::ShaderPart::SFShaderString:
Inheritance graph

Public Member Functions

bool modifyShaderConstants (Field *field)
 Look for a constant with the name matching field->getName(). More...
 
- Public Member Functions inherited from H3D::EventCollectingField< FieldType >
virtual void upToDate ()
 Check that the field is up-to-date, if not update() is called to make it up-to-date. More...
 
bool hasCausedEvent (Field *f)
 Returns true if the Field given has generated an event to this field since the last call to the update() function.
 
size_t nrPendingEvents ()
 Returns the number of input fields that has generated an event to this field since the last call to the update() function.
 
template<class FieldType2 >
bool hasCausedEvent (H3DUniquePtr< FieldType2 > &f)
 Returns true if the Field given has generated an event to this field since the last call to the update() function.
 

Protected Member Functions

virtual bool doFullRebuild ()
 Virtual function that will trigger a full rebuild of the shader string if it returns true. More...
 
- Protected Member Functions inherited from H3D::TypedField< EventCollectingField< SFString >, Types< MFString, SFBool >, AnyNumber< Field > >
void checkFieldType (Field *f, int index)
 Function for checking that a field is of a correct type given type specification according to the TypedField template arguments. More...
 
void checkTemplateArguments ()
 Function for checking that a field given TypedField type specification is valid. More...
 
- Protected Member Functions inherited from H3D::EventCollectingField< FieldType >
virtual void propagateEvent (Field::Event e)
 When the event is propagated the field that created the event is saved.
 

Detailed Description

Update the string to use as shader depending from the urls given.

Member Function Documentation

◆ doFullRebuild()

bool ShaderPart::SFShaderString::doFullRebuild ( )
protectedvirtual

Virtual function that will trigger a full rebuild of the shader string if it returns true.

If it returns false only parts that have changed will be updated in place in the current shader string.

References H3D::ShaderPart::forceReload, H3D::EventCollectingField< FieldType >::hasCausedEvent(), and H3D::X3DUrlObject::url.

◆ modifyShaderConstants()

bool H3D::ShaderPart::SFShaderString::modifyShaderConstants ( Field field)

Look for a constant with the name matching field->getName().

Then replace the value of that constant with the value of field->getValue(). Returns true on success.

References H3D::Field::getName().


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