Added support for TextureCubeMap into osgUtil::RenderToTextureStage.
This commit is contained in:
@@ -17,7 +17,16 @@
|
||||
#include <osg/Texture>
|
||||
|
||||
#ifndef GL_TEXTURE_CUBE_MAP
|
||||
#define GL_TEXTURE_CUBE_MAP 0x8513
|
||||
#define GL_TEXTURE_CUBE_MAP 0x8513
|
||||
#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
|
||||
#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
|
||||
#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
|
||||
#endif
|
||||
|
||||
namespace osg {
|
||||
@@ -110,6 +119,16 @@ class OSG_EXPORT TextureCubeMap : public Texture
|
||||
/** Get the number of mip map levels the the texture has been created with. */
|
||||
unsigned int getNumMipmapLevels() const { return _numMipmapLevels; }
|
||||
|
||||
/** 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 copyTexSubImageCubeMap(State& state, int face, int xoffset, int yoffset, int x, int y, int width, int height );
|
||||
|
||||
|
||||
/** On first apply (unless already compiled), create the mipmapped
|
||||
* texture and bind it. Subsequent apply will simple bind to texture.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user