Go to the documentation of this file.
28 #ifndef __UnifiedHighLevelGpuProgram_H__
29 #define __UnifiedHighLevelGpuProgram_H__
142 void load(
bool backgroundThread =
false);
bool getPassSurfaceAndLightStates(void) const
Returns whether a vertex program wants light and material states to be passed through fixed pipeline ...
unsigned long long int ResourceHandle
void destroy(HighLevelGpuProgram *prog)
static CmdDelegate msCmdDelegate
void addDelegateProgram(const String &name)
Adds a new delegate program to the list.
StringVector mDelegateNames
Ordered list of potential delegates.
GpuProgramParametersSharedPtr getDefaultParameters(void)
Get a reference to the default parameters which are to be used for all uses of this program.
void loadFromSource(void)
Virtual method which must be implemented by subclasses, load from mSource.
~UnifiedHighLevelGpuProgram()
bool isLoaded(void) const
Returns true if the Resource has been loaded, false otherwise.
void escalateLoading()
Escalates the loading of a background loaded resource.
void touch(void)
'Touches' the resource to indicate it has been used.
bool isSupported(void) const
Returns whether this program can be supported on the current renderer and hardware.
void doSet(void *target, const String &val)
vector< String >::type StringVector
Defines a program which runs on the GPU such as a vertex or fragment program.
void unloadHighLevelImpl(void)
Internal unload implementation, must be implemented by subclasses.
Factory class for Unified programs.
const String & getLanguage(void) const
Get the name of the language this factory creates programs for.
void setBackgroundLoaded(bool bl)
Tells the resource whether it is background loaded or not.
Interface definition for factories of HighLevelGpuProgram.
bool getPassFogStates(void) const
Returns whether a fragment program wants fog state to be passed through fixed pipeline low level API ...
void reload(void)
Reloads the resource, if it is already loaded.
void resetCompileError(void)
Reset a compile error if it occurred, allowing the load to be retried.
String doGet(const void *target) const
bool isSkeletalAnimationIncluded(void) const
Returns whether a vertex program includes the required instructions to perform skeletal animation.
HighLevelGpuProgramPtr mChosenDelegate
The chosen delegate.
bool isVertexTextureFetchRequired(void) const
Returns whether this vertex program requires support for vertex texture fetch from the hardware.
virtual size_t calculateSize(void) const
Calculate the size of a resource; this will only be called after 'load'.
UnifiedHighLevelGpuProgramFactory()
Abstract class which is command object which gets/sets parameters.
HighLevelGpuProgram * create(ResourceManager *creator, const String &name, ResourceHandle handle, const String &group, bool isManual, ManualResourceLoader *loader)
UnifiedHighLevelGpuProgram(ResourceManager *creator, const String &name, ResourceHandle handle, const String &group, bool isManual=false, ManualResourceLoader *loader=0)
Constructor, should be used only by factory classes.
GpuProgram * _getBindingDelegate(void)
Returns the GpuProgram which should be bound to the pipeline.
bool hasCompileError(void) const
Did this program encounter a compile error when loading?
bool getPassTransformStates(void) const
Returns whether a vertex program wants transform state to be passed through fixed pipeline low level ...
void createLowLevelImpl(void)
Internal method for creating an appropriate low-level program from this high-level program,...
void removeListener(Listener *lis)
Remove a listener on this resource.
LoadingState
Enum identifying the loading state of the resource.
Command object for setting delegate (can set more than once)
Defines a generic resource handler.
const String & getLanguage(void) const
Returns a string that specifies the language of the gpu programs as specified in a material script.
void chooseDelegate() const
Choose the delegate to use.
void buildConstantDefinitions() const
Build the constant definition map, must be overridden.
bool isBackgroundLoaded(void) const
Returns whether this Resource has been earmarked for background loading.
bool hasDefaultParameters(void) const
Returns true if default parameters have been set up.
void addListener(Listener *lis)
Register a listener on this resource.
bool isPoseAnimationIncluded(void) const
Returns whether a vertex program includes the required instructions to perform pose animation.
~UnifiedHighLevelGpuProgramFactory()
const HighLevelGpuProgramPtr & _getDelegate() const
Get the chosen delegate.
bool isLoading() const
Returns whether the resource is currently in the process of background loading.
void load(bool backgroundThread=false)
Loads the resource, if it is not already.
void unload(void)
Unloads the resource; this is not permanent, the resource can be reloaded later if required.
void clearDelegatePrograms()
Remove all delegate programs.
bool isMorphAnimationIncluded(void) const
Returns whether a vertex program includes the required instructions to perform morph animation.
Specialisation of HighLevelGpuProgram which just delegates its implementation to one other high level...
Interface describing a manual resource loader.
Abstract base class representing a high-level program (a vertex or fragment program).
LoadingState getLoadingState() const
Returns the current loading state.
size_t getSize(void) const
Retrieves info about the size of the resource.
bool isReloadable(void) const
Returns true if the Resource is reloadable, false otherwise.
GpuProgramParametersSharedPtr createParameters(void)
Creates a new parameters object compatible with this program definition.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.