Changed StaetAttribute::Type so it is an enum list rather than a unsigned int.

This commit is contained in:
Robert Osfield
2004-10-08 09:18:40 +00:00
parent 0fcc08d867
commit de283b315b
5 changed files with 14 additions and 9 deletions

View File

@@ -35,7 +35,7 @@ public:
StateAttribute(texenv,copyop) {}
META_StateAttribute(osg, PointSprite, GL_POINT_SPRITE_ARB);
META_StateAttribute(osg, PointSprite, POINTSPRITE);
/** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/
virtual int compare(const StateAttribute& sa) const;

View File

@@ -103,7 +103,7 @@ class SG_EXPORT StateAttribute : public Object
};
/** Type identifier to differentiate between different state types. */
typedef unsigned int Type;
// typedef unsigned int Type;
/** Values of StateAttribute::Type used to aid identification
* of different StateAttribute subclasses. Each subclass defines
@@ -113,7 +113,7 @@ class SG_EXPORT StateAttribute : public Object
* enum as a guide of what values to use. If your new subclass
* needs to override a standard StateAttriubte then simply use
* that type's value. */
enum Types
enum Type
{
TEXTURE,
@@ -168,7 +168,15 @@ class SG_EXPORT StateAttribute : public Object
VERTEXPROGRAM,
FRAGMENTPROGRAM,
PROGRAMOBJECT // utilised in osgGL2/ProgramObject
POINTSPRITE,
/// osgGL2 namespace
PROGRAMOBJECT,
/// osgFX namespace
VALIDATOR,
VIEWMATRIXEXTRACTOR,
};

View File

@@ -34,9 +34,6 @@ namespace osgFX
*/
class OSGFX_EXPORT Validator: public osg::StateAttribute {
public:
enum {
VALIDATOR = 0x56616C69
};
Validator();
Validator(Effect *effect);

View File

@@ -46,7 +46,7 @@ namespace
{
}
META_StateAttribute(osgFX, ViewMatrixExtractor, 0x564d4548);
META_StateAttribute(osgFX, ViewMatrixExtractor, VIEWMATRIXEXTRACTOR);
int compare(const osg::StateAttribute &sa) const
{

View File

@@ -157,7 +157,7 @@ namespace
{
}
META_StateAttribute(osgFX, ViewMatrixExtractor, 0x564d4548);
META_StateAttribute(osgFX, ViewMatrixExtractor, VIEWMATRIXEXTRACTOR);
int compare(const osg::StateAttribute &sa) const
{