From Terry Welsh, added copy texture support to TextureRectangle

This commit is contained in:
Robert Osfield
2005-04-13 18:19:38 +00:00
parent 789cb7dea7
commit d6d764a729
2 changed files with 145 additions and 0 deletions

View File

@@ -106,6 +106,21 @@ class OSG_EXPORT TextureRectangle : public Texture
SubloadCallback* getSubloadCallback() { return _subloadCallback.get(); }
const SubloadCallback* getSubloadCallback() const { return _subloadCallback.get(); }
/** Copies pixels into a 2D texture image, as per glCopyTexImage2D.
* Creates an OpenGL texture object from the current OpenGL background
* framebuffer contents at position \a x, \a y with width \a width and
* height \a height. \a width and \a height must be a power of two. */
void copyTexImage2D(State& state, int x, int y, int width, int height );
/** Copies a two-dimensional texture subimage, as per
* glCopyTexSubImage2D. Updates a portion of an existing OpenGL
* texture object from the current OpenGL background framebuffer
* contents at position \a x, \a y with width \a width and height
* \a height. Loads framebuffer data into the texture using offsets
* \a xoffset and \a yoffset. \a width and \a height must be powers
* of two. */
void copyTexSubImage2D(State& state, int xoffset, int yoffset, int x, int y, int width, int height );
/** On first apply (unless already compiled), create and bind the
* texture, subsequent apply will simply bind to texture.
*/