'\" t .\" Title: glTextureView .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 01/03/2018 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "GLTEXTUREVIEW" "3G" "01/03/2018" "[FIXME: source]" "[FIXME: manual]" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" glTextureView \- initialize a texture as a data alias of another texture\*(Aqs data store .SH "C SPECIFICATION" .HP \w'void\ glTextureView('u .BI "void glTextureView(GLuint\ " "texture" ", GLenum\ " "target" ", GLuint\ " "origtexture" ", GLenum\ " "internalformat" ", GLuint\ " "minlevel" ", GLuint\ " "numlevels" ", GLuint\ " "minlayer" ", GLuint\ " "numlayers" ");" .SH "PARAMETERS" .PP \fItexture\fR .RS 4 Specifies the texture object to be initialized as a view\&. .RE .PP \fItarget\fR .RS 4 Specifies the target to be used for the newly initialized texture\&. .RE .PP \fIorigtexture\fR .RS 4 Specifies the name of a texture object of which to make a view\&. .RE .PP \fIinternalFormat\fR .RS 4 Specifies the internal format for the newly created view\&. .RE .PP \fIminlevel\fR .RS 4 Specifies lowest level of detail of the view\&. .RE .PP \fInumlevels\fR .RS 4 Specifies the number of levels of detail to include in the view\&. .RE .PP \fIminlayer\fR .RS 4 Specifies the index of the first layer to include in the view\&. .RE .PP \fInumlayers\fR .RS 4 Specifies the number of layers to include in the view\&. .RE .SH "DESCRIPTION" .PP \fBglTextureView\fR initializes a texture object as an alias, or view of another texture object, sharing some or all of the parent texture\*(Aqs data store with the initialized texture\&. \fItexture\fR specifies a name previously reserved by a successful call to \fBglGenTextures\fR() but that has not yet been bound or given a target\&. \fItarget\fR specifies the target for the newly initialized texture and must be compatible with the target of the parent texture, given in \fIorigtexture\fR as specified in the following table: .TS allbox tab(:); lB lB. T{ Original Target T}:T{ Compatible New Targets T} .T& l l l l l l l l l l l l l l l l l l l l l l. T{ \fBGL_TEXTURE_1D\fR T}:T{ \fBGL_TEXTURE_1D\fR, \fBGL_TEXTURE_1D_ARRAY\fR T} T{ \fBGL_TEXTURE_2D\fR T}:T{ \fBGL_TEXTURE_2D\fR, \fBGL_TEXTURE_2D_ARRAY\fR T} T{ \fBGL_TEXTURE_3D\fR T}:T{ \fBGL_TEXTURE_3D\fR T} T{ \fBGL_TEXTURE_CUBE_MAP\fR T}:T{ \fBGL_TEXTURE_CUBE_MAP\fR, \fBGL_TEXTURE_2D\fR, \fBGL_TEXTURE_2D_ARRAY\fR, \fBGL_TEXTUER_CUBE_MAP_ARRAY\fR T} T{ \fBGL_TEXTURE_RECTANGLE\fR T}:T{ \fBGL_TEXTURE_RECTANGLE\fR T} T{ \fBGL_TEXTURE_BUFFER\fR T}:T{ \fInone\fR T} T{ \fBGL_TEXTURE_1D_ARRAY\fR T}:T{ \fBGL_TEXTURE_1D\fR, \fBGL_TEXTURE_1D_ARRAY\fR T} T{ \fBGL_TEXTURE_2D_ARRAY\fR T}:T{ \fBGL_TEXTURE_2D\fR, \fBGL_TEXTURE_2D_ARRAY\fR T} T{ \fBGL_TEXTURE_CUBE_MAP_ARRAY\fR T}:T{ \fBGL_TEXTURE_CUBE_MAP\fR, \fBGL_TEXTURE_2D\fR, \fBGL_TEXTURE_2D_ARRAY\fR, \fBGL_TEXTUER_CUBE_MAP_ARRAY\fR T} T{ \fBGL_TEXTURE_2D_MULTISAMPLE\fR T}:T{ \fBGL_TEXTURE_2D_MULTISAMPLE\fR, \fBGL_TEXTURE_MULTISAMPLE_ARRAY\fR T} T{ \fBGL_TEXTURE_2D_MULTISAMPLE_ARRAY\fR T}:T{ \fBGL_TEXTURE_2D_MULTISAMPLE\fR, \fBGL_TEXTURE_MULTISAMPLE_ARRAY\fR T} .TE .sp 1 .PP The value of \fBGL_TEXTURE_IMMUTABLE_FORMAT\fR for \fIorigtexture\fR must be \fBGL_TRUE\fR\&. After initialization, \fItexture\fR inherits the data store of the parent texture, \fIorigtexture\fR and is usable as a normal texture object with target \fItarget\fR\&. Data in the shared store is reinterpreted with the new internal format specified by \fIinternalformat\fR\&. \fIinternalformat\fR must be compatible with the internal format of the parent texture as specified in the following table: .TS allbox tab(:); lB lB. T{ Class T}:T{ Internal Formats T} .T& l l l l l l l l l l l l l l l l l l l l l l l l. T{ 128\-bit T}:T{ \fBGL_RGBA32F\fR, \fBGL_RGBA32UI\fR, \fBGL_RGBA32I\fR T} T{ 96\-bit T}:T{ \fBGL_RGB32F\fR, \fBGL_RGB32UI\fR, \fBGL_RGB32I\fR T} T{ 64\-bit T}:T{ \fBGL_RGBA16F\fR, \fBGL_RG32F\fR, \fBGL_RGBA16UI\fR, \fBGL_RG32UI\fR, \fBGL_RGBA16I\fR, \fBGL_RG32I\fR, \fBGL_RGBA16\fR, \fBGL_RGBA16_SNORM\fR T} T{ 48\-bit T}:T{ \fBGL_RGB16\fR, \fBGL_RGB16_SNORM\fR, \fBGL_RGB16F\fR, \fBGL_RGB16UI\fR, \fBGL_RGB16I\fR T} T{ 32\-bit T}:T{ \fBGL_RG16F\fR, \fBGL_R11F_G11F_B10F\fR, \fBGL_R32F\fR, \fBGL_RGB10_A2UI\fR, \fBGL_RGBA8UI\fR, \fBGL_RG16UI\fR, \fBGL_R32UI\fR, \fBGL_RGBA8I\fR, \fBGL_RG16I\fR, \fBGL_R32I\fR, \fBGL_RGB10_A2\fR, \fBGL_RGBA8\fR, \fBGL_RG16\fR, \fBGL_RGBA8_SNORM\fR, \fBGL_RG16_SNORM\fR, \fBGL_SRGB8_ALPHA8\fR, \fBGL_RGB9_E5\fR T} T{ 24\-bit T}:T{ \fBGL_RGB8\fR, \fBGL_RGB8_SNORM\fR, \fBGL_SRGB8\fR, \fBGL_RGB8UI\fR, \fBGL_RGB8I\fR T} T{ 16\-bit T}:T{ \fBGL_R16F\fR, \fBGL_RG8UI\fR, \fBGL_R16UI\fR, \fBGL_RG8I\fR, \fBGL_R16I\fR, \fBGL_RG8\fR, \fBGL_R16\fR, \fBGL_RG8_SNORM\fR, \fBGL_R16_SNORM\fR T} T{ 8\-bit T}:T{ \fBGL_R8UI\fR, \fBGL_R8I\fR, \fBGL_R8\fR, \fBGL_R8_SNORM\fR T} T{ \fBGL_RGTC1_RED\fR T}:T{ \fBGL_COMPRESSED_RED_RGTC1\fR, \fBGL_COMPRESSED_SIGNED_RED_RGTC1\fR T} T{ \fBGL_RGTC2_RG\fR T}:T{ \fBGL_COMPRESSED_RG_RGTC2\fR, \fBGL_COMPRESSED_SIGNED_RG_RGTC2\fR T} T{ \fBGL_BPTC_UNORM\fR T}:T{ \fBGL_COMPRESSED_RGBA_BPTC_UNORM\fR, \fBGL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM\fR T} T{ \fBGL_BPTC_FLOAT\fR T}:T{ \fBGL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT\fR, \fBGL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT\fR T} .TE .sp 1 .PP If the original texture is an array or has multiple mipmap levels, the parameters \fIminlayer\fR, \fInumlayers\fR, \fIminlevel\fR, and \fInumlevels\fR control which of those slices and levels are considered part of the texture\&. The \fIminlevel\fR and \fIminlayer\fR parameters are relative to the view of the original texture\&. If \fInumlayers\fR or \fInumlevels\fR extend beyond the original texture, they are clamped to the max extent of the original texture\&. .PP If the new texture\*(Aqs target is \fBGL_TEXTURE_CUBE_MAP\fR, the clamped \fInumlayers\fR must be equal to 6\&. If the new texture\*(Aqs target is \fBGL_TEXTURE_CUBE_MAP_ARRAY\fR, then \fInumlayers\fR counts layer\-faces rather than layers, and the clamped \fInumlayers\fR must be a multiple of 6\&. If the new texture\*(Aqs target is \fBGL_TEXTURE_CUBE_MAP\fR or \fBGL_TEXTURE_CUBE_MAP_ARRAY\fR, the width and height of the original texture\*(Aqs levels must be equal\&. .PP When the original texture\*(Aqs target is \fBGL_TEXTURE_CUBE_MAP\fR, the layer parameters are interpreted in the same order as if it were a \fBGL_TEXTURE_CUBE_MAP_ARRAY\fR with 6 layer\-faces\&. .PP If \fItarget\fR is \fBGL_TEXTURE_1D\fR, \fBGL_TEXTURE_2D\fR, \fBGL_TEXTURE_3D\fR, \fBGL_TEXTURE_RECTANGLE\fR, or \fBGL_TEXTURE_2D_MULTISAMPLE\fR, \fInumlayers\fR must equal 1\&. .PP The dimensions of the original texture must be less than or equal to the maximum supported dimensions of the new target\&. For example, if the original texture has a \fBGL_TEXTURE_2D_ARRAY\fR target and its width is greater than \fBGL_MAX_CUBE_MAP_TEXTURE_SIZE\fR, an error will be generated if \fBglTextureView\fR is called to create a \fBGL_TEXTURE_CUBE_MAP\fR view\&. .PP Texture commands that take a \fIlevel\fR or \fIlayer\fR parameter, such as \fBglTexSubImage2D\fR(), interpret that parameter to be relative to the view of the texture\&. i\&.e\&. the mipmap level of the data store that would be updated via \fBglTexSubImage2D\fR() would be the sum of \fIlevel\fR and the value of \fBGL_TEXTURE_VIEW_MIN_LEVEL\fR\&. .SH "ERRORS" .PP \fBGL_INVALID_VALUE\fR is generated if \fIminlayer\fR or \fIminlevel\fR are larger than the greatest layer or level of \fIorigtexture\fR\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fItarget\fR is not compatible with the target of \fIorigtexture\fR\&. .PP \fBGL_INVALID_OPERATION\fR is generated if the dimensions of \fIorigtexture\fR are greater than the maximum supported dimensions for \fItarget\fR\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fIinternalformat\fR is not compatible with the internal format of \fIorigtexture\fR\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fItexture\fR has already been bound or otherwise given a target\&. .PP \fBGL_INVALID_OPERATION\fR is generated if the value of \fBGL_TEXTURE_IMMUTABLE_FORMAT\fR for \fIorigtexture\fR is not \fBGL_TRUE\fR\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fIorigtexture\fR is not the name of an existing texture object\&. .PP \fBGL_INVALID_VALUE\fR is generaged if \fItarget\fR is \fBGL_TEXTURE_CUBE_MAP\fR and \fInumlayers\fR is not 6, or if \fItarget\fR is \fBGL_TEXTURE_CUBE_MAP_ARRAY\fR and \fInumlayers\fR is not an integer multiple of 6\&. .PP \fBGL_INVALID_VALUE\fR is generated if \fItarget\fR is \fBGL_TEXTURE_1D\fR, \fBGL_TEXTURE_2D\fR, \fBGL_TEXTURE_3D\fR, \fBGL_TEXTURE_RECTANGLE\fR, or \fBGL_TEXTURE_2D_MULTISAMPLE\fR and \fInumlayers\fR does not equal 1\&. .PP \fBGL_INVALID_VALUE\fR is generated if \fItexture\fR zero or is not the name of a texture previously returned from a successful call to \fBglGenTextures\fR()\&. .SH "ASSOCIATED GETS" .PP \fBglTexParameter\fR() with arguments \fBGL_TEXTURE_VIEW_MIN_LEVEL\fR, \fBGL_TEXTURE_VIEW_NUM_LEVELS\fR, \fBGL_TEXTURE_VIEW_MIN_LAYER\fR, \fBGL_TEXTURE_VIEW_NUM_LAYERS\fR, or \fBGL_TEXTURE_IMMUTABLE_LEVELS\fR\&. .SH "VERSION SUPPORT" .TS allbox tab(:); lB cB s s s s s s s s s s s lB cB cB cB cB cB cB cB cB cB cB cB cB. T{ T}:T{ \fBOpenGL Version\fR T} T{ \fBFunction / Feature Name\fR T}:T{ \fB2\&.0\fR T}:T{ \fB2\&.1\fR T}:T{ \fB3\&.0\fR T}:T{ \fB3\&.1\fR T}:T{ \fB3\&.2\fR T}:T{ \fB3\&.3\fR T}:T{ \fB4\&.0\fR T}:T{ \fB4\&.1\fR T}:T{ \fB4\&.2\fR T}:T{ \fB4\&.3\fR T}:T{ \fB4\&.4\fR T}:T{ \fB4\&.5\fR T} .T& l c c c c c c c c c c c c. T{ \fBglTextureView\fR T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T} .TE .sp 1 .SH "SEE ALSO" .PP \fBglTexStorage1D\fR(), \fBglTexStorage2D\fR(), \fBglTexStorage3D\fR(), \fBglGetTexParameter\fR()\&. .SH "COPYRIGHT" .PP Copyright \(co 2013\-2014 Khronos Group\&. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1\&.0, 8 June 1999\&. \m[blue]\fBhttp://opencontent\&.org/openpub/\fR\m[]\&. .SH "COPYRIGHT" .br Copyright \(co 2013-2014 Khronos Group .br