Improved support for texture subload/render to texture in various Texture classes

and RenderStage.
This commit is contained in:
Robert Osfield
2005-11-04 12:08:16 +00:00
parent 89b0ef09a8
commit 4915259878
13 changed files with 123 additions and 33 deletions

View File

@@ -71,16 +71,10 @@ class OSG_EXPORT Texture1D : public Texture
/** Sets the texture width. If width is zero, calculate the value
* from the source image width. */
inline void setTextureSize(int width) const
{
_textureWidth = width;
}
inline void setTextureWidth(int width) const { _textureWidth = width; }
/** Gets the texture subload width. */
inline void getTextureSize(int& width) const
{
width = _textureWidth;
}
/** Gets the texture width. */
inline int getTextureWidth() const { return _textureWidth; }
class OSG_EXPORT SubloadCallback : public Referenced

View File

@@ -84,6 +84,15 @@ class OSG_EXPORT Texture3D : public Texture
depth = _textureDepth;
}
void setTextureWidth(int width) { _textureWidth=width; }
int getTextureWidth() const { return _textureWidth; }
void setTextureHeight(int height) { _textureHeight=height; }
int getTextureHeight() const { return _textureHeight; }
void setTextureDepth(int depth) { _textureDepth=depth; }
int getTextureDepth() const { return _textureDepth; }
class OSG_EXPORT SubloadCallback : public Referenced
{

View File

@@ -85,13 +85,11 @@ class OSG_EXPORT TextureCubeMap : public Texture
_textureHeight = height;
}
/** Get the texture subload width. */
inline void getTextureSize(int& width, int& height) const
{
width = _textureWidth;
height = _textureHeight;
}
void setTextureWidth(int width) { _textureWidth=width; }
int getTextureWidth() const { return _textureWidth; }
void setTextureHeight(int height) { _textureHeight=height; }
int getTextureHeight() const { return _textureHeight; }
class OSG_EXPORT SubloadCallback : public Referenced
{

View File

@@ -84,12 +84,11 @@ class OSG_EXPORT TextureRectangle : public Texture
_textureHeight = height;
}
/** Get the texture subload width. */
inline void getTextureSize(int& width, int& height) const
{
width = _textureWidth;
height = _textureHeight;
}
void setTextureWidth(int width) { _textureWidth=width; }
int getTextureWidth() const { return _textureWidth; }
void setTextureHeight(int height) { _textureHeight=height; }
int getTextureHeight() const { return _textureHeight; }
class SubloadCallback : public Referenced
{