OgreScriptCompiler.h
Go to the documentation of this file.

    00001 /*
    00002 -----------------------------------------------------------------------------
    00003 This source file is part of OGRE
    00004     (Object-oriented Graphics Rendering Engine)
    00005 For the latest info, see http://www.ogre3d.org/
    00006
    00007 Copyright (c) 2000-2012 Torus Knot Software Ltd
    00008
    00009 Permission is hereby granted, free of charge, to any person obtaining a copy
    00010 of this software and associated documentation files (the "Software"), to deal
    00011 in the Software without restriction, including without limitation the rights
    00012 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    00013 copies of the Software, and to permit persons to whom the Software is
    00014 furnished to do so, subject to the following conditions:
    00015
    00016 The above copyright notice and this permission notice shall be included in
    00017 all copies or substantial portions of the Software.
    00018
    00019 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    00020 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    00021 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    00022 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    00023 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    00024 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    00025 THE SOFTWARE.
    00026 -----------------------------------------------------------------------------
    00027 */
    00028
    00029 #ifndef __SCRIPTCOMPILER_H_
    00030 #define __SCRIPTCOMPILER_H_
    00031
    00032 #include "OgreSharedPtr.h"
    00033 #include "OgreMaterial.h"
    00034 #include "OgreHighLevelGpuProgram.h"
    00035 #include "OgreCompositor.h"
    00036 #include "OgreCompositionPass.h"
    00037 #include "OgreAny.h"
    00038
    00039 namespace Ogre
    00040 {
    00048     enum ConcreteNodeType
    00049     {
    00050         CNT_VARIABLE,
    00051         CNT_VARIABLE_ASSIGN,
    00052         CNT_WORD,
    00053         CNT_IMPORT,
    00054         CNT_QUOTE,
    00055         CNT_LBRACE,
    00056         CNT_RBRACE,
    00057         CNT_COLON
    00058     };
    00059
    00061     struct ConcreteNode;
    00062     typedef SharedPtr<ConcreteNode> ConcreteNodePtr;
    00063     typedef list<ConcreteNodePtr>::type ConcreteNodeList;
    00064     typedef SharedPtr<ConcreteNodeList> ConcreteNodeListPtr;
    00065     struct ConcreteNode : public ScriptCompilerAlloc
    00066     {
    00067         String token, file;
    00068         unsigned int line;
    00069         ConcreteNodeType type;
    00070         ConcreteNodeList children;
    00071         ConcreteNode *parent;
    00072     };
    00073
    00075     enum AbstractNodeType
    00076     {
    00077         ANT_UNKNOWN,
    00078         ANT_ATOM,
    00079         ANT_OBJECT,
    00080         ANT_PROPERTY,
    00081         ANT_IMPORT,
    00082         ANT_VARIABLE_SET,
    00083         ANT_VARIABLE_ACCESS
    00084     };
    00085     class AbstractNode;
    00086     typedef SharedPtr<AbstractNode> AbstractNodePtr;
    00087     typedef list<AbstractNodePtr>::type AbstractNodeList;
    00088     typedef SharedPtr<AbstractNodeList> AbstractNodeListPtr;
    00089
    00090     class _OgreExport AbstractNode : public AbstractNodeAlloc
    00091     {
    00092     public:
    00093         String file;
    00094         unsigned int line;
    00095         AbstractNodeType type;
    00096         AbstractNode *parent;
    00097         Any context; // A holder for translation context data
    00098     public:
    00099         AbstractNode(AbstractNode *ptr);
    00100         virtual ~AbstractNode(){}
    00102         virtual AbstractNode *clone() const = 0;
    00104         virtual String getValue() const = 0;
    00105     };
    00106
    00108     class _OgreExport AtomAbstractNode : public AbstractNode
    00109     {
    00110     public:
    00111         String value;
    00112         uint32 id;
    00113     public:
    00114         AtomAbstractNode(AbstractNode *ptr);
    00115         AbstractNode *clone() const;
    00116         String getValue() const;
    00117     private:
    00118         void parseNumber() const;
    00119     };
    00120
    00122     class _OgreExport ObjectAbstractNode : public AbstractNode
    00123     {
    00124     private:
    00125         map<String,String>::type mEnv;
    00126     public:
    00127         String name, cls;
    00128         std::vector<String> bases;
    00129         uint32 id;
    00130         bool abstract;
    00131         AbstractNodeList children;
    00132         AbstractNodeList values;
    00133         AbstractNodeList overrides; // For use when processing object inheritance and overriding
    00134     public:
    00135         ObjectAbstractNode(AbstractNode *ptr);
    00136         AbstractNode *clone() const;
    00137         String getValue() const;
    00138
    00139         void addVariable(const String &name);
    00140         void setVariable(const String &name, const String &value);
    00141         std::pair<bool,String> getVariable(const String &name) const;
    00142         const map<String,String>::type &getVariables() const;
    00143     };
    00144
    00146     class _OgreExport PropertyAbstractNode : public AbstractNode
    00147     {
    00148     public:
    00149         String name;
    00150         uint32 id;
    00151         AbstractNodeList values;
    00152     public:
    00153         PropertyAbstractNode(AbstractNode *ptr);
    00154         AbstractNode *clone() const;
    00155         String getValue() const;
    00156     };
    00157
    00159     class _OgreExport ImportAbstractNode : public AbstractNode
    00160     {
    00161     public:
    00162         String target, source;
    00163     public:
    00164         ImportAbstractNode();
    00165         AbstractNode *clone() const;
    00166         String getValue() const;
    00167     };
    00168
    00170     class _OgreExport VariableAccessAbstractNode : public AbstractNode
    00171     {
    00172     public:
    00173         String name;
    00174     public:
    00175         VariableAccessAbstractNode(AbstractNode *ptr);
    00176         AbstractNode *clone() const;
    00177         String getValue() const;
    00178     };
    00179
    00180     class ScriptCompilerEvent;
    00181     class ScriptCompilerListener;
    00182
    00187     class _OgreExport ScriptCompiler : public ScriptCompilerAlloc
    00188     {
    00189     public: // Externally accessible types
    00190         //typedef map<String,uint32>::type IdMap;
    00191         typedef HashMap<String,uint32> IdMap;
    00192
    00193         // The container for errors
    00194         struct Error : public ScriptCompilerAlloc
    00195         {
    00196             String file, message;
    00197             int line;
    00198             uint32 code;
    00199         };
    00200         typedef SharedPtr<Error> ErrorPtr;
    00201         typedef list<ErrorPtr>::type ErrorList;
    00202
    00203         // These are the built-in error codes
    00204         enum{
    00205             CE_STRINGEXPECTED,
    00206             CE_NUMBEREXPECTED,
    00207             CE_FEWERPARAMETERSEXPECTED,
    00208             CE_VARIABLEEXPECTED,
    00209             CE_UNDEFINEDVARIABLE,
    00210             CE_OBJECTNAMEEXPECTED,
    00211             CE_OBJECTALLOCATIONERROR,
    00212             CE_INVALIDPARAMETERS,
    00213             CE_DUPLICATEOVERRIDE,
    00214             CE_UNEXPECTEDTOKEN,
    00215             CE_OBJECTBASENOTFOUND,
    00216             CE_UNSUPPORTEDBYRENDERSYSTEM,
    00217             CE_REFERENCETOANONEXISTINGOBJECT
    00218         };
    00219         static String formatErrorCode(uint32 code);
    00220     public:
    00221         ScriptCompiler();
    00222         virtual ~ScriptCompiler() {}
    00223
    00225
    00230         bool compile(const String &str, const String &source, const String &group);
    00232         bool compile(const ConcreteNodeListPtr &nodes, const String &group);
    00234         AbstractNodeListPtr _generateAST(const String &str, const String &source, bool doImports = false, bool doObjects = false, bool doVariables = false);
    00236         bool _compile(AbstractNodeListPtr nodes, const String &group, bool doImports = true, bool doObjects = true, bool doVariables = true);
    00238         void addError(uint32 code, const String &file, int line, const String &msg = "");
    00240         void setListener(ScriptCompilerListener *listener);
    00242         ScriptCompilerListener *getListener();
    00244         const String &getResourceGroup() const;
    00246
    00251         void addNameExclusion(const String &type);
    00253         void removeNameExclusion(const String &type);
    00255         bool _fireEvent(ScriptCompilerEvent *evt, void *retval);
    00256     private: // Tree processing
    00257         AbstractNodeListPtr convertToAST(const ConcreteNodeListPtr &nodes);
    00259         void processImports(AbstractNodeListPtr &nodes);
    00261         AbstractNodeListPtr loadImportPath(const String &name);
    00263         AbstractNodeListPtr locateTarget(AbstractNodeList *nodes, const String &target);
    00265         void processObjects(AbstractNodeList *nodes, const AbstractNodeListPtr &top);
    00267         void processVariables(AbstractNodeList *nodes);
    00269         void overlayObject(const AbstractNodePtr &source, ObjectAbstractNode *dest);
    00271         bool isNameExcluded(const String &cls, AbstractNode *parent);
    00273         void initWordMap();
    00274     private:
    00275         // Resource group
    00276         String mGroup;
    00277         // The word -> id conversion table
    00278         IdMap mIds;
    00279         // This is an environment map
    00280         typedef map<String,String>::type Environment;
    00281         Environment mEnv;
    00282
    00283         typedef map<String,AbstractNodeListPtr>::type ImportCacheMap;
    00284         ImportCacheMap mImports; // The set of imported scripts to avoid circular dependencies
    00285         typedef multimap<String,String>::type ImportRequestMap;
    00286         ImportRequestMap mImportRequests; // This holds the target objects for each script to be imported
    00287
    00288         // This stores the imports of the scripts, so they are separated and can be treated specially
    00289         AbstractNodeList mImportTable;
    00290
    00291         // Error list
    00292         ErrorList mErrors;
    00293
    00294         // The listener
    00295         ScriptCompilerListener *mListener;
    00296     private: // Internal helper classes and processors
    00297         class AbstractTreeBuilder
    00298         {
    00299         private:
    00300             AbstractNodeListPtr mNodes;
    00301             AbstractNode *mCurrent;
    00302             ScriptCompiler *mCompiler;
    00303         public:
    00304             AbstractTreeBuilder(ScriptCompiler *compiler);
    00305             const AbstractNodeListPtr &getResult() const;
    00306             void visit(ConcreteNode *node);
    00307             static void visit(AbstractTreeBuilder *visitor, const ConcreteNodeList &nodes);
    00308         };
    00309         friend class AbstractTreeBuilder;
    00310     public: // Public translator definitions
    00311         // This enum are built-in word id values
    00312         enum
    00313         {
    00314             ID_ON = 1,
    00315             ID_OFF = 2,
    00316             ID_TRUE = 1,
    00317             ID_FALSE = 2,
    00318             ID_YES = 1,
    00319             ID_NO = 2
    00320         };
    00321     };
    00322
    00328     class ScriptCompilerEvent
    00329     {
    00330     public:
    00331         String mType;
    00332
    00333         ScriptCompilerEvent(const String &type):mType(type){}
    00334         virtual ~ScriptCompilerEvent(){}
    00335     private: // Non-copyable
    00336         ScriptCompilerEvent(const ScriptCompilerEvent&);
    00337         ScriptCompilerEvent &operator = (const ScriptCompilerEvent&);
    00338     };
    00339
    00344     class _OgreExport ScriptCompilerListener
    00345     {
    00346     public:
    00347         ScriptCompilerListener();
    00348         virtual ~ScriptCompilerListener() {}
    00349
    00351         virtual ConcreteNodeListPtr importFile(ScriptCompiler *compiler, const String &name);
    00353         virtual void preConversion(ScriptCompiler *compiler, ConcreteNodeListPtr nodes);
    00355
    00361         virtual bool postConversion(ScriptCompiler *compiler, const AbstractNodeListPtr&);
    00363         virtual void handleError(ScriptCompiler *compiler, uint32 code, const String &file, int line, const String &msg);
    00365
    00374         virtual bool handleEvent(ScriptCompiler *compiler, ScriptCompilerEvent *evt, void *retval);
    00375     };
    00376
    00377     class ScriptTranslator;
    00378     class ScriptTranslatorManager;
    00379
    00383     class _OgreExport ScriptCompilerManager : public Singleton<ScriptCompilerManager>, public ScriptLoader, public ScriptCompilerAlloc
    00384     {
    00385     private:
    00386         OGRE_AUTO_MUTEX
    00387
    00388         // A list of patterns loaded by this compiler manager
    00389         StringVector mScriptPatterns;
    00390
    00391         // A pointer to the listener used for compiling scripts
    00392         ScriptCompilerListener *mListener;
    00393
    00394         // Stores a map from object types to the translators that handle them
    00395         vector<ScriptTranslatorManager*>::type mManagers;
    00396
    00397         // A pointer to the built-in ScriptTranslatorManager
    00398         ScriptTranslatorManager *mBuiltinTranslatorManager;
    00399
    00400         // A pointer to the specific compiler instance used
    00401         OGRE_THREAD_POINTER(ScriptCompiler, mScriptCompiler);
    00402     public:
    00403         ScriptCompilerManager();
    00404         virtual ~ScriptCompilerManager();
    00405
    00407         void setListener(ScriptCompilerListener *listener);
    00409         ScriptCompilerListener *getListener();
    00410
    00412         void addTranslatorManager(ScriptTranslatorManager *man);
    00414         void removeTranslatorManager(ScriptTranslatorManager *man);
    00416         void clearTranslatorManagers();
    00418         ScriptTranslator *getTranslator(const AbstractNodePtr &node);
    00419
    00421         void addScriptPattern(const String &pattern);
    00423         const StringVector& getScriptPatterns(void) const;
    00425         void parseScript(DataStreamPtr& stream, const String& groupName);
    00427         Real getLoadingOrder(void) const;
    00428
    00444         static ScriptCompilerManager& getSingleton(void);
    00460         static ScriptCompilerManager* getSingletonPtr(void);
    00461     };
    00462
    00463     // Standard event types
    00464     class _OgreExport PreApplyTextureAliasesScriptCompilerEvent : public ScriptCompilerEvent
    00465     {
    00466     public:
    00467         Material *mMaterial;
    00468         AliasTextureNamePairList *mAliases;
    00469         static String eventType;
    00470
    00471         PreApplyTextureAliasesScriptCompilerEvent(Material *material, AliasTextureNamePairList *aliases)
    00472             :ScriptCompilerEvent(eventType), mMaterial(material), mAliases(aliases){}
    00473     };
    00474
    00475     class _OgreExport ProcessResourceNameScriptCompilerEvent : public ScriptCompilerEvent
    00476     {
    00477     public:
    00478         enum ResourceType
    00479         {
    00480             TEXTURE,
    00481             MATERIAL,
    00482             GPU_PROGRAM,
    00483             COMPOSITOR
    00484         };
    00485         ResourceType mResourceType;
    00486         String mName;
    00487         static String eventType;
    00488
    00489         ProcessResourceNameScriptCompilerEvent(ResourceType resourceType, const String &name)
    00490             :ScriptCompilerEvent(eventType), mResourceType(resourceType), mName(name){}
    00491     };
    00492
    00493     class _OgreExport ProcessNameExclusionScriptCompilerEvent : public ScriptCompilerEvent
    00494     {
    00495     public:
    00496         String mClass;
    00497         AbstractNode *mParent;
    00498         static String eventType;
    00499
    00500         ProcessNameExclusionScriptCompilerEvent(const String &cls, AbstractNode *parent)
    00501             :ScriptCompilerEvent(eventType), mClass(cls), mParent(parent){}
    00502     };
    00503
    00504     class _OgreExport CreateMaterialScriptCompilerEvent : public ScriptCompilerEvent
    00505     {
    00506     public:
    00507         String mFile, mName, mResourceGroup;
    00508         static String eventType;
    00509
    00510         CreateMaterialScriptCompilerEvent(const String &file, const String &name, const String &resourceGroup)
    00511             :ScriptCompilerEvent(eventType), mFile(file), mName(name), mResourceGroup(resourceGroup){}
    00512     };
    00513
    00514     class _OgreExport CreateGpuProgramScriptCompilerEvent : public ScriptCompilerEvent
    00515     {
    00516     public:
    00517         String mFile, mName, mResourceGroup, mSource, mSyntax;
    00518         GpuProgramType mProgramType;
    00519         static String eventType;
    00520
    00521         CreateGpuProgramScriptCompilerEvent(const String &file, const String &name, const String &resourceGroup, const String &source,
    00522             const String &syntax, GpuProgramType programType)
    00523             :ScriptCompilerEvent(eventType), mFile(file), mName(name), mResourceGroup(resourceGroup), mSource(source),
    00524              mSyntax(syntax), mProgramType(programType)
    00525         {}
    00526     };
    00527
    00528     class _OgreExport CreateHighLevelGpuProgramScriptCompilerEvent : public ScriptCompilerEvent
    00529     {
    00530     public:
    00531         String mFile, mName, mResourceGroup, mSource, mLanguage;
    00532         GpuProgramType mProgramType;
    00533         static String eventType;
    00534
    00535         CreateHighLevelGpuProgramScriptCompilerEvent(const String &file, const String &name, const String &resourceGroup, const String &source,
    00536             const String &language, GpuProgramType programType)
    00537             :ScriptCompilerEvent(eventType), mFile(file), mName(name), mResourceGroup(resourceGroup), mSource(source),
    00538              mLanguage(language), mProgramType(programType)
    00539         {}
    00540     };
    00541
    00542     class _OgreExport CreateGpuSharedParametersScriptCompilerEvent : public ScriptCompilerEvent
    00543     {
    00544     public:
    00545         String mFile, mName, mResourceGroup;
    00546         static String eventType;
    00547
    00548         CreateGpuSharedParametersScriptCompilerEvent(const String &file, const String &name, const String &resourceGroup)
    00549             :ScriptCompilerEvent(eventType), mFile(file), mName(name), mResourceGroup(resourceGroup){}
    00550     };
    00551
    00552     class _OgreExport CreateParticleSystemScriptCompilerEvent : public ScriptCompilerEvent
    00553     {
    00554     public:
    00555         String mFile, mName, mResourceGroup;
    00556         static String eventType;
    00557
    00558         CreateParticleSystemScriptCompilerEvent(const String &file, const String &name, const String &resourceGroup)
    00559             :ScriptCompilerEvent(eventType), mFile(file), mName(name), mResourceGroup(resourceGroup){}
    00560     };
    00561
    00562     class _OgreExport CreateCompositorScriptCompilerEvent : public ScriptCompilerEvent
    00563     {
    00564     public:
    00565         String mFile, mName, mResourceGroup;
    00566         static String eventType;
    00567
    00568         CreateCompositorScriptCompilerEvent(const String &file, const String &name, const String &resourceGroup)
    00569             :ScriptCompilerEvent(eventType), mFile(file), mName(name), mResourceGroup(resourceGroup){}
    00570     };
    00571
    00573     enum
    00574     {
    00575         ID_MATERIAL = 3,
    00576         ID_VERTEX_PROGRAM,
    00577         ID_GEOMETRY_PROGRAM,
    00578         ID_FRAGMENT_PROGRAM,
    00579         ID_TECHNIQUE,
    00580         ID_PASS,
    00581         ID_TEXTURE_UNIT,
    00582         ID_VERTEX_PROGRAM_REF,
    00583         ID_GEOMETRY_PROGRAM_REF,
    00584         ID_FRAGMENT_PROGRAM_REF,
    00585         ID_SHADOW_CASTER_VERTEX_PROGRAM_REF,
    00586         ID_SHADOW_CASTER_FRAGMENT_PROGRAM_REF,
    00587         ID_SHADOW_RECEIVER_VERTEX_PROGRAM_REF,
    00588         ID_SHADOW_RECEIVER_FRAGMENT_PROGRAM_REF,
    00589         ID_SHADOW_CASTER_MATERIAL,
    00590         ID_SHADOW_RECEIVER_MATERIAL,
    00591
    00592         ID_LOD_VALUES,
    00593         ID_LOD_STRATEGY,
    00594         ID_LOD_DISTANCES,
    00595         ID_RECEIVE_SHADOWS,
    00596         ID_TRANSPARENCY_CASTS_SHADOWS,
    00597         ID_SET_TEXTURE_ALIAS,
    00598
    00599         ID_SOURCE,
    00600         ID_SYNTAX,
    00601         ID_DEFAULT_PARAMS,
    00602         ID_PARAM_INDEXED,
    00603         ID_PARAM_NAMED,
    00604         ID_PARAM_INDEXED_AUTO,
    00605         ID_PARAM_NAMED_AUTO,
    00606
    00607         ID_SCHEME,
    00608         ID_LOD_INDEX,
    00609         ID_GPU_VENDOR_RULE,
    00610         ID_GPU_DEVICE_RULE,
    00611         ID_INCLUDE,
    00612         ID_EXCLUDE,
    00613
    00614         ID_AMBIENT,
    00615         ID_DIFFUSE,
    00616         ID_SPECULAR,
    00617         ID_EMISSIVE,
    00618             ID_VERTEXCOLOUR,
    00619         ID_SCENE_BLEND,
    00620             ID_COLOUR_BLEND,
    00621             ID_ONE,
    00622             ID_ZERO,
    00623             ID_DEST_COLOUR,
    00624             ID_SRC_COLOUR,
    00625             ID_ONE_MINUS_DEST_COLOUR,
    00626             ID_ONE_MINUS_SRC_COLOUR,
    00627             ID_DEST_ALPHA,
    00628             ID_SRC_ALPHA,
    00629             ID_ONE_MINUS_DEST_ALPHA,
    00630             ID_ONE_MINUS_SRC_ALPHA,
    00631         ID_SEPARATE_SCENE_BLEND,
    00632         ID_SCENE_BLEND_OP,
    00633             ID_REVERSE_SUBTRACT,
    00634             ID_MIN,
    00635             ID_MAX,
    00636         ID_SEPARATE_SCENE_BLEND_OP,
    00637         ID_DEPTH_CHECK,
    00638         ID_DEPTH_WRITE,
    00639         ID_DEPTH_FUNC,
    00640         ID_DEPTH_BIAS,
    00641         ID_ITERATION_DEPTH_BIAS,
    00642             ID_ALWAYS_FAIL,
    00643             ID_ALWAYS_PASS,
    00644             ID_LESS_EQUAL,
    00645             ID_LESS,
    00646             ID_EQUAL,
    00647             ID_NOT_EQUAL,
    00648             ID_GREATER_EQUAL,
    00649             ID_GREATER,
    00650         ID_ALPHA_REJECTION,
    00651         ID_ALPHA_TO_COVERAGE,
    00652         ID_LIGHT_SCISSOR,
    00653         ID_LIGHT_CLIP_PLANES,
    00654         ID_TRANSPARENT_SORTING,
    00655         ID_ILLUMINATION_STAGE,
    00656             ID_DECAL,
    00657         ID_CULL_HARDWARE,
    00658             ID_CLOCKWISE,
    00659             ID_ANTICLOCKWISE,
    00660         ID_CULL_SOFTWARE,
    00661             ID_BACK,
    00662             ID_FRONT,
    00663         ID_NORMALISE_NORMALS,
    00664         ID_LIGHTING,
    00665         ID_SHADING,
    00666             ID_FLAT,
    00667             ID_GOURAUD,
    00668             ID_PHONG,
    00669         ID_POLYGON_MODE,
    00670             ID_SOLID,
    00671             ID_WIREFRAME,
    00672             ID_POINTS,
    00673         ID_POLYGON_MODE_OVERRIDEABLE,
    00674         ID_FOG_OVERRIDE,
    00675             ID_NONE,
    00676             ID_LINEAR,
    00677             ID_EXP,
    00678             ID_EXP2,
    00679         ID_COLOUR_WRITE,
    00680         ID_MAX_LIGHTS,
    00681         ID_START_LIGHT,
    00682         ID_ITERATION,
    00683             ID_ONCE,
    00684             ID_ONCE_PER_LIGHT,
    00685             ID_PER_LIGHT,
    00686             ID_PER_N_LIGHTS,
    00687             ID_POINT,
    00688             ID_SPOT,
    00689             ID_DIRECTIONAL,
    00690         ID_LIGHT_MASK,
    00691         ID_POINT_SIZE,
    00692         ID_POINT_SPRITES,
    00693         ID_POINT_SIZE_ATTENUATION,
    00694         ID_POINT_SIZE_MIN,
    00695         ID_POINT_SIZE_MAX,
    00696
    00697         ID_TEXTURE_ALIAS,
    00698         ID_TEXTURE,
    00699             ID_1D,
    00700             ID_2D,
    00701             ID_3D,
    00702             ID_CUBIC,
    00703             ID_UNLIMITED,
    00704             ID_ALPHA,
    00705             ID_GAMMA,
    00706         ID_ANIM_TEXTURE,
    00707         ID_CUBIC_TEXTURE,
    00708             ID_SEPARATE_UV,
    00709             ID_COMBINED_UVW,
    00710         ID_TEX_COORD_SET,
    00711         ID_TEX_ADDRESS_MODE,
    00712             ID_WRAP,
    00713             ID_CLAMP,
    00714             ID_BORDER,
    00715             ID_MIRROR,
    00716         ID_TEX_BORDER_COLOUR,
    00717         ID_FILTERING,
    00718             ID_BILINEAR,
    00719             ID_TRILINEAR,
    00720             ID_ANISOTROPIC,
    00721         ID_MAX_ANISOTROPY,
    00722         ID_MIPMAP_BIAS,
    00723         ID_COLOUR_OP,
    00724             ID_REPLACE,
    00725             ID_ADD,
    00726             ID_MODULATE,
    00727             ID_ALPHA_BLEND,
    00728         ID_COLOUR_OP_EX,
    00729             ID_SOURCE1,
    00730             ID_SOURCE2,
    00731             ID_MODULATE_X2,
    00732             ID_MODULATE_X4,
    00733             ID_ADD_SIGNED,
    00734             ID_ADD_SMOOTH,
    00735             ID_SUBTRACT,
    00736             ID_BLEND_DIFFUSE_COLOUR,
    00737             ID_BLEND_DIFFUSE_ALPHA,
    00738             ID_BLEND_TEXTURE_ALPHA,
    00739             ID_BLEND_CURRENT_ALPHA,
    00740             ID_BLEND_MANUAL,
    00741             ID_DOT_PRODUCT,
    00742             ID_SRC_CURRENT,
    00743             ID_SRC_TEXTURE,
    00744             ID_SRC_DIFFUSE,
    00745             ID_SRC_SPECULAR,
    00746             ID_SRC_MANUAL,
    00747         ID_COLOUR_OP_MULTIPASS_FALLBACK,
    00748         ID_ALPHA_OP_EX,
    00749         ID_ENV_MAP,
    00750             ID_SPHERICAL,
    00751             ID_PLANAR,
    00752             ID_CUBIC_REFLECTION,
    00753             ID_CUBIC_NORMAL,
    00754         ID_SCROLL,
    00755         ID_SCROLL_ANIM,
    00756         ID_ROTATE,
    00757         ID_ROTATE_ANIM,
    00758         ID_SCALE,
    00759         ID_WAVE_XFORM,
    00760             ID_SCROLL_X,
    00761             ID_SCROLL_Y,
    00762             ID_SCALE_X,
    00763             ID_SCALE_Y,
    00764             ID_SINE,
    00765             ID_TRIANGLE,
    00766             ID_SQUARE,
    00767             ID_SAWTOOTH,
    00768             ID_INVERSE_SAWTOOTH,
    00769         ID_TRANSFORM,
    00770         ID_BINDING_TYPE,
    00771             ID_VERTEX,
    00772             ID_FRAGMENT,
    00773         ID_CONTENT_TYPE,
    00774             ID_NAMED,
    00775             ID_SHADOW,
    00776         ID_TEXTURE_SOURCE,
    00777         ID_SHARED_PARAMS,
    00778         ID_SHARED_PARAM_NAMED,
    00779         ID_SHARED_PARAMS_REF,
    00780
    00781         ID_PARTICLE_SYSTEM,
    00782         ID_EMITTER,
    00783         ID_AFFECTOR,
    00784
    00785         ID_COMPOSITOR,
    00786             ID_TARGET,
    00787             ID_TARGET_OUTPUT,
    00788
    00789             ID_INPUT,
    00790                 ID_PREVIOUS,
    00791                 ID_TARGET_WIDTH,
    00792                 ID_TARGET_HEIGHT,
    00793                 ID_TARGET_WIDTH_SCALED,
    00794                 ID_TARGET_HEIGHT_SCALED,
    00795             ID_COMPOSITOR_LOGIC,
    00796             ID_TEXTURE_REF,
    00797             ID_SCOPE_LOCAL,
    00798             ID_SCOPE_CHAIN,
    00799             ID_SCOPE_GLOBAL,
    00800             ID_POOLED,
    00801             //ID_GAMMA, - already registered for material
    00802             ID_NO_FSAA,
    00803             ID_DEPTH_POOL,
    00804             ID_ONLY_INITIAL,
    00805             ID_VISIBILITY_MASK,
    00806             ID_LOD_BIAS,
    00807             ID_MATERIAL_SCHEME,
    00808             ID_SHADOWS_ENABLED,
    00809
    00810             ID_CLEAR,
    00811             ID_STENCIL,
    00812             ID_RENDER_SCENE,
    00813             ID_RENDER_QUAD,
    00814             ID_IDENTIFIER,
    00815             ID_FIRST_RENDER_QUEUE,
    00816             ID_LAST_RENDER_QUEUE,
    00817             ID_QUAD_NORMALS,
    00818                 ID_CAMERA_FAR_CORNERS_VIEW_SPACE,
    00819                 ID_CAMERA_FAR_CORNERS_WORLD_SPACE,
    00820
    00821             ID_BUFFERS,
    00822                 ID_COLOUR,
    00823                 ID_DEPTH,
    00824             ID_COLOUR_VALUE,
    00825             ID_DEPTH_VALUE,
    00826             ID_STENCIL_VALUE,
    00827
    00828             ID_CHECK,
    00829             ID_COMP_FUNC,
    00830             ID_REF_VALUE,
    00831             ID_MASK,
    00832             ID_FAIL_OP,
    00833                 ID_KEEP,
    00834                 ID_INCREMENT,
    00835                 ID_DECREMENT,
    00836                 ID_INCREMENT_WRAP,
    00837                 ID_DECREMENT_WRAP,
    00838                 ID_INVERT,
    00839             ID_DEPTH_FAIL_OP,
    00840             ID_PASS_OP,
    00841             ID_TWO_SIDED,
    00842 #ifdef RTSHADER_SYSTEM_BUILD_CORE_SHADERS
    00843         ID_RT_SHADER_SYSTEM,
    00844 #endif
    00845         ID_END_BUILTIN_IDS
    00846     };
    00849 }
    00850
    00851 #endif

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Sun Sep 2 2012 07:27:23