H3D API
2.4.1
|
Update the string to use as shader depending from the urls given. More...
#include <H3D/ShaderPart.h>
Public Member Functions | |
bool | modifyShaderConstants (Field *field) |
Look for a constant with the name matching field->getName(). More... | |
![]() | |
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... | |
![]() | |
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... | |
![]() | |
virtual void | propagateEvent (Field::Event e) |
When the event is propagated the field that created the event is saved. | |
Update the string to use as shader depending from the urls given.
|
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.
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().