Work on supporting multitexturing in State/StateSet/StateAttribute/Geoemtry.

This commit is contained in:
Robert Osfield
2002-07-07 14:40:41 +00:00
parent 9787641512
commit 0801b363f5
18 changed files with 923 additions and 171 deletions

View File

@@ -84,7 +84,6 @@ class SG_EXPORT Texture : public StateAttribute
_modifiedTag(),
_image(copyop(text._image.get())),
_target(text._target),
_textureUnit(text._textureUnit),
_wrap_s(text._wrap_s),
_wrap_t(text._wrap_t),
_wrap_r(text._wrap_r),
@@ -102,7 +101,7 @@ class SG_EXPORT Texture : public StateAttribute
_subloadWidth(text._subloadWidth),
_subloadHeight(text._subloadHeight) {}
META_StateAttribute(osg, Texture,(Type)(TEXTURE_0+_textureUnit));
META_StateAttribute(osg, Texture,TEXTURE);
/** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/
virtual int compare(const StateAttribute& rhs) const;
@@ -136,17 +135,6 @@ class SG_EXPORT Texture : public StateAttribute
*/
void copyTexSubImage2D(State& state, int xoffset, int yoffset, int x, int y, int width, int height );
/** Set the texture unit.
* Valid values are 0,1,2,3.
* Default value of texture unit is 0.
* note, multi-texturing not fully implemented yet... April 2001.
*/
inline void setTextureUnit(const unsigned int textureUnit) { _textureUnit = textureUnit; }
/** get the texture unit.*/
inline const unsigned int getTextureUnit() const { return _textureUnit; }
enum WrapParameter {
WRAP_S,
WRAP_T,
@@ -342,8 +330,6 @@ class SG_EXPORT Texture : public StateAttribute
GLenum _target; // defaults to GL_TEXTURE_2D
unsigned int _textureUnit;
WrapMode _wrap_s;
WrapMode _wrap_t;
WrapMode _wrap_r;