#include
<oglplus/dsa/texture.hpp>
#if GL_VERSION_4_5 || GL_ARB_direct_state_access template <> class ObjectOps<tag::DirectState, tag::Texture> : public ObjZeroOps<tag::DirectState, tag::Texture> { public: struct Property { typedef TextureCompareMode CompareMode; typedef TextureFilter Filter; typedef TextureMagFilter MagFilter; typedef TextureMinFilter MinFilter; typedef TextureSwizzleCoord SwizzleCoord; typedef TextureSwizzle Swizzle; #if GL_ARB_texture_swizzle typedef TextureSwizzleTuple SwizzleTuple; #endif typedef TextureWrapCoord WrapCoord; typedef TextureWrap Wrap; typedef OneOf< DataType, PixelDataType > PixDataType; }; SizeType Width(GLint level = 0) const; SizeType Height(GLint level = 0) const; SizeType Depth(GLint level = 0) const; PixelDataType RedType(GLint level = 0) const; PixelDataType GreenType(GLint level = 0) const; PixelDataType BlueType(GLint level = 0) const; PixelDataType AlphaType(GLint level = 0) const; PixelDataType DepthType(GLint level = 0) const; SizeType RedSize(GLint level = 0) const; SizeType GreenSize(GLint level = 0) const; SizeType BlueSize(GLint level = 0) const; SizeType AlphaSize(GLint level = 0) const; SizeType DepthSize(GLint level = 0) const; SizeType StencilSize(GLint level = 0) const; SizeType SharedSize(GLint level = 0) const; (16)
Indirectly inherits from ObjCommonOps<tag::Texture>. |
|
Returns the width of the texture image on the specified |
|
Returns the height of the texture image on the specified |
|
Returns the depth of the texture image on the specified |
|
Returns the data type used to store the RED component. See |
|
Returns the data type used to store the GREEN component. See |
|
Returns the data type used to store the BLUE component. See |
|
Returns the data type used to store the ALPHA component. See |
|
Returns the data type used to store the DEPTH component. See |
|
Returns the actual resolution of the RED component. See |
|
Returns the actual resolution of the GREEN component. See |
|
Returns the actual resolution of the BLUE component. See |
|
Returns the actual resolution of the ALPHA component. See |
|
Returns the actual resolution of the DEPTH component. See |
|
Returns the actual resolution of the STENCIL component. See |
|
Returns the actual resolution of all texture components. See |
SizeType CompressedImageSize(GLint level = 0) const; PixelDataInternalFormat InternalFormat(GLint level = 0) const; void GetImage( GLint level, PixelDataFormat format, const OutputData& dest ) const; void GetImage( GLint level, PixelDataFormat format, Property::PixDataType type, SizeType size, GLvoid* buffer ) const; void GetCompressedImage( GLint level, const OutputData& dest ) const; void GetCompressedImage( GLint level, std::vector<GLubyte>& dest ) const; void GetCompressedImage( GLint level, SizeType size, GLubyte* buffer ) const; ObjectOps& Image3D( GLint level, PixelDataInternalFormat internal_format, SizeType width, SizeType height, SizeType depth, GLint border, PixelDataFormat format, Property::PixDataType type, const void* data ); ObjectOps& Image3D( const images::Image& image, GLint level = 0, GLint border = 0 ); ObjectOps& SubImage3D( GLint level, GLint xoffs, GLint yoffs, GLint zoffs, SizeType width, SizeType height, SizeType depth, PixelDataFormat format, Property::PixDataType type, const void* data ); ObjectOps& SubImage3D( const images::Image& image, GLint xoffs, GLint yoffs, GLint zoffs, GLint level = 0 ); ObjectOps& Image2D( GLint level, PixelDataInternalFormat internal_format, SizeType width, SizeType height, GLint border, PixelDataFormat format, Property::PixDataType type, const void* data ); ObjectOps& Image2D( const images::Image& image, GLint level = 0, GLint border = 0 ); ObjectOps& SubImage2D( GLint level, GLint xoffs, GLint yoffs, SizeType width, SizeType height, PixelDataFormat format, Property::PixDataType type, const void* data ); ObjectOps& SubImage2D( const images::Image& image, GLint xoffs, GLint yoffs, GLint level = 0 ); ObjectOps& Image1D( GLint level, PixelDataInternalFormat internal_format, SizeType width, GLint border, PixelDataFormat format, Property::PixDataType type, const void* data ); ObjectOps& Image1D( const images::Image& image, GLint level = 0, GLint border = 0 ); ObjectOps& SubImage1D( GLint level, GLint xoffs, SizeType width, PixelDataFormat format, Property::PixDataType type, const void* data ); ObjectOps& SubImage1D( const images::Image& image, GLint xoffs, GLint level = 0 );
Returns the size (in bytes) of the image array if it is compressed.
See |
||||
Returns the internal data format of the image array. See |
||||
Stores the image of
|
||||
Stores the image of |
||||
Specifies a three dimensional texture image. See |
||||
Specifies a three dimensional texture subimage. See |
||||
Specifies a two dimensional texture image. See |
||||
Specifies a two dimensional texture subimage. See |
||||
Specifies a one dimensional texture image. See |
||||
Specifies a one dimensional texture subimage. See |
ObjectOps& CopySubImage3D( GLint level, GLint xoffs, GLint yoffs, GLint zoffs, GLint x, GLint y, SizeType width, SizeType height ); ObjectOps& CopySubImage2D( GLint level, GLint xoffs, GLint yoffs, GLint x, GLint y, SizeType width, SizeType height ); ObjectOps& CopySubImage1D( GLint level, GLint xoffs, GLint x, GLint y, SizeType width ); ObjectOps& CompressedSubImage3D( GLint level, GLint xoffs, GLint yoffs, GLint zoffs, SizeType width, SizeType height, SizeType depth, PixelDataFormat format, SizeType image_size, const void* data ); ObjectOps& CompressedSubImage2D( GLint level, GLint xoffs, GLint yoffs, SizeType width, SizeType height, PixelDataFormat format, SizeType image_size, const void* data ); ObjectOps& CompressedSubImage1D( GLint level, GLint xoffs, SizeType width, PixelDataFormat format, SizeType image_size, const void* data );
Copies a three dimensional texture subimage from the current framebuffer.
See |
|
Copies a two dimensional texture subimage from the current framebuffer.
See |
|
Copies a one dimensional texture subimage from the current framebuffer.
See |
|
Specifies a three dimensional compressed texture subimage. See |
|
Specifies a two dimensional compressed texture subimage. See |
|
Specifies a one dimensional compressed texture subimage. See |
ObjectOps& Buffer( PixelDataInternalFormat internal_format, BufferName buffer ); #if GL_ARB_texture_storage static void Storage3D( TextureTarget target, SizeType levels, PixelDataInternalFormat internal_format, SizeType width, SizeType height, SizeType depth ); static void Storage2D( TextureTarget target, SizeType levels, PixelDataInternalFormat internal_format, SizeType width, SizeType height ); static void Storage1D( TextureTarget target, SizeType levels, PixelDataInternalFormat internal_format, SizeType width ); #endif GLuint BaseLevel(void) const; ObjectOps& BaseLevel(GLuint level); Vector<GLfloat, 4> BorderColor(TypeTag<GLfloat>) const; Vector<GLint, 4> BorderColor(TypeTag<GLint>) const; Vector<GLuint, 4> BorderColor(TypeTag<GLuint>) const; ObjectOps& BorderColor(Vector<GLfloat, 4> color); ObjectOps& BorderColor(Vector<GLint, 4> color); ObjectOps& BorderColor(Vector<GLuint, 4> color); TextureCompareMode CompareMode(void) const; ObjectOps& CompareMode(TextureCompareMode mode); CompareFunction CompareFunc(void) const; ObjectOps& CompareFunc(CompareFunction func);
Assigns a buffer storing the texel data to the texture. See |
|
Specifies all levels of 3D texture at the same time. See |
|
Specifies all levels of 2D texture at the same time. See |
|
Specifies all levels of 1D texture at the same time. See |
|
Returns the texture base level. See |
|
Sets the texture base level. See |
|
Gets the texture border color. See |
|
Sets the texture border color. See |
|
Gets the texture compare mode. See |
|
Sets the texture compare mode. See |
|
Gets the texture compare function. See |
|
Sets the texture compare function. See |
GLfloat LODBias(void) const; ObjectOps& LODBias(GLfloat value); ObjectOps& Filter(TextureFilter filter); TextureMagFilter MagFilter(void) const; ObjectOps& MagFilter(TextureMagFilter filter); TextureMinFilter MinFilter(void) const; ObjectOps& MinFilter(TextureMinFilter filter); GLfloat MinLOD(void) const; ObjectOps& MinLOD(GLfloat value); GLfloat MaxLOD(void) const; ObjectOps& MaxLOD(GLfloat value); GLint MaxLevel(void) const; ObjectOps& MaxLevel(GLint value);
Gets the level-of-detail bias value. See |
|
Sets the level-of-detail bias value. See |
|
Sets both the minification and magnification filter. See |
|
Gets the magnification filter. See |
|
Sets the magnification filter. See |
|
Gets the minification filter. See |
|
Sets the minification filter. See |
|
Gets minimal level-of-detail value. See |
|
Sets minimal level-of-detail value. See |
|
Gets maximal level-of-detail value. See |
|
Sets maximal level-of-detail value. See |
|
Gets the maximum level value. See |
|
Sets the maximum level value. See |
GLfloat MaxAnisotropy(void) const; GLfloat Anisotropy(void) const; ObjectOps& Anisotropy(GLfloat value); #if GL_ARB_texture_swizzle TextureSwizzle Swizzle(TextureSwizzleCoord coord) const; TextureSwizzle SwizzleR(void) const; TextureSwizzle SwizzleG(void) const; TextureSwizzle SwizzleB(void) const; TextureSwizzle SwizzleA(void) const; TextureSwizzleTuple SwizzleRGBA(void) const; ObjectOps& Swizzle( TextureSwizzleCoord coord, TextureSwizzle mode ); ObjectOps& SwizzleR(TextureSwizzle mode); ObjectOps& SwizzleG(TextureSwizzle mode); ObjectOps& SwizzleB(TextureSwizzle mode); ObjectOps& SwizzleA(TextureSwizzle mode); ObjectOps& SwizzleRGBA(TextureSwizzle mode); ObjectOps& SwizzleRGBA( TextureSwizzle mode_r, TextureSwizzle mode_g, TextureSwizzle mode_b, TextureSwizzle mode_a ); ObjectOps& SwizzleRGBA(const TextureSwizzleTuple& modes); #endif TextureWrap Wrap(TextureWrapCoord coord) const; TextureWrap WrapS(void) const; TextureWrap WrapT(void) const; TextureWrap WrapR(void) const; ObjectOps& Wrap( TextureWrapCoord coord, TextureWrap mode ); ObjectOps& WrapS(TextureWrap mode); ObjectOps& WrapT(TextureWrap mode); ObjectOps& WrapR(TextureWrap mode); PixelDataFormat DepthStencilMode(void) const; ObjectOps& DepthStencilMode(PixelDataFormat mode); #if GL_ARB_seamless_cubemap_per_texture Boolean Seamless(void); ObjectOps& Seamless(Boolean enable); #endif ObjectOps& GenerateMipmap(void) };
Gets the maximum anisotropy value. See |
|
Gets the current anisotropy level. See |
|
Sets the anisotropy level. See |
|
Gets the swizzle parameter. See |
|
Sets the swizzle parameter. See |
|
Gets the swizzle parameter. See |
|
Sets the swizzle parameter. See |
|
Gets the depth stencil mode parameter. See |
|
Sets the depth stencil mode parameter. See |
|
Gets the seamless cubemap setting value. See |
|
Changes the seamless cubemap setting value. See |
|
Generates mipmap for the texture bound to the specified target. See
|
typedef ObjectOps<tag::DirectState, tag::Texture> DSATextureOps; typedef Object<DSATextureOps> Texture;
struct DSATextureOpsAndSlot { }; DSATextureOpsAndSlot operator | ( DSATextureOps& tex, GLuint slot ); DSATextureOps& operator << ( DSATextureOps& tex, TextureTarget target ); DSATextureOps& operator << ( DSATextureOps& tex, TextureFilter filter ); DSATextureOps& operator << ( DSATextureOps& tex, TextureMinFilter filter ); DSATextureOps& operator << ( DSATextureOps& tex, TextureMagFilter filter ); DSATextureOps& operator << ( DSATextureOps& tex, TextureCompareMode mode ); DSATextureOps& operator << ( DSATextureOps& tex, CompareFunction func ); DSATextureOps& operator << ( DSATextureOpsAndSlot tas, TextureWrap wrap ); DSATextureOps& operator << ( DSATextureOps& tex, TextureSwizzle swizzle ); DSATextureOps& operator << ( DSATextureOpsAndSlot tas, TextureSwizzle swizzle ); template <typename T> DSATextureOps& operator << ( DSATextureOps& tex, const Vector<T, 4>& col ); // TODO #endif // GL_VERSION_4_5 || GL_ARB_direct_state_access