13 #ifndef OGLPLUS_TEXTURE_1107121519_HPP
14 #define OGLPLUS_TEXTURE_1107121519_HPP
27 #include <oglplus/texture_compare.hpp>
54 static void Gen(tag::Generate, GLsizei count, GLuint* names)
56 assert(names !=
nullptr);
57 OGLPLUS_GLFUNC(GenTextures)(count, names);
58 OGLPLUS_CHECK_SIMPLE(GenTextures);
60 #if GL_VERSION_4_5 || GL_ARB_direct_state_access
68 assert(names !=
nullptr);
69 OGLPLUS_GLFUNC(CreateTextures)(target, count, names);
70 OGLPLUS_CHECK_SIMPLE(CreateTextures);
75 void Gen(tag::Create create, GLsizei count, GLuint* names)
77 Gen(create, _type, count, names);
81 static void Delete(GLsizei count, GLuint* names)
83 assert(names !=
nullptr);
84 OGLPLUS_GLFUNC(DeleteTextures)(count, names);
85 OGLPLUS_VERIFY_SIMPLE(DeleteTextures);
88 static GLboolean IsA(GLuint name)
91 GLboolean result = OGLPLUS_GLFUNC(IsTexture)(name);
92 OGLPLUS_VERIFY_SIMPLE(IsTexture);
98 struct ObjectSubtype<tag::
Texture>
135 OGLPLUS_GLFUNC(BindTexture)(
147 #if OGLPLUS_DOCUMENTATION_ONLY ||GL_VERSION_4_2 ||GL_ARB_shader_image_load_store
164 OGLPLUS_GLFUNC(BindImageTexture)(
168 layered? GL_TRUE : GL_FALSE,
183 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_4 || GL_ARB_multi_bind
190 OGLPLUS_GLFUNC(BindTextures)(
195 OGLPLUS_VERIFY_SIMPLE(BindTextures);
198 static void BindImage(
204 OGLPLUS_GLFUNC(BindImageTextures)(
209 OGLPLUS_VERIFY_SIMPLE(BindImageTextures);
243 GLsizei(textures.
size()),
257 ,
public ObjBindingOps<tag::Texture>
273 OGLPLUS_GLFUNC(ActiveTexture)(
274 GLenum(GL_TEXTURE0 + GLuint(index))
294 OGLPLUS_GLFUNC(GetIntegerv)(GL_ACTIVE_TEXTURE, &result);
298 EnumParam(GLenum(GL_ACTIVE_TEXTURE))
300 return GL_TEXTURE0 - result;
317 return Target(GL_TEXTURE_CUBE_MAP_POSITIVE_X+face);
321 #if OGLPLUS_DOCUMENTATION_ONLY ||GL_VERSION_4_2 ||GL_ARB_shader_image_load_store
335 #if OGLPLUS_DOCUMENTATION_ONLY ||GL_VERSION_4_2 ||GL_ARB_shader_image_load_store
351 BindImage(unit, *
this, level, layered, layer, access, format);
355 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_3
364 OGLPLUS_GLFUNC(InvalidateTexImage)(_name, level);
389 OGLPLUS_GLFUNC(InvalidateTexSubImage)(
400 InvalidateTexSubImage,
408 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_4
415 template <
typename GLtype>
422 OGLPLUS_GLFUNC(ClearTexImage)(
426 GLenum(GetDataType<GLtype>()),
443 template <
typename GLtype>
456 OGLPLUS_GLFUNC(ClearTexImage)(
466 GLenum(GetDataType<GLtype>()),
478 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_3 || GL_ARB_texture_view
495 OGLPLUS_GLFUNC(TextureView)(
499 GLenum(internal_format),
547 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_3 || GL_ARB_texture_swizzle
568 static GLint GetIntParam(
Target target, GLenum query);
569 static GLfloat GetFloatParam(
Target target, GLenum query);
571 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_0
572 static GLint GetIntParam(
Target target, GLint level, GLenum query);
573 static GLfloat GetFloatParam(
Target target, GLint level, GLenum query);
586 return GLsizei(GetIntParam(target, level, GL_TEXTURE_WIDTH));
600 return GLsizei(GetIntParam(target, level, GL_TEXTURE_HEIGHT));
614 return GLsizei(GetIntParam(target, level, GL_TEXTURE_DEPTH));
653 GL_TEXTURE_GREEN_TYPE
693 GL_TEXTURE_ALPHA_TYPE
713 GL_TEXTURE_DEPTH_TYPE
731 return GLsizei(GetIntParam(
752 return GLsizei(GetIntParam(
755 GL_TEXTURE_GREEN_SIZE
773 return GLsizei(GetIntParam(
794 return GLsizei(GetIntParam(
797 GL_TEXTURE_ALPHA_SIZE
815 return GLsizei(GetIntParam(
818 GL_TEXTURE_DEPTH_SIZE
836 return GLsizei(GetIntParam(
839 GL_TEXTURE_STENCIL_SIZE
858 return GLsizei(GetIntParam(
861 GL_TEXTURE_SHARED_SIZE
873 return GLsizei(GetIntParam(
876 GL_TEXTURE_COMPRESSED_IMAGE_SIZE
894 GL_TEXTURE_INTERNAL_FORMAT
913 static void GetImage(
944 GetImage(target, level, format,
OutputData(type, size, buffer));
957 static void GetCompressedImage(
980 GetCompressedImage(target, level,
OutputData(size, buffer));
993 static void GetCompressedImage(
996 std::vector<GLubyte>& dest
998 #endif // GL_VERSION_3_0
1018 OGLPLUS_GLFUNC(TexImage3D)(
1021 GLint(internal_format),
1033 ObjectBinding(target).
1034 EnumParam(internal_format).
1070 OGLPLUS_GLFUNC(TexSubImage3D)(
1086 ObjectBinding(target).
1097 static void SubImage3D(
1123 OGLPLUS_GLFUNC(TexImage2D)(
1126 GLint(internal_format),
1137 ObjectBinding(target).
1138 EnumParam(internal_format).
1181 Target target =
Target(GL_TEXTURE_CUBE_MAP_POSITIVE_X+face);
1182 OGLPLUS_GLFUNC(TexImage2D)(
1185 GLint(internal_format),
1196 ObjectBinding(target).
1215 static void ImageCM(
1239 OGLPLUS_GLFUNC(TexSubImage2D)(
1253 ObjectBinding(target).
1264 static void SubImage2D(
1272 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_0
1289 OGLPLUS_GLFUNC(TexImage1D)(
1292 GLint(internal_format),
1302 ObjectBinding(target).
1303 EnumParam(internal_format).
1335 OGLPLUS_GLFUNC(TexSubImage1D)(
1347 ObjectBinding(target).
1358 static void SubImage1D(
1364 #endif // GL_VERSION_3_0
1389 const images::ImageSpec& image_spec,
1410 OGLPLUS_GLFUNC(CopyTexImage2D)(
1413 GLint(internal_format),
1423 ObjectBinding(target).
1424 EnumParam(internal_format).
1429 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_0
1445 OGLPLUS_GLFUNC(CopyTexImage1D)(
1448 GLint(internal_format),
1457 ObjectBinding(target).
1458 EnumParam(internal_format).
1462 #endif // GL_VERSION_3_0
1481 OGLPLUS_GLFUNC(CopyTexSubImage3D)(
1495 ObjectBinding(target).
1516 OGLPLUS_GLFUNC(CopyTexSubImage2D)(
1529 ObjectBinding(target).
1534 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_0
1549 OGLPLUS_GLFUNC(CopyTexSubImage1D)(
1560 ObjectBinding(target).
1564 #endif // GL_VERSION_3_0
1583 OGLPLUS_GLFUNC(CompressedTexImage3D)(
1586 GLint(internal_format),
1595 CompressedTexImage3D,
1597 ObjectBinding(target).
1598 EnumParam(internal_format).
1619 OGLPLUS_GLFUNC(CompressedTexImage2D)(
1622 GLint(internal_format),
1630 CompressedTexImage2D,
1632 ObjectBinding(target).
1633 EnumParam(internal_format).
1638 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_0
1654 OGLPLUS_GLFUNC(CompressedTexImage1D)(
1657 GLint(internal_format),
1664 CompressedTexImage1D,
1666 ObjectBinding(target).
1667 EnumParam(internal_format).
1671 #endif // GL_VERSION_3_0
1692 OGLPLUS_GLFUNC(CompressedTexSubImage3D)(
1706 CompressedTexSubImage3D,
1708 ObjectBinding(target).
1731 OGLPLUS_GLFUNC(CompressedTexSubImage2D)(
1743 CompressedTexSubImage2D,
1745 ObjectBinding(target).
1751 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_0
1767 OGLPLUS_GLFUNC(CompressedTexSubImage1D)(
1777 CompressedTexSubImage1D,
1779 ObjectBinding(target).
1786 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_2 || GL_ARB_texture_multisample
1800 bool fixed_sample_locations
1803 OGLPLUS_GLFUNC(TexImage3DMultisample)(
1806 GLint(internal_format),
1810 fixed_sample_locations ? GL_TRUE : GL_FALSE
1813 TexImage3DMultisample,
1815 ObjectBinding(target).
1816 EnumParam(internal_format)
1832 bool fixed_sample_locations
1835 OGLPLUS_GLFUNC(TexImage2DMultisample)(
1838 GLint(internal_format),
1841 fixed_sample_locations ? GL_TRUE : GL_FALSE
1844 TexImage2DMultisample,
1846 ObjectBinding(target).
1847 EnumParam(internal_format)
1850 #endif // texture multisample
1852 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_1
1865 OGLPLUS_GLFUNC(TexBuffer)(
1867 GLenum(internal_format),
1874 ObjectBinding(target).
1875 EnumParam(internal_format)
1880 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_3
1895 OGLPLUS_GLFUNC(TexBufferRange)(
1897 GLenum(internal_format),
1906 ObjectBinding(target).
1907 EnumParam(internal_format)
1912 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_2 || GL_ARB_texture_storage
1926 OGLPLUS_GLFUNC(TexStorage1D)(
1929 GLenum(internal_format),
1935 ObjectBinding(target).
1936 EnumParam(internal_format)
1954 OGLPLUS_GLFUNC(TexStorage2D)(
1957 GLenum(internal_format),
1964 ObjectBinding(target).
1965 EnumParam(internal_format)
1984 OGLPLUS_GLFUNC(TexStorage3D)(
1987 GLenum(internal_format),
1995 ObjectBinding(target).
1996 EnumParam(internal_format)
2009 return GetIntParam(target, GL_TEXTURE_BASE_LEVEL);
2020 OGLPLUS_GLFUNC(TexParameteri)(
2022 GL_TEXTURE_BASE_LEVEL,
2028 ObjectBinding(target).
2033 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_0
2043 OGLPLUS_GLFUNC(GetTexParameterfv)(
2045 GL_TEXTURE_BORDER_COLOR,
2051 ObjectBinding(target)
2064 OGLPLUS_GLFUNC(TexParameterfv)(
2066 GL_TEXTURE_BORDER_COLOR,
2072 ObjectBinding(target)
2085 OGLPLUS_GLFUNC(GetTexParameterIiv)(
2087 GL_TEXTURE_BORDER_COLOR,
2093 ObjectBinding(target)
2106 OGLPLUS_GLFUNC(TexParameterIiv)(
2108 GL_TEXTURE_BORDER_COLOR,
2114 ObjectBinding(target)
2127 OGLPLUS_GLFUNC(GetTexParameterIuiv)(
2129 GL_TEXTURE_BORDER_COLOR,
2133 GetTexParameterIuiv,
2135 ObjectBinding(target)
2148 OGLPLUS_GLFUNC(TexParameterIuiv)(
2150 GL_TEXTURE_BORDER_COLOR,
2156 ObjectBinding(target)
2159 #endif // GL_VERSION_3_0
2171 GL_TEXTURE_COMPARE_MODE
2183 OGLPLUS_GLFUNC(TexParameteri)(
2185 GL_TEXTURE_COMPARE_MODE,
2191 ObjectBinding(target).
2206 GL_TEXTURE_COMPARE_FUNC
2218 OGLPLUS_GLFUNC(TexParameteri)(
2220 GL_TEXTURE_COMPARE_FUNC,
2226 ObjectBinding(target).
2231 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_0
2240 return GetFloatParam(target, GL_TEXTURE_LOD_BIAS);
2251 OGLPLUS_GLFUNC(TexParameterf)(
2253 GL_TEXTURE_LOD_BIAS,
2259 ObjectBinding(target)
2262 #endif // GL_VERSION_3_0
2273 OGLPLUS_GLFUNC(TexParameteri)(
2275 GL_TEXTURE_MIN_FILTER,
2281 ObjectBinding(target).
2284 OGLPLUS_GLFUNC(TexParameteri)(
2286 GL_TEXTURE_MAG_FILTER,
2292 ObjectBinding(target).
2307 GL_TEXTURE_MAG_FILTER
2319 OGLPLUS_GLFUNC(TexParameteri)(
2321 GL_TEXTURE_MAG_FILTER,
2327 ObjectBinding(target).
2342 GL_TEXTURE_MIN_FILTER
2354 OGLPLUS_GLFUNC(TexParameteri)(
2356 GL_TEXTURE_MIN_FILTER,
2362 ObjectBinding(target).
2375 return GetFloatParam(target, GL_TEXTURE_MIN_LOD);
2386 OGLPLUS_GLFUNC(TexParameterf)(
2394 ObjectBinding(target)
2406 return GetFloatParam(target, GL_TEXTURE_MAX_LOD);
2417 OGLPLUS_GLFUNC(TexParameterf)(
2425 ObjectBinding(target)
2437 return GetIntParam(target, GL_TEXTURE_MAX_LEVEL);
2448 OGLPLUS_GLFUNC(TexParameteri)(
2450 GL_TEXTURE_MAX_LEVEL,
2456 ObjectBinding(target)
2468 #ifdef GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT
2469 return GetFloatParam(
2471 GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT
2474 OGLPLUS_FAKE_USE(target);
2487 #ifdef GL_TEXTURE_MAX_ANISOTROPY_EXT
2488 return GetFloatParam(
2490 GL_TEXTURE_MAX_ANISOTROPY_EXT
2493 OGLPLUS_FAKE_USE(target);
2506 #ifdef GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT
2507 OGLPLUS_GLFUNC(TexParameterf)(
2509 GL_TEXTURE_MAX_ANISOTROPY_EXT,
2515 ObjectBinding(target)
2518 OGLPLUS_FAKE_USE(target);
2519 OGLPLUS_FAKE_USE(value);
2523 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_3 || GL_ARB_texture_swizzle
2550 OGLPLUS_GLFUNC(TexParameteri)(
2558 ObjectBinding(target).
2669 OGLPLUS_GLFUNC(GetTexParameteriv)(
2671 GL_TEXTURE_SWIZZLE_RGBA,
2677 ObjectBinding(target)
2691 GLint m = GLint(GLenum(mode));
2692 GLint params[4] = {m, m, m, m};
2694 OGLPLUS_GLFUNC(TexParameteriv)(
2696 GL_TEXTURE_SWIZZLE_RGBA,
2702 ObjectBinding(target).
2723 GLint(GLenum(mode_r)),
2724 GLint(GLenum(mode_g)),
2725 GLint(GLenum(mode_b)),
2726 GLint(GLenum(mode_a))
2729 OGLPLUS_GLFUNC(TexParameteriv)(
2731 GL_TEXTURE_SWIZZLE_RGBA,
2737 ObjectBinding(target)
2750 OGLPLUS_GLFUNC(TexParameteriv)(
2752 GL_TEXTURE_SWIZZLE_RGBA,
2758 ObjectBinding(target)
2761 #endif // texture swizzle
2787 OGLPLUS_GLFUNC(TexParameteri)(
2795 ObjectBinding(target).
2866 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_3
2878 GL_DEPTH_STENCIL_TEXTURE_MODE
2894 OGLPLUS_GLFUNC(TexParameteri)(
2896 GL_DEPTH_STENCIL_TEXTURE_MODE,
2902 ObjectBinding(target).
2908 #if OGLPLUS_DOCUMENTATION_ONLY || GL_ARB_seamless_cubemap_per_texture
2920 GL_TEXTURE_CUBE_MAP_SEAMLESS
2933 OGLPLUS_GLFUNC(TexParameteri)(
2935 GL_TEXTURE_CUBE_MAP_SEAMLESS,
2936 enable?GL_TRUE:GL_FALSE
2941 ObjectBinding(target)
2946 #if OGLPLUS_DOCUMENTATION_ONLY || \
2948 GL_ARB_texture_barrier || \
2949 GL_NV_texture_barrier
2958 #if GL_VERSION_4_5 || GL_ARB_texture_barrier
2959 OGLPLUS_GLFUNC(TextureBarrier)();
2960 OGLPLUS_VERIFY_SIMPLE(TextureBarrier);
2961 #elif GL_NV_texture_barrier
2962 OGLPLUS_GLFUNC(TextureBarrierNV)();
2963 OGLPLUS_VERIFY_SIMPLE(TextureBarrierNV);
2975 OGLPLUS_GLFUNC(GenerateMipmap)(GLenum(target));
2979 ObjectBinding(target)
2985 typedef ObjZeroOps<tag::ExplicitSel, tag::Texture>
2990 :
public ObjZeroOps<tag::ExplicitSel, tag::Texture>
2997 typedef ObjectOps<tag::ExplicitSel, tag::Texture>
3005 struct TextureTargetAndSlot
3017 inline TextureTargetAndSlot operator | (
TextureTarget target, GLuint slot)
3019 return TextureTargetAndSlot(target, slot);
3023 struct TextureUnitAndTarget
3025 TextureUnitSelector unit;
3028 TextureUnitAndTarget(TextureUnitSelector u,
TextureTarget t)
3035 inline TextureUnitAndTarget operator | (
3036 TextureUnitSelector unit,
3040 return TextureUnitAndTarget(unit, tex);
3097 default: assert(!
"Invalid texture wrap dimension");
3103 inline TextureTargetAndSlot operator << (
3104 TextureTargetAndSlot tas,
3113 default: assert(!
"Invalid texture wrap slot");
3118 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_3 || GL_ARB_texture_swizzle
3127 inline TextureTargetAndSlot operator << (
3128 TextureTargetAndSlot tas,
3138 default: assert(!
"Invalid texture swizzle slot");
3144 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_0
3146 template <
typename T>
3149 const Vector<T, 4>& col
3160 const images::Image& image
3170 const images::ImageSpec& image_spec
3179 TextureTargetAndSlot tas,
3180 const images::Image& image
3189 TextureTargetAndSlot tas,
3190 const images::ImageSpec& image_spec
3221 #if !OGLPLUS_LINK_LIBRARY || defined(OGLPLUS_IMPLEMENTING_LIBRARY)
3222 #include <oglplus/texture.ipp>
3223 #endif // OGLPLUS_LINK_LIBRARY
3225 #endif // include guard
static void Filter(Target target, TextureFilter filter)
Sets both the minification and magnification filter.
Definition: texture.hpp:2271
TextureMagFilter MagFilter
Magnification filter.
Definition: texture.hpp:536
Texture wrap enumerations.
static TextureWrap WrapS(Target target)
Gets the wrap parameter (TEXTURE_WRAP_S)
Definition: texture.hpp:2806
static void SwizzleB(Target target, TextureSwizzle mode)
Sets the swizzle parameter (TEXTURE_SWIZZLE_B)
Definition: texture.hpp:2630
static TextureCompareMode CompareMode(Target target)
Gets the compare mode (TEXTURE_COMPARE_MODE)
Definition: texture.hpp:2167
static void MagFilter(Target target, TextureMagFilter filter)
Sets the magnification filter (TEXTURE_MAG_FILTER)
Definition: texture.hpp:2317
ObjZeroOps< tag::ExplicitSel, tag::Texture > DefaultTextureOps
DefaultTexture operations with explicit selector.
Definition: texture.hpp:2986
Common base class for Object name sequences.
Definition: fwd.hpp:139
static void SubImage1D(Target target, GLint level, GLint xoffs, GLsizei width, PixelDataFormat format, Property::PixDataType type, const void *data)
Specifies a one dimensional texture sub image.
Definition: texture.hpp:1325
static void Wrap(Target target, TextureWrapCoord coord, TextureWrap mode)
Sets the wrap parameter (TEXTURE_WRAP_*)
Definition: texture.hpp:2781
static void Storage3D(Target target, GLsizei levels, PixelDataInternalFormat internal_format, GLsizei width, GLsizei height, GLsizei depth)
Specifies all levels of 3D texture at the same time.
Definition: texture.hpp:1975
static void CompressedSubImage1D(Target target, GLint level, GLint xoffs, GLsizei width, PixelDataFormat format, GLsizei image_size, const void *data)
Specifies a one dimensional compressed texture sub image.
Definition: texture.hpp:1757
static CompareFunction CompareFunc(Target target)
Sets the compare function (TEXTURE_COMPARE_FUNC)
Definition: texture.hpp:2202
static void BorderColor(Target target, Vector< GLfloat, 4 > color)
Sets the texture border color (TEXTURE_BORDER_COLOR)
Definition: texture.hpp:2062
TextureSwizzle
Texture swizzle enumeration.
Definition: texture_swizzle.hpp:53
static PixelDataFormat DepthStencilMode(Target target)
Gets the depth stencil mode parameter (DEPTH_STENCIL_TEXTURE_MODE)
Definition: texture.hpp:2874
static void CompressedImage2D(Target target, GLint level, PixelDataInternalFormat internal_format, GLsizei width, GLsizei height, GLint border, GLsizei image_size, const void *data)
Specifies a two dimensional compressed texture image.
Definition: texture.hpp:1608
TextureWrapCoord WrapCoord
Texture wrap mode for coordinate.
Definition: texture.hpp:553
static GLfloat MinLOD(Target target)
Gets minimal LOD value (TEXTURE_MIN_LOD)
Definition: texture.hpp:2373
static void GenerateMipmap(Target target)
Generate mipmap for the texture bound to the specified target.
Definition: texture.hpp:2973
void ClearSubImage(GLsizei level, GLint xoffs, GLint yoffs, GLint zoffs, GLsizei width, GLsizei height, GLsizei depth, PixelDataFormat format, const GLtype *data)
Clears the specified part of texture image.
Definition: texture.hpp:444
static void MinFilter(Target target, TextureMinFilter filter)
Sets the minification filter (TEXTURE_MIN_FILTER)
Definition: texture.hpp:2352
static TextureName Binding(Target target)
Returns the current Texture bound to specified target.
Definition: texture.hpp:120
TextureSwizzleCoord SwizzleCoord
Texture swizzle coordinate.
Definition: texture.hpp:542
static GLfloat LODBias(Target target)
Gets the LOD bias value (TEXTURE_LOD_BIAS)
Definition: texture.hpp:2238
static void CopySubImage1D(Target target, GLint level, GLint xoffs, GLint x, GLint y, GLsizei width)
Copies a one dimensional texture sub image from the framebuffer.
Definition: texture.hpp:1540
Object< TextureOps > Texture
An oglplus_object encapsulating the texture object functionality.
Definition: texture.hpp:3217
static PixelDataInternalFormat InternalFormat(Target target, GLint level=0)
Returns the internal data format of the image array.
Definition: texture.hpp:886
static void Seamless(Target target, bool enable)
Sets the seamless cubemap setting.
Definition: texture.hpp:2931
static TextureSwizzle SwizzleB(Target target)
Gets the swizzle parameter (TEXTURE_SWIZZLE_B)
Definition: texture.hpp:2618
TextureFilter
Texture filter enumeration.
Definition: texture_filter.hpp:29
static void Bind(GLuint first, const Sequence< TextureName > &textures)
Sequentially bind textures to texture units starting with first.
Definition: texture.hpp:220
static void SubImage3D(Target target, GLint level, GLint xoffs, GLint yoffs, GLint zoffs, GLsizei width, GLsizei height, GLsizei depth, PixelDataFormat format, Property::PixDataType type, const void *data)
Specifies a three dimensional texture sub image.
Definition: texture.hpp:1056
DataType
OpenGL data type enumeration.
Definition: data_type.hpp:34
static void BindImage(GLuint first, const Sequence< TextureName > &textures)
Sequentially bind textures to image units starting with first.
Definition: texture.hpp:236
static void GetCompressedImage(Target target, GLint level, GLsizei size, GLubyte *buffer)
Allows to obtain the texture image in compressed form.
Definition: texture.hpp:973
static void Storage1D(Target target, GLsizei levels, PixelDataInternalFormat internal_format, GLsizei width)
Specifies all levels of 1D texture at the same time.
Definition: texture.hpp:1919
PixelDataInternalFormat
OpenGL pixel data internal format enumeration.
Definition: pixel_data.hpp:79
static void BaseLevel(Target target, GLuint level)
Sets the texture base level (TEXTURE_BASE_LEVEL)
Definition: texture.hpp:2018
static void CompressedImage3D(Target target, GLint level, PixelDataInternalFormat internal_format, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei image_size, const void *data)
Specifies a three dimensional compressed texture image.
Definition: texture.hpp:1571
static GLsizei CompressedImageSize(Target target, GLint level=0)
Returns the size (in bytes) of the image array if it is compressed.
Definition: texture.hpp:871
static void BindImage(ImageUnitSelector unit, TextureName texture, GLint level, bool layered, GLint layer, AccessSpecifier access, ImageUnitFormat format)
Binds a level of texture to an image unit.
Definition: texture.hpp:154
Access type specifier enumeration.
Class used for passing the address and size of a writable buffer to functions.
Definition: output_data.hpp:22
TextureSwizzle Swizzle
Texture swizzle value.
Definition: texture.hpp:545
static void Barrier(void)
Ensures that texture writes have been completed.
Definition: texture.hpp:2956
static void CompressedSubImage3D(Target target, GLint level, GLint xoffs, GLint yoffs, GLint zoffs, GLsizei width, GLsizei height, GLsizei depth, PixelDataFormat format, GLsizei image_size, const void *data)
Specifies a three dimensional compressed texture sub image.
Definition: texture.hpp:1678
static GLsizei AlphaSize(Target target, GLint level=0)
Returns the actual resolution of the ALPHA component.
Definition: texture.hpp:792
static void CompareMode(Target target, TextureCompareMode mode)
Sets the compare mode (TEXTURE_COMPARE_MODE)
Definition: texture.hpp:2181
static Vector< GLuint, 4 > BorderColor(Target target, TypeTag< GLuint >)
Gets the texture border color (TEXTURE_BORDER_COLOR)
Definition: texture.hpp:2124
static void SwizzleA(Target target, TextureSwizzle mode)
Sets the swizzle parameter (TEXTURE_SWIZZLE_A)
Definition: texture.hpp:2654
TextureMinFilter
Texture minification filter enumeration.
Definition: texture_filter.hpp:71
Declaration of OGLplus object-related error.
OneOf< GLenum, std::tuple< DataType, PixelDataType > > PixDataType
The pixel data type.
Definition: texture.hpp:565
static void WrapR(Target target, TextureWrap mode)
Sets the wrap parameter (TEXTURE_WRAP_R)
Definition: texture.hpp:2861
static void CompareFunc(Target target, CompareFunction func)
Sets the compare function (TEXTURE_COMPARE_FUNC)
Definition: texture.hpp:2216
Type for the image unit selector (implementation-dependent limited) number.
Definition: texture_unit.hpp:37
static void Bind(Target target, TextureName texture)
Binds the specified texture to the specified target.
Definition: texture.hpp:130
static TextureSwizzle SwizzleR(Target target)
Gets the swizzle parameter (TEXTURE_SWIZZLE_R)
Definition: texture.hpp:2570
Generic OpenGL object wrapper.
static GLfloat Anisotropy(Target target)
Gets the current anisotropy level.
Definition: texture.hpp:2485
static void SwizzleRGBA(Target target, const TextureSwizzleTuple &modes)
Sets the RGBA swizzle parameters (TEXTURE_SWIZZLE_RGBA)
Definition: texture.hpp:2748
A tag template used mainly for data-type-based function overload dispatching.
Definition: data_type.hpp:23
static void Image2DMultisample(Target target, GLsizei samples, PixelDataInternalFormat internal_format, GLsizei width, GLsizei height, bool fixed_sample_locations)
Sets-up a two dimensional multisample texture.
Definition: texture.hpp:1826
std::size_t size(void) const
Returns the size of the sequence.
Definition: seq_tpl.hpp:166
ObjectZero< DefaultTextureOps > DefaultTexture
An oglplus_object encapsulating the default texture functionality.
Definition: texture.hpp:3211
static GLsizei Height(Target target, GLint level=0)
Returns the height of the texture as it was specified by *Image*D.
Definition: texture.hpp:598
TextureWrap Wrap
Texture wrap mode value.
Definition: texture.hpp:556
void InvalidateImage(GLsizei level)
Invalidates the specified level of texture image.
Definition: texture.hpp:362
TextureMinFilter MinFilter
Minification filter.
Definition: texture.hpp:539
Forward declarations of Image-related classes.
static TextureSwizzle SwizzleA(Target target)
Gets the swizzle parameter (TEXTURE_SWIZZLE_A)
Definition: texture.hpp:2642
void BindImage(ImageUnitSelector unit, GLint level, bool layered, GLint layer, AccessSpecifier access, ImageUnitFormat format) const
Binds a level of this texture to an image unit.
Definition: texture.hpp:342
static void Image1D(Target target, GLint level, PixelDataInternalFormat internal_format, GLsizei width, GLint border, PixelDataFormat format, Property::PixDataType type, const void *data)
Specifies a one dimensional texture image.
Definition: texture.hpp:1278
TextureMagFilter
Texture magnification filter enumeration.
Definition: texture_filter.hpp:50
Implements operations applicable to named (non-zero) objects.
Definition: wrap_tpl.hpp:45
static void CompressedSubImage2D(Target target, GLint level, GLint xoffs, GLint yoffs, GLsizei width, GLsizei height, PixelDataFormat format, GLsizei image_size, const void *data)
Specifies a two dimensional compressed texture sub image.
Definition: texture.hpp:1719
TextureWrap
Texture wrap enumeration.
Definition: texture_wrap.hpp:51
GLuint GetGLName(ObjectName< ObjTag > named)
Returns the GLuint OpenGL name assigned to named object.
Definition: name.hpp:38
AccessSpecifier
Enumeration of access type specifiers.
Definition: access_specifier.hpp:27
static TextureSwizzle SwizzleG(Target target)
Gets the swizzle parameter (TEXTURE_SWIZZLE_G)
Definition: texture.hpp:2594
static GLsizei StencilSize(Target target, GLint level=0)
Returns the actual resolution of the STENCIL component.
Definition: texture.hpp:834
PixelDataType
OpenGL pixel data type enumeration.
Definition: pixel_data.hpp:29
static bool Seamless(Target target)
Gets the seamless cubemap setting value.
Definition: texture.hpp:2916
static GLsizei SharedSize(Target target, GLint level=0)
Returns the size of all texture components.
Definition: texture.hpp:856
A tuple of swizzle values for all texture components.
Definition: texture_swizzle.hpp:67
static void CopySubImage2D(Target target, GLint level, GLint xoffs, GLint yoffs, GLint x, GLint y, GLsizei width, GLsizei height)
Copies a two dimensional texture sub image from the framebuffer.
Definition: texture.hpp:1505
static void DepthStencilMode(Target target, PixelDataFormat mode)
Sets the depth stencil mode (DEPTH_STENCIL_TEXTURE_MODE)
Definition: texture.hpp:2889
OpenGL test/comparison function enumeration.
GLuint TextureTargetDimensions(TextureTarget target)
Function returning the number of texture dimensions for a texture target.
Sequence of Object names.
static void Active(TextureUnitSelector index)
Specify active texture unit for subsequent commands.
Definition: texture.hpp:271
PixelDataFormat
OpenGL pixel data format enumeration.
Definition: pixel_data.hpp:50
TextureCompareMode
Texture compare mode enumeration.
Definition: texture_compare.hpp:29
static void WrapS(Target target, TextureWrap mode)
Sets the wrap parameter (TEXTURE_WRAP_S)
Definition: texture.hpp:2817
static void MaxLevel(Target target, GLint value)
Sets maximum level value (TEXTURE_MAX_LEVEL)
Definition: texture.hpp:2446
Helper macro for optional checking of availability of GL function.
ObjectOps< tag::ExplicitSel, tag::Texture > TextureOps
Texture operations with explicit selector.
Definition: texture.hpp:2998
static TextureWrap WrapT(Target target)
Gets the wrap parameter (TEXTURE_WRAP_T)
Definition: texture.hpp:2828
static Vector< GLint, 4 > BorderColor(Target target, TypeTag< GLint >)
Gets the texture border color (TEXTURE_BORDER_COLOR)
Definition: texture.hpp:2082
static GLsizei GreenSize(Target target, GLint level=0)
Returns the actual resolution of the GREEN component.
Definition: texture.hpp:750
const GLuint * GetGLNames(const Sequence< ObjName > &sequence)
Returns a pointer to array of GL object names stored in a sequence.
Definition: sequence.hpp:23
Texture magnification/minification filter enumerations.
Implements operations applicable to any object including object 0 (zero)
Definition: fwd.hpp:157
Data type-related declarations.
void ClearImage(GLsizei level, PixelDataFormat format, const GLtype *data)
Clears the specified level of texture image.
Definition: texture.hpp:416
static TextureWrap WrapR(Target target)
Gets the wrap parameter (TEXTURE_WRAP_R)
Definition: texture.hpp:2850
static GLint Active(void)
Returns active texture unit.
Definition: texture.hpp:291
static GLfloat MaxLOD(Target target)
Gets maximum LOD value (TEXTURE_MAX_LOD)
Definition: texture.hpp:2404
Pixel data-related declarations.
static PixelDataType RedType(Target target, GLint level=0)
Returns the data type used to store the RED component.
Definition: texture.hpp:628
static void BorderColor(Target target, Vector< GLint, 4 > color)
Sets the texture border color (TEXTURE_BORDER_COLOR)
Definition: texture.hpp:2104
TextureTarget
Texture bind and image specification targets.
Definition: texture_target.hpp:27
static void MaxLOD(Target target, GLfloat value)
Sets maximum LOD value (TEXTURE_MAX_LOD)
Definition: texture.hpp:2415
Stores a value having one of the listed types in a common representation.
Definition: one_of.hpp:60
static void CompressedImage1D(Target target, GLint level, PixelDataInternalFormat internal_format, GLsizei width, GLint border, GLsizei image_size, const void *data)
Specifies a one dimensional compressed texture image.
Definition: texture.hpp:1644
static void SubImage2D(Target target, GLint level, GLint xoffs, GLint yoffs, GLsizei width, GLsizei height, PixelDataFormat format, Property::PixDataType type, const void *data)
Specifies a two dimensional texture sub image.
Definition: texture.hpp:1227
static void WrapT(Target target, TextureWrap mode)
Sets the wrap parameter (TEXTURE_WRAP_T)
Definition: texture.hpp:2839
static void GetImage(Target target, GLint level, PixelDataFormat format, Property::PixDataType type, GLsizei size, GLvoid *buffer)
Allows to obtain the texture image in uncompressed form.
Definition: texture.hpp:935
static GLint MaxLevel(Target target)
Gets maximum level value (TEXTURE_MAX_LEVEL)
Definition: texture.hpp:2435
static void Anisotropy(Target target, GLfloat value)
Sets the anisotropy level.
Definition: texture.hpp:2504
static TextureSwizzleTuple SwizzleRGBA(Target target)
Gets the swizzle parameter (TEXTURE_SWIZZLE_RGBA)
Definition: texture.hpp:2666
static void MinLOD(Target target, GLfloat value)
Sets minimal LOD value (TEXTURE_MIN_LOD)
Definition: texture.hpp:2384
static Vector< GLfloat, 4 > BorderColor(Target target, TypeTag< GLfloat >)
Gets the texture border color (TEXTURE_BORDER_COLOR)
Definition: texture.hpp:2040
static TextureMagFilter MagFilter(Target target)
Gets the magnification filter (TEXTURE_MAG_FILTER)
Definition: texture.hpp:2303
static void Image2D(Target target, GLint level, PixelDataInternalFormat internal_format, GLsizei width, GLsizei height, GLint border, PixelDataFormat format, Property::PixDataType type, const void *data)
Specifies a two dimensional texture image.
Definition: texture.hpp:1111
static void BufferRange(Target target, PixelDataInternalFormat internal_format, BufferName buffer, GLintptr offset, GLsizeiptr size)
Assigns a buffer range storing the texel data to the texture.
Definition: texture.hpp:1887
static void SwizzleRGBA(Target target, TextureSwizzle mode_r, TextureSwizzle mode_g, TextureSwizzle mode_b, TextureSwizzle mode_a)
Sets the RGBA swizzle parameters (TEXTURE_SWIZZLE_RGBA)
Definition: texture.hpp:2714
Wrapper for (texture) image data.
Definition: image.hpp:45
static GLsizei RedSize(Target target, GLint level=0)
Returns the actual resolution of the RED component.
Definition: texture.hpp:729
Exception class for general OpenGL errors.
Definition: basic.hpp:43
Exception class for GL object-related errors.
Definition: object.hpp:24
Texture swizzle-related classes and enumerations.
static void Buffer(Target target, PixelDataInternalFormat internal_format, BufferName buffer)
Assigns a buffer storing the texel data to the texture.
Definition: texture.hpp:1859
static GLsizei DepthSize(Target target, GLint level=0)
Returns the actual resolution of the DEPTH component.
Definition: texture.hpp:813
static void CopyImage2D(Target target, GLint level, PixelDataInternalFormat internal_format, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
Copies a two dimensional texture image from the framebuffer.
Definition: texture.hpp:1399
static void SwizzleRGBA(Target target, TextureSwizzle mode)
Sets the RGBA swizzle parameter (TEXTURE_SWIZZLE_RGBA)
Definition: texture.hpp:2689
void View(Target target, TextureName orig_texture, PixelDataInternalFormat internal_format, GLuint min_level, GLuint num_levels, GLuint min_layer, GLuint num_layers)
References and reinteprets a subset of the data of another texture.
Definition: texture.hpp:485
static void ImageCM(GLuint face, GLint level, PixelDataInternalFormat internal_format, GLsizei width, GLsizei height, GLint border, PixelDataFormat format, Property::PixDataType type, const void *data)
Specifies the image of the specified cube-map face.
Definition: texture.hpp:1168
TextureCompareMode CompareMode
Depth texture comparison mode.
Definition: texture.hpp:530
static void Image3DMultisample(Target target, GLsizei samples, PixelDataInternalFormat internal_format, GLsizei width, GLsizei height, GLsizei depth, bool fixed_sample_locations)
Sets-up a three dimensional multisample texture.
Definition: texture.hpp:1793
static void Swizzle(Target target, TextureSwizzleCoord coord, TextureSwizzle mode)
Sets the swizzle parameter (TEXTURE_SWIZZLE_*)
Definition: texture.hpp:2544
static void BorderColor(Target target, Vector< GLuint, 4 > color)
Sets the texture border color (TEXTURE_BORDER_COLOR)
Definition: texture.hpp:2146
static GLuint BaseLevel(Target target)
Returns the texture base level (TEXTURE_BASE_LEVEL)
Definition: texture.hpp:2007
static void SwizzleR(Target target, TextureSwizzle mode)
Sets the swizzle parameter (TEXTURE_SWIZZLE_R)
Definition: texture.hpp:2582
static TextureSwizzle Swizzle(Target target, TextureSwizzleCoord coord)
Gets the swizzle parameter (TEXTURE_SWIZZLE_*)
Definition: texture.hpp:2530
ImageUnitFormat
OpenGL image unit format enumeration.
Definition: pixel_data.hpp:104
TextureSwizzleCoord
Texture swizzle parameter coordinate enumeration.
Definition: texture_swizzle.hpp:29
void Bind(Target target) const
Binds this texture to the specified target.
Definition: texture.hpp:330
static void CopyImage1D(Target target, GLint level, PixelDataInternalFormat internal_format, GLint x, GLint y, GLsizei width, GLint border)
Copies a one dimensional texture image from the framebuffer.
Definition: texture.hpp:1435
static void Image3D(Target target, GLint level, PixelDataInternalFormat internal_format, GLsizei width, GLsizei height, GLsizei depth, GLint border, PixelDataFormat format, Property::PixDataType type, const void *data)
Specifies a three dimensional texture image.
Definition: texture.hpp:1005
TextureWrapCoord
Texture wrap parameter coordinate enumeration.
Definition: texture_wrap.hpp:28
static PixelDataType DepthType(Target target, GLint level=0)
Returns the data type used to store the DEPTH component.
Definition: texture.hpp:708
void InvalidateSubImage(GLsizei level, GLint xoffs, GLint yoffs, GLint zoffs, GLsizei width, GLsizei height, GLsizei depth)
Invalidates the specified part of texture image.
Definition: texture.hpp:379
Type for the texture unit selector (implementation-dependent limited) number.
Definition: texture_unit.hpp:22
Implements operations applicable to any object and any operation kind.
Definition: fwd.hpp:151
static void Storage2D(Target target, GLsizei levels, PixelDataInternalFormat internal_format, GLsizei width, GLsizei height)
Specifies all levels of 2D texture at the same time.
Definition: texture.hpp:1946
CompareFunction
Comparison function type enumeration.
Definition: compare_function.hpp:30
static TextureWrap Wrap(Target target, TextureWrapCoord coord)
Gets the wrap parameter (TEXTURE_WRAP_*)
Definition: texture.hpp:2768
static void SwizzleG(Target target, TextureSwizzle mode)
Sets the swizzle parameter (TEXTURE_SWIZZLE_G)
Definition: texture.hpp:2606
static GLfloat MaxAnisotropy(Target target)
Gets the maximum anisotropy level.
Definition: texture.hpp:2466
TextureTarget Target
Texture bind targets.
Definition: texture.hpp:113
Object wrapping buffer to store output data.
static PixelDataType BlueType(Target target, GLint level=0)
Returns the data type used to store the BLUE component.
Definition: texture.hpp:668
Basic template for vector types.
Definition: fwd.hpp:43
Texture and image unit selectors.
TextureFilter Filter
Filter.
Definition: texture.hpp:533
static PixelDataType GreenType(Target target, GLint level=0)
Returns the data type used to store the GREEN component.
Definition: texture.hpp:648
A common template for "named" objects like textures, buffers, etc.
Definition: fwd.hpp:136
static GLsizei Depth(Target target, GLint level=0)
Returns the depth of the texture as it was specified by *Image*D.
Definition: texture.hpp:612
static GLsizei BlueSize(Target target, GLint level=0)
Returns the actual resolution of the BLUE component.
Definition: texture.hpp:771
static void CopySubImage3D(Target target, GLint level, GLint xoffs, GLint yoffs, GLint zoffs, GLint x, GLint y, GLsizei width, GLsizei height)
Copies a three dimensional texture sub image from the framebuffer.
Definition: texture.hpp:1469
static PixelDataType AlphaType(Target target, GLint level=0)
Returns the data type used to store the ALPHA component.
Definition: texture.hpp:688
Texture target enumeration.
static void LODBias(Target target, GLfloat value)
Sets the LOD bias value (TEXTURE_LOD_BIAS)
Definition: texture.hpp:2249
static Target CubeMapFace(GLuint face)
Returns the target for the i-th cube map face (0-5)
Definition: texture.hpp:314
Variant helper class used mostly with enums.
static void Image(Target target, const images::Image &image, GLint level=0, GLint border=0)
Specifies a texture image.
static TextureMinFilter MinFilter(Target target)
Gets the minification filter (TEXTURE_MIN_FILTER)
Definition: texture.hpp:2338
Selector type used with the syntax sugar operators.
Definition: texture.hpp:3002
static GLsizei Width(Target target, GLint level=0)
Returns the width of the texture as it was specified by *Image*D.
Definition: texture.hpp:584