From Terry Welsh, added copy texture support to TextureRectangle
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user