28 #ifndef __GpuProgram_H_
29 #define __GpuProgram_H_
76 String doGet(
const void* target)
const;
77 void doSet(
void* target,
const String& val);
82 String doGet(
const void* target)
const;
83 void doSet(
void* target,
const String& val);
88 String doGet(
const void* target)
const;
89 void doSet(
void* target,
const String& val);
94 String doGet(
const void* target)
const;
95 void doSet(
void* target,
const String& val);
100 String doGet(
const void* target)
const;
101 void doSet(
void* target,
const String& val);
106 String doGet(
const void* target)
const;
107 void doSet(
void* target,
const String& val);
112 String doGet(
const void* target)
const;
113 void doSet(
void* target,
const String& val);
118 String doGet(
const void* target)
const;
119 void doSet(
void* target,
const String& val);
187 void setupBaseParamDictionary(
void);
191 bool isRequiredCapabilitiesSupported(
void)
const;
197 void createParameterMappingStructures(
bool recreateIfExists =
true)
const;
199 void createLogicalParameterMappingStructures(
bool recreateIfExists =
true)
const;
201 void createNamedParameterMappingStructures(
bool recreateIfExists =
true)
const;
214 virtual void setSourceFile(
const String& filename);
220 virtual void setSource(
const String& source);
226 virtual void setSyntaxCode(
const String& syntax);
244 virtual bool isSupported(
void)
const;
262 { mSkeletalAnimation = included; }
279 { mMorphAnimation = included; }
289 { mPoseAnimation = poseCount; }
373 virtual const String& getLanguage(
void)
const;
406 virtual void setManualNamedConstantsFile(
const String& paramDefFile);
421 virtual size_t calculateSize(
void)
const;
425 virtual void loadFromSource(
void) = 0;
GpuLogicalBufferStructPtr mDoubleLogicalToPhysical
Record of logical to physical buffer maps.
virtual void setVertexTextureFetchRequired(bool r)
Sets whether this vertex program requires support for vertex texture fetch from the hardware...
virtual GpuProgramType getType(void) const
Get the program type.
virtual bool hasDefaultParameters(void) const
Returns true if default parameters have been set up.
virtual bool isAdjacencyInfoRequired(void) const
Returns whether this geometry program requires adjacency information from the input primitives...
virtual bool isVertexTextureFetchRequired(void) const
Returns whether this vertex program requires support for vertex texture fetch from the hardware...
virtual bool getPassFogStates(void) const
Returns whether a fragment program wants fog state to be passed through fixed pipeline low level API ...
Command object - see ParamCommand.
virtual void resetCompileError(void)
Reset a compile error if it occurred, allowing the load to be retried.
virtual bool getPassTransformStates(void) const
Returns whether a vertex program wants transform state to be passed through fixed pipeline low level ...
static CmdAdjacency msAdjacencyCmd
GpuProgramType
Enumerates the types of programs which can run on the GPU.
Defines a program which runs on the GPU such as a vertex or fragment program.
virtual const String & getSourceFile(void) const
Gets the name of the file used as source for this program.
bool mCompileError
Did we encounter a compilation error?
bool mLoadFromFile
Whether we need to load source from file or not.
String mSource
The assembler source of the program (may be blank until file loaded)
Interface describing a manual resource loader.
static CmdManualNamedConstsFile msManNamedConstsFileCmd
virtual bool isSkeletalAnimationIncluded(void) const
Returns whether a vertex program includes the required instructions to perform skeletal animation...
virtual bool hasCompileError(void) const
Did this program encounter a compile error when loading?
virtual bool getPassSurfaceAndLightStates(void) const
Returns whether a vertex program wants light and material states to be passed through fixed pipeline ...
bool mMorphAnimation
Does this (vertex) program include morph animation?
GpuLogicalBufferStructPtr mIntLogicalToPhysical
Record of logical to physical buffer maps.
bool mSkeletalAnimation
Does this (vertex) program include skeletal animation?
virtual bool isPoseAnimationIncluded(void) const
Returns whether a vertex program includes the required instructions to perform pose animation...
virtual const String & getSource(void) const
Gets the assembler source for this program.
virtual const GpuNamedConstants & getNamedConstants() const
Get a read-only reference to the named constants registered for this program (manually or automatical...
GpuProgramParametersSharedPtr mDefaultParams
The default parameters for use with this object.
virtual void setMorphAnimationIncluded(bool included)
Sets whether a vertex program includes the required instructions to perform morph animation...
GpuProgramType mType
The type of the program.
virtual const GpuNamedConstants & getConstantDefinitions() const
Get the full list of named constants.
Struct collecting together the information for named constants.
virtual const String & getSyntaxCode(void) const
Gets the syntax code for this program e.g.
bool mLoadedManualNamedConstants
static CmdSkeletal msSkeletalCmd
Abstract class representing a loadable resource (e.g.
bool mVertexTextureFetch
Does this (vertex) program require support for vertex texture fetch?
unsigned long long int ResourceHandle
virtual void setSkeletalAnimationIncluded(bool included)
Sets whether a vertex program includes the required instructions to perform skeletal animation...
GpuNamedConstantsPtr mConstantDefs
Parameter name -> ConstantDefinition map, shared instance used by all parameter objects.
String mManualNamedConstantsFile
File from which to load named constants manually.
GpuLogicalBufferStructPtr mFloatLogicalToPhysical
Record of logical to physical buffer maps.
String mFilename
The name of the file to load source from (may be blank)
String mSyntaxCode
Syntax code e.g. arbvp1, vs_2_0 etc.
virtual void setAdjacencyInfoRequired(bool r)
Sets whether this geometry program requires adjacency information from the input primitives.
static CmdSyntax msSyntaxCmd
Defines a generic resource handler.
virtual void setPoseAnimationIncluded(ushort poseCount)
Sets whether a vertex program includes the required instructions to perform pose animation.
virtual bool isMorphAnimationIncluded(void) const
Returns whether a vertex program includes the required instructions to perform morph animation...
static CmdMorph msMorphCmd
ushort mPoseAnimation
Does this (vertex) program include pose animation (count of number of poses supported) ...
virtual GpuProgram * _getBindingDelegate(void)
Returns the GpuProgram which should be bound to the pipeline.
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 ...
virtual ushort getNumberOfPosesIncluded(void) const
Returns the number of simultaneous poses the vertex program can blend, for use in pose animation...
Abstract class which is command object which gets/sets parameters.
bool mNeedsAdjacencyInfo
Does this (geometry) program require adjacency information?