Improved support for texture subload/render to texture in various Texture classes
and RenderStage.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user