#include <OgreCgProgram.h>
Inheritance diagram for Ogre::CgProgram:
Public Member Functions | |
CgProgram (ResourceManager *creator, const String &name, ResourceHandle handle, const String &group, bool isManual, ManualResourceLoader *loader, CGcontext context) | |
~CgProgram () | |
void | setEntryPoint (const String &entryPoint) |
Sets the entry point for this program ie the first method called. | |
const String & | getEntryPoint (void) const |
Gets the entry point defined for this program. | |
void | setProfiles (const StringVector &profiles) |
Sets the Cg profiles which can be supported by the program. | |
const StringVector & | getProfiles (void) const |
Gets the Cg profiles which can be supported by the program. | |
void | setCompileArguments (const String &args) |
Sets the compilation arguments for this program ie the first method called. | |
const String & | getCompileArguments (void) const |
Gets the entry point defined for this program. | |
bool | isSupported (void) const |
Overridden from GpuProgram. | |
const String & | getLanguage (void) const |
Overridden from GpuProgram. | |
GpuProgramParametersSharedPtr | createParameters (void) |
Creates a new parameters object compatible with this program definition. | |
GpuProgram * | _getBindingDelegate (void) |
| |
virtual void | setSourceFile (const String &filename) |
Sets the filename of the source assembly for this program. | |
virtual void | setSource (const String &source) |
Sets the source assembly for this program from an in-memory string. | |
virtual const String & | getSyntaxCode (void) const |
Gets the syntax code for this program e.g. | |
virtual void | setSyntaxCode (const String &syntax) |
Sets the syntax code for this program e.g. | |
virtual const String & | getSourceFile (void) const |
Gets the name of the file used as source for this program. | |
virtual const String & | getSource (void) const |
Gets the assembler source for this program. | |
virtual void | setType (GpuProgramType t) |
Set the program type (only valid before load). | |
virtual GpuProgramType | getType (void) const |
Get the program type. | |
virtual void | setSkeletalAnimationIncluded (bool included) |
Sets whether a vertex program includes the required instructions to perform skeletal animation. | |
virtual bool | isSkeletalAnimationIncluded (void) const |
Returns whether a vertex program includes the required instructions to perform skeletal animation. | |
virtual void | setMorphAnimationIncluded (bool included) |
Sets whether a vertex program includes the required instructions to perform morph animation. | |
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. | |
virtual bool | isPoseAnimationIncluded (void) const |
Returns whether a vertex program includes the required instructions to perform pose animation. | |
virtual ushort | getNumberOfPosesIncluded (void) const |
Returns the number of simultaneous poses the vertex program can blend, for use in pose animation. | |
virtual GpuProgramParametersSharedPtr | getDefaultParameters (void) |
Get a reference to the default parameters which are to be used for all uses of this program. | |
virtual bool | hasDefaultParameters (void) const |
Returns true if default parameters have been set up. | |
virtual void | setSurfaceAndPassLightStates (bool state) |
Sets whether a vertex program requires light and material states to be passed to through fixed pipeline low level API rendering calls. | |
virtual bool | getPassSurfaceAndLightStates (void) const |
Returns whether a vertex program wants light and material states to be passed through fixed pipeline low level API rendering calls. | |
virtual void | load (void) |
Loads the resource, if it is not already. | |
virtual void | reload (void) |
Reloads the resource, if it is already loaded. | |
bool | isReloadable (void) const |
Returns true if the Resource is reloadable, false otherwise. | |
bool | isManuallyLoaded (void) const |
Is this resource manually loaded? | |
virtual void | unload (void) |
Unloads the resource; this is not permanent, the resource can be reloaded later if required. | |
size_t | getSize (void) const |
Retrieves info about the size of the resource. | |
virtual void | touch (void) |
'Touches' the resource to indicate it has been used. | |
const String & | getName (void) const |
Gets resource name. | |
ResourceHandle | getHandle (void) const |
bool | isLoaded (void) const |
Returns true if the Resource has been loaded, false otherwise. | |
const String & | getGroup (void) |
Gets the group which this resource is a member of. | |
void | changeGroupOwnership (const String &newGroup) |
Change the resource group ownership of a Resource. | |
ResourceManager * | getCreator (void) |
Gets the manager which created this resource. | |
const String & | getOrigin (void) const |
Get the origin of this resource, e.g. | |
void | _notifyOrigin (const String &origin) |
Notify this resource of it's origin. | |
ParamDictionary * | getParamDictionary (void) |
Retrieves the parameter dictionary for this class. | |
const ParamDictionary * | getParamDictionary (void) const |
const ParameterList & | getParameters (void) const |
Retrieves a list of parameters valid for this object. | |
virtual bool | setParameter (const String &name, const String &value) |
Generic parameter setting method. | |
virtual void | setParameterList (const NameValuePairList ¶mList) |
Generic multiple parameter setting method. | |
virtual String | getParameter (const String &name) const |
Generic parameter retrieval method. | |
virtual void | copyParametersTo (StringInterface *dest) const |
Method for copying this object's parameters to another object. | |
Static Public Member Functions | |
void | cleanupDictionary () |
Cleans up the static 'msDictionary' required to reset Ogre, otherwise the containers are left with invalid pointers, which will lead to a crash as soon as one of the ResourceManager implementers (e.g. | |
Protected Member Functions | |
void | loadFromSource (void) |
Internal load implementation, must be implemented by subclasses. | |
void | createLowLevelImpl (void) |
Internal method for creating an appropriate low-level program from this high-level program, must be implemented by subclasses. | |
void | unloadHighLevelImpl (void) |
Internal unload implementation, must be implemented by subclasses. | |
void | populateParameterNames (GpuProgramParametersSharedPtr params) |
Populate the passed parameters with name->index map, must be overridden. | |
void | selectProfile (void) |
Internal method which works out which profile to use for this program. | |
void | buildArgs (void) |
Internal method which merges manual and automatic compile arguments. | |
void | freeCgArgs (void) |
Releases memory for the horrible Cg char**. | |
virtual void | loadHighLevel (void) |
Internal load high-level portion if not loaded. | |
virtual void | unloadHighLevel (void) |
Internal unload high-level portion if loaded. | |
virtual void | loadHighLevelImpl (void) |
Internal load implementation, loads just the high-level portion, enough to get parameters. | |
void | loadImpl () |
| |
void | unloadImpl () |
| |
void | setupBaseParamDictionary (void) |
Internal method for setting up the basic parameter definitions for a subclass. | |
size_t | calculateSize (void) const |
| |
bool | createParamDictionary (const String &className) |
Internal method for creating a parameter dictionary for the class, if it does not already exist. | |
Protected Attributes | |
CGcontext | mCgContext |
The CG context to use, passed in by factory. | |
CGprogram | mCgProgram |
Program handle. | |
StringVector | mProfiles |
String | mEntryPoint |
String | mSelectedProfile |
CGprofile | mSelectedCgProfile |
String | mCompileArgs |
char ** | mCgArguments |
bool | mHighLevelLoaded |
Whether the high-level program (and it's parameter defs) is loaded. | |
GpuProgramPtr | mAssemblerProgram |
The underlying assembler program. | |
GpuProgramType | mType |
The type of the program. | |
String | mFilename |
The name of the file to load source from (may be blank). | |
String | mSource |
The assembler source of the program (may be blank until file loaded). | |
bool | mLoadFromFile |
Whether we need to load source from file or not. | |
String | mSyntaxCode |
Syntax code eg arbvp1, vs_2_0 etc. | |
bool | mSkeletalAnimation |
Does this (vertex) program include skeletal animation? | |
bool | mMorphAnimation |
Does this (vertex) program include morph animation? | |
ushort | mPoseAnimation |
Does this (vertex) program include pose animation (count of number of poses supported). | |
GpuProgramParametersSharedPtr | mDefaultParams |
The default parameters for use with this object. | |
bool | mPassSurfaceAndLightStates |
Does this program want light states passed through fixed pipeline. | |
ResourceManager * | mCreator |
Creator. | |
String | mName |
Unique name of the resource. | |
String | mGroup |
The name of the resource group. | |
ResourceHandle | mHandle |
Numeric handle for more efficient look up than name. | |
bool | mIsLoaded |
Is the resource currently loaded? | |
size_t | mSize |
The size of the resource in bytes. | |
bool | mIsManual |
Is this file manually loaded? | |
String | mOrigin |
Origin of this resource (e.g. script name) - optional. | |
ManualResourceLoader * | mLoader |
Optional manual loader; if provided, data is loaded from here instead of a file. | |
String | mParamDictName |
Class name for this instance to be used as a lookup (must be initialised by subclasses). | |
Static Protected Attributes | |
CmdEntryPoint | msCmdEntryPoint |
CmdProfiles | msCmdProfiles |
CmdArgs | msCmdArgs |
CmdType | msTypeCmd |
CmdSyntax | msSyntaxCmd |
CmdSkeletal | msSkeletalCmd |
ParamDictionaryMap | msDictionary |
Dictionary of parameters. |
Definition at line 42 of file OgreCgProgram.h.
|
|
|
|
|
Reimplemented from Ogre::GpuProgram. Definition at line 97 of file OgreHighLevelGpuProgram.h. |
|
Notify this resource of it's origin.
Definition at line 223 of file OgreResource.h. References Ogre::String. |
|
Internal method which merges manual and automatic compile arguments.
|
|
Implements Ogre::Resource. Definition at line 968 of file OgreGpuProgram.h. |
|
Change the resource group ownership of a Resource.
|
|
Cleans up the static 'msDictionary' required to reset Ogre, otherwise the containers are left with invalid pointers, which will lead to a crash as soon as one of the ResourceManager implementers (e.g. MaterialManager) initializes. |
|
Method for copying this object's parameters to another object.
Definition at line 296 of file OgreStringInterface.h. References Ogre::ParamDictionary::mParamDefs, and Ogre::StringInterface::setParameter(). |
|
Internal method for creating an appropriate low-level program from this high-level program, must be implemented by subclasses.
Implements Ogre::HighLevelGpuProgram. |
|
Internal method for creating a parameter dictionary for the class, if it does not already exist.
Definition at line 172 of file OgreStringInterface.h. References Ogre::String. |
|
Creates a new parameters object compatible with this program definition.
Reimplemented from Ogre::GpuProgram. Reimplemented in Ogre::D3D9HLSLProgram. |
|
Releases memory for the horrible Cg char**.
|
|
Gets the entry point defined for this program.
Definition at line 122 of file OgreCgProgram.h. References mCompileArgs, and Ogre::String. |
|
Gets the manager which created this resource.
Definition at line 214 of file OgreResource.h. |
|
Get a reference to the default parameters which are to be used for all uses of this program.
|
|
Gets the entry point defined for this program.
Definition at line 114 of file OgreCgProgram.h. References mEntryPoint, and Ogre::String. |
|
Gets the group which this resource is a member of.
Definition at line 202 of file OgreResource.h. References Ogre::String. |
|
Definition at line 188 of file OgreResource.h. References Ogre::ResourceHandle. |
|
Overridden from GpuProgram.
Reimplemented from Ogre::GpuProgram. |
|
Gets resource name.
Definition at line 183 of file OgreResource.h. References Ogre::String. |
|
Returns the number of simultaneous poses the vertex program can blend, for use in pose animation.
Definition at line 1078 of file OgreGpuProgram.h. |
|
Get the origin of this resource, e.g. a script file name.
Definition at line 221 of file OgreResource.h. References Ogre::String. |
|
Definition at line 209 of file OgreStringInterface.h. |
|
Retrieves the parameter dictionary for this class.
Definition at line 196 of file OgreStringInterface.h. |
|
Generic parameter retrieval method.
Definition at line 265 of file OgreStringInterface.h. References Ogre::ParamCommand::doGet(), Ogre::ParamDictionary::getParamCommand(), and Ogre::String. |
|
Retrieves a list of parameters valid for this object.
|
|
Returns whether a vertex program wants light and material states to be passed through fixed pipeline low level API rendering calls.
Definition at line 1110 of file OgreGpuProgram.h. |
|
Gets the Cg profiles which can be supported by the program.
Definition at line 118 of file OgreCgProgram.h. References Ogre::StringVector. |
|
Retrieves info about the size of the resource.
Definition at line 172 of file OgreResource.h. |
|
Gets the assembler source for this program.
Definition at line 1000 of file OgreGpuProgram.h. References Ogre::String. |
|
Gets the name of the file used as source for this program.
Definition at line 998 of file OgreGpuProgram.h. |
|
Gets the syntax code for this program e.g. arbvp1, fp20, vs_1_1 etc Definition at line 992 of file OgreGpuProgram.h. References Ogre::String. |
|
Get the program type.
Definition at line 1004 of file OgreGpuProgram.h. References Ogre::GpuProgramType. |
|
Returns true if default parameters have been set up.
Definition at line 1094 of file OgreGpuProgram.h. |
|
Returns true if the Resource has been loaded, false otherwise.
Definition at line 195 of file OgreResource.h. References OGRE_LOCK_AUTO_MUTEX. |
|
Is this resource manually loaded?
Definition at line 160 of file OgreResource.h. |
|
Returns whether a vertex program includes the required instructions to perform morph animation.
Definition at line 1066 of file OgreGpuProgram.h. |
|
Returns whether a vertex program includes the required instructions to perform pose animation.
Definition at line 1074 of file OgreGpuProgram.h. |
|
Returns true if the Resource is reloadable, false otherwise.
Definition at line 153 of file OgreResource.h. |
|
Returns whether a vertex program includes the required instructions to perform skeletal animation.
Definition at line 1039 of file OgreGpuProgram.h. |
|
Overridden from GpuProgram.
Reimplemented from Ogre::GpuProgram. |
|
Loads the resource, if it is not already.
Reimplemented in Ogre::Mesh, and Ogre::GLSLGpuProgram. |
|
Internal load implementation, must be implemented by subclasses.
Implements Ogre::GpuProgram. |
|
Internal load high-level portion if not loaded.
|
|
Internal load implementation, loads just the high-level portion, enough to get parameters.
|
|
Reimplemented from Ogre::GpuProgram. |
|
Populate the passed parameters with name->index map, must be overridden.
Implements Ogre::HighLevelGpuProgram. |
|
Reloads the resource, if it is already loaded.
|
|
Internal method which works out which profile to use for this program.
|
|
Sets the compilation arguments for this program ie the first method called.
Definition at line 120 of file OgreCgProgram.h. References mCompileArgs, and Ogre::String. |
|
Sets the entry point for this program ie the first method called.
Definition at line 112 of file OgreCgProgram.h. References mEntryPoint, and Ogre::String. |
|
Sets whether a vertex program includes the required instructions to perform morph animation.
Definition at line 1047 of file OgreGpuProgram.h. |
|
Generic parameter setting method.
Referenced by Ogre::StringInterface::copyParametersTo(). |
|
Generic multiple parameter setting method.
|
|
Sets whether a vertex program includes the required instructions to perform pose animation.
Definition at line 1057 of file OgreGpuProgram.h. |
|
Sets the Cg profiles which can be supported by the program.
|
|
Sets whether a vertex program includes the required instructions to perform skeletal animation.
Definition at line 1030 of file OgreGpuProgram.h. |
|
Sets the source assembly for this program from an in-memory string.
|
|
Sets the filename of the source assembly for this program.
|
|
Sets whether a vertex program requires light and material states to be passed to through fixed pipeline low level API rendering calls.
Definition at line 1104 of file OgreGpuProgram.h. |
|
Sets the syntax code for this program e.g. arbvp1, fp20, vs_1_1 etc |
|
Set the program type (only valid before load).
Reimplemented in Ogre::GLArbGpuProgram. |
|
Internal method for setting up the basic parameter definitions for a subclass.
|
|
'Touches' the resource to indicate it has been used.
Reimplemented in Ogre::Material. |
|
Unloads the resource; this is not permanent, the resource can be reloaded later if required.
Reimplemented in Ogre::GLSLGpuProgram. |
|
Internal unload high-level portion if loaded.
|
|
Internal unload implementation, must be implemented by subclasses.
Implements Ogre::HighLevelGpuProgram. |
|
Implements Ogre::Resource. |
|
The underlying assembler program.
Definition at line 60 of file OgreHighLevelGpuProgram.h. |
|
Definition at line 95 of file OgreCgProgram.h. |
|
The CG context to use, passed in by factory.
Definition at line 74 of file OgreCgProgram.h. |
|
Program handle.
Definition at line 76 of file OgreCgProgram.h. |
|
Definition at line 92 of file OgreCgProgram.h. Referenced by getCompileArguments(), and setCompileArguments(). |
|
Creator.
Definition at line 73 of file OgreResource.h. |
|
The default parameters for use with this object.
Definition at line 953 of file OgreGpuProgram.h. |
|
Definition at line 89 of file OgreCgProgram.h. Referenced by getEntryPoint(), and setEntryPoint(). |
|
The name of the file to load source from (may be blank).
Definition at line 939 of file OgreGpuProgram.h. |
|
The name of the resource group.
Definition at line 77 of file OgreResource.h. |
|
Numeric handle for more efficient look up than name.
Definition at line 79 of file OgreResource.h. |
|
Whether the high-level program (and it's parameter defs) is loaded.
Definition at line 58 of file OgreHighLevelGpuProgram.h. |
|
Is the resource currently loaded?
Definition at line 81 of file OgreResource.h. |
|
Is this file manually loaded?
Definition at line 85 of file OgreResource.h. |
|
Optional manual loader; if provided, data is loaded from here instead of a file.
Definition at line 89 of file OgreResource.h. |
|
Whether we need to load source from file or not.
Definition at line 943 of file OgreGpuProgram.h. |
|
Does this (vertex) program include morph animation?
Definition at line 949 of file OgreGpuProgram.h. |
|
Unique name of the resource.
Definition at line 75 of file OgreResource.h. |
|
Origin of this resource (e.g. script name) - optional.
Definition at line 87 of file OgreResource.h. |
|
Class name for this instance to be used as a lookup (must be initialised by subclasses).
Definition at line 160 of file OgreStringInterface.h. |
|
Does this program want light states passed through fixed pipeline.
Definition at line 955 of file OgreGpuProgram.h. |
|
Does this (vertex) program include pose animation (count of number of poses supported).
Definition at line 951 of file OgreGpuProgram.h. |
|
Definition at line 88 of file OgreCgProgram.h. |
|
Definition at line 71 of file OgreCgProgram.h. |
|
Definition at line 69 of file OgreCgProgram.h. |
|
Definition at line 70 of file OgreCgProgram.h. |
|
Dictionary of parameters.
Definition at line 157 of file OgreStringInterface.h. |
|
Definition at line 91 of file OgreCgProgram.h. |
|
Definition at line 90 of file OgreCgProgram.h. |
|
The size of the resource in bytes.
Definition at line 83 of file OgreResource.h. |
|
Does this (vertex) program include skeletal animation?
Definition at line 947 of file OgreGpuProgram.h. |
|
The assembler source of the program (may be blank until file loaded).
Definition at line 941 of file OgreGpuProgram.h. |
|
Definition at line 934 of file OgreGpuProgram.h. |
|
Definition at line 933 of file OgreGpuProgram.h. |
|
Definition at line 932 of file OgreGpuProgram.h. |
|
Syntax code eg arbvp1, vs_2_0 etc.
Definition at line 945 of file OgreGpuProgram.h. |
|
The type of the program.
Definition at line 937 of file OgreGpuProgram.h. |
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Mar 12 14:47:10 2006