Go to the documentation of this file.
28 #ifndef __GpuProgram_H_
29 #define __GpuProgram_H_
262 { mSkeletalAnimation = included; }
279 { mMorphAnimation = included; }
289 { mPoseAnimation = poseCount; }
unsigned long long int ResourceHandle
virtual bool isVertexTextureFetchRequired(void) const
Returns whether this vertex program requires support for vertex texture fetch from the hardware.
virtual const String & getManualNamedConstantsFile() const
Gets the name of a file from which to load named parameters mapping for a program which would not be ...
void doSet(void *target, const String &val)
GpuLogicalBufferStructPtr mFloatLogicalToPhysical
Record of logical to physical buffer maps.
Struct collecting together the information for named constants.
bool mLoadFromFile
Whether we need to load source from file or not.
String doGet(const void *target) const
virtual void resetCompileError(void)
Reset a compile error if it occurred, allowing the load to be retried.
virtual void setManualNamedConstants(const GpuNamedConstants &namedConstants)
Allows you to manually provide a set of named parameter mappings to a program which would not be able...
static CmdManualNamedConstsFile msManNamedConstsFileCmd
virtual void setSourceFile(const String &filename)
Sets the filename of the source assembly for this program.
bool mCompileError
Did we encounter a compilation error?
virtual const String & getSourceFile(void) const
Gets the name of the file used as source for this program.
virtual const String & getSyntaxCode(void) const
Gets the syntax code for this program e.g.
String mSource
The assembler source of the program (may be blank until file loaded)
void setupBaseParamDictionary(void)
Internal method for setting up the basic parameter definitions for a subclass.
virtual bool getPassSurfaceAndLightStates(void) const
Returns whether a vertex program wants light and material states to be passed through fixed pipeline ...
static CmdSyntax msSyntaxCmd
static CmdMorph msMorphCmd
Defines a program which runs on the GPU such as a vertex or fragment program.
void doSet(void *target, const String &val)
static CmdSkeletal msSkeletalCmd
bool mNeedsAdjacencyInfo
Does this (geometry) program require adjacency information?
virtual bool isMorphAnimationIncluded(void) const
Returns whether a vertex program includes the required instructions to perform morph animation.
virtual void setSkeletalAnimationIncluded(bool included)
Sets whether a vertex program includes the required instructions to perform skeletal animation.
virtual const String & getLanguage(void) const
Returns a string that specifies the language of the gpu programs as specified in a material script.
virtual GpuProgramParametersSharedPtr getDefaultParameters(void)
Get a reference to the default parameters which are to be used for all uses of this program.
String doGet(const void *target) const
GpuLogicalBufferStructPtr mDoubleLogicalToPhysical
Record of logical to physical buffer maps.
String doGet(const void *target) const
void doSet(void *target, const String &val)
String doGet(const void *target) const
void createNamedParameterMappingStructures(bool recreateIfExists=true) const
Create the internal params named mapping structures.
String doGet(const void *target) const
virtual GpuProgramParametersSharedPtr createParameters(void)
Creates a new parameters object compatible with this program definition.
virtual void setSource(const String &source)
Sets the source assembly for this program from an in-memory string.
virtual size_t calculateSize(void) const
Calculate the size of a resource; this will only be called after 'load'.
virtual bool isSkeletalAnimationIncluded(void) const
Returns whether a vertex program includes the required instructions to perform skeletal animation.
bool mLoadedManualNamedConstants
GpuLogicalBufferStructPtr mIntLogicalToPhysical
Record of logical to physical buffer maps.
GpuProgram(ResourceManager *creator, const String &name, ResourceHandle handle, const String &group, bool isManual=false, ManualResourceLoader *loader=0)
virtual const GpuNamedConstants & getConstantDefinitions() const
Get the full list of named constants.
virtual void setType(GpuProgramType t)
Set the program type (only valid before load)
Abstract class which is command object which gets/sets parameters.
GpuProgramType
Enumerates the types of programs which can run on the GPU.
virtual void loadFromSource(void)=0
Virtual method which must be implemented by subclasses, load from mSource.
String mSyntaxCode
Syntax code e.g. arbvp1, vs_2_0 etc.
virtual bool isAdjacencyInfoRequired(void) const
Returns whether this geometry program requires adjacency information from the input primitives.
void doSet(void *target, const String &val)
void doSet(void *target, const String &val)
Command object - see ParamCommand.
void doSet(void *target, const String &val)
void createParameterMappingStructures(bool recreateIfExists=true) const
Create the internal params logical & named mapping structures.
virtual GpuProgramType getType(void) const
Get the program type.
String doGet(const void *target) const
Defines a generic resource handler.
virtual void setVertexTextureFetchRequired(bool r)
Sets whether this vertex program requires support for vertex texture fetch from the hardware.
virtual bool isPoseAnimationIncluded(void) const
Returns whether a vertex program includes the required instructions to perform pose animation.
virtual void setMorphAnimationIncluded(bool included)
Sets whether a vertex program includes the required instructions to perform morph animation.
String doGet(const void *target) const
void doSet(void *target, const String &val)
void loadImpl(void)
Internal implementation of the meat of the 'load' action, only called if this resource is not being l...
virtual ushort getNumberOfPosesIncluded(void) const
Returns the number of simultaneous poses the vertex program can blend, for use in pose animation.
bool mMorphAnimation
Does this (vertex) program include morph animation?
virtual void setSyntaxCode(const String &syntax)
Sets the syntax code for this program e.g.
Abstract class representing a loadable resource (e.g.
virtual bool hasCompileError(void) const
Did this program encounter a compile error when loading?
GpuProgramParametersSharedPtr mDefaultParams
The default parameters for use with this object.
void createLogicalParameterMappingStructures(bool recreateIfExists=true) const
Create the internal params logical mapping structures.
bool isRequiredCapabilitiesSupported(void) const
Internal method returns whether required capabilities for this program is supported.
String doGet(const void *target) const
virtual void setManualNamedConstantsFile(const String ¶mDefFile)
Specifies the name of a file from which to load named parameters mapping for a program which would no...
virtual void setPoseAnimationIncluded(ushort poseCount)
Sets whether a vertex program includes the required instructions to perform pose animation.
ushort mPoseAnimation
Does this (vertex) program include pose animation (count of number of poses supported)
virtual void setAdjacencyInfoRequired(bool r)
Sets whether this geometry program requires adjacency information from the input primitives.
String mManualNamedConstantsFile
File from which to load named constants manually.
virtual bool isSupported(void) const
Returns whether this program can be supported on the current renderer and hardware.
virtual GpuProgram * _getBindingDelegate(void)
Returns the GpuProgram which should be bound to the pipeline.
void doSet(void *target, const String &val)
virtual bool getPassTransformStates(void) const
Returns whether a vertex program wants transform state to be passed through fixed pipeline low level ...
bool mSkeletalAnimation
Does this (vertex) program include skeletal animation?
Interface describing a manual resource loader.
String mFilename
The name of the file to load source from (may be blank)
GpuProgramType mType
The type of the program.
bool mVertexTextureFetch
Does this (vertex) program require support for vertex texture fetch?
virtual bool getPassFogStates(void) const
Returns whether a fragment program wants fog state to be passed through fixed pipeline low level API ...
GpuNamedConstantsPtr mConstantDefs
Parameter name -> ConstantDefinition map, shared instance used by all parameter objects.
virtual const String & getSource(void) const
Gets the assembler source for this program.
static CmdAdjacency msAdjacencyCmd
virtual const GpuNamedConstants & getNamedConstants() const
Get a read-only reference to the named constants registered for this program (manually or automatical...
virtual bool hasDefaultParameters(void) const
Returns true if default parameters have been set up.
Copyright © 2012 Torus Knot Software Ltd

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