From Art Tevs,
"A new texture class Texture2DArray derived from Texture extends the osg to support the new EXT_texture_array extensions. Texture arrays provides a feature for people interesting in GPGPU programming. Faetures and changes: - Full support for layered 2D textures. - New uniform types were added (sampler2DArray) - FrameBufferObject implementation were changed to support attaching of 2D array textures to the framebuffer - StateSet was slightly changed to support texture arrays. NOTE: array textures can not be used in fixed function pipeline. Thus using the layered texture as a statemode for a Drawable produce invalid enumerant OpenGL errors. - Image class was extended to support handling of array textures Tests: I have used this class as a new feature of my application. It works for me without problems (Note: Texture arrays were introduced only for shading languages and not for fixed function pipelines!!!). RTT with Texture2DArray works, as I have tested them as texture targets for a camera with 6 layers/faces (i.e. replacement for cube maps). I am using the array textures in shader programming. Array textures can be attached to the FBO and used as input and as output."
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
|
||||
#include <osg/TextureCubeMap>
|
||||
#include <osg/TextureRectangle>
|
||||
#include <osg/Texture2DArray>
|
||||
|
||||
#include <set>
|
||||
#include <algorithm>
|
||||
@@ -48,7 +49,8 @@ class TextureGLModeSet
|
||||
_textureModeSet.insert(GL_TEXTURE_3D);
|
||||
|
||||
_textureModeSet.insert(GL_TEXTURE_CUBE_MAP);
|
||||
_textureModeSet.insert(GL_TEXTURE_RECTANGLE_NV);
|
||||
_textureModeSet.insert(GL_TEXTURE_RECTANGLE_NV);
|
||||
_textureModeSet.insert(GL_TEXTURE_2D_ARRAY_EXT);
|
||||
|
||||
_textureModeSet.insert(GL_TEXTURE_GEN_Q);
|
||||
_textureModeSet.insert(GL_TEXTURE_GEN_R);
|
||||
|
||||
Reference in New Issue
Block a user