Presentation is loading. Please wait.

Presentation is loading. Please wait.

OpenGL 3.0 Texture Arrays Presentation: Olivia Terrell, Dec. 4, 2008.

Similar presentations


Presentation on theme: "OpenGL 3.0 Texture Arrays Presentation: Olivia Terrell, Dec. 4, 2008."— Presentation transcript:

1 OpenGL 3.0 Texture Arrays Presentation: Olivia Terrell, Dec. 4, 2008

2 OpenGL 3.0  History of OpenGL 3.0  How OpenGL 3.0 Differs  OpenGL 3.0 Texture arrays

3 History of OpenGL 3.0 “When one door closes another door opens; but we so often look so long and so regretfully upon the closed door, that we do not see the ones which open for us.”, Alexander Graham Bell Alexander Graham Bell

4  Evolved from IrisGL (Integrated Raster Imaging Systems Graphic Library)‏  IrisGL was specific to IRIX Silicon stations  OpenGL created by Mark Segal and Kurt Akeley

5 First release First release  OpenGL1.0 lacked texture objects, thus glBindTexture was added to OpenGL1.1. Release versions: Release versions:  OpenGL1.2  OpenGL1.2.1  OpenGL1.3  OpenGL1.4  OpenGL1.5  OpenGL2.0  OpenGL2.1  OpenGL3.0

6 Block Diagram of OpenGL

7

8 How OpenGL 3.0 Differs “He who rejects change is the architect of decay...” Harold Wilson Harold Wilson

9 OpenGL 3.0 features Vertex array objects Vertex array objects Direct access to vertex buffer objects Direct access to vertex buffer objects Framebuffer object variability for buffer size and format during rendering Framebuffer object variability for buffer size and format during rendering 32-bit floating point texture and render buffers 32-bit floating point texture and render buffers Occlusion rendering Occlusion rendering Half-float vertex & pixel data Half-float vertex & pixel data

10 OpenGL 3.0 features Transform feedback to capture geometry data into a buffer for further computation Transform feedback to capture geometry data into a buffer for further computation 4 new texture compressions for 1 and 2 channel texture 4 new texture compressions for 1 and 2 channel texture Rendering in sRGB framebuffers Rendering in sRGB framebuffers 32-bit floating point depth buffer support 32-bit floating point depth buffer support Texture arrays... Texture arrays...

11 OpenGL 3.0 features API support for the new texture lookup capabilities of the OpenGL Shading Language 1.30 specification (GL EXT gpu shader4). API support for the new texture lookup capabilities of the OpenGL Shading Language 1.30 specification (GL EXT gpu shader4). Conditional rendering (GL NV conditional render). Conditional rendering (GL NV conditional render). Fine control over mapping buffer subranges into client space and flushing Fine control over mapping buffer subranges into client space and flushing modified data. modified data. Floating-point color and depth internal formats for textures and renderbuffers (GL ARB color buffer float, GL NV depth buffer float, 455 GL ARB texture float, GL EXT packed float, and GL EXT texture shared exponent). Floating-point color and depth internal formats for textures and renderbuffers (GL ARB color buffer float, GL NV depth buffer float, 455 GL ARB texture float, GL EXT packed float, and GL EXT texture shared exponent). Framebuffer objects (GL EXT framebuffer object). Framebuffer objects (GL EXT framebuffer object). Half-float (16-bit) vertex array and pixel data formats (GL NV half float and GL ARB half float pixel). Half-float (16-bit) vertex array and pixel data formats (GL NV half float and GL ARB half float pixel). Multisample stretch blit functionality (GL EXT framebuffer multisample and GL EXT framebuffer blit). Multisample stretch blit functionality (GL EXT framebuffer multisample and GL EXT framebuffer blit). Non-normalized integer color internal formats for textures and renderbuffers (GL EXT texture integer). Non-normalized integer color internal formats for textures and renderbuffers (GL EXT texture integer).

12 OpenGL 3.0 features One- and two-dimensional layered texture targets One- and two-dimensional layered texture targets (GL EXT texture array). (GL EXT texture array). Packed depth/stencil internal formats for combined depth+stencil textures and renderbuffers (GL EXT packed depth stencil). Packed depth/stencil internal formats for combined depth+stencil textures and renderbuffers (GL EXT packed depth stencil). Per-color-attachment blend enables and color writemasks (GL EXT draw buffers2). Per-color-attachment blend enables and color writemasks (GL EXT draw buffers2). RGTC specific internal compressed formats (GL EXT texture compression rgtc). RGTC specific internal compressed formats (GL EXT texture compression rgtc). Single- and double-channel (R and RG) internal formats for textures and renderbuffers. Single- and double-channel (R and RG) internal formats for textures and renderbuffers. Transform feedback (GL EXT transform feedback). Transform feedback (GL EXT transform feedback). Vertex array objects (GL APPLE vertex array object). Vertex array objects (GL APPLE vertex array object). sRGB framebuffer mode (GL EXT framebuffer sRGB)‏ sRGB framebuffer mode (GL EXT framebuffer sRGB)‏

13 Changed Token Names COMPARE_REF_TO_TEXTURE COMPARE_REF_TO_TEXTURE MAX_VARYING_COMPONENTS MAX_VARYING_COMPONENTS MAX_CLIP_DISTANCES MAX_CLIP_DISTANCES CLIP_DISTANCES CLIP_DISTANCES COMPARE_R_TO_TE XTURE COMPARE_R_TO_TE XTURE MAX_VARYING_FLO ATS MAX_VARYING_FLO ATS MAX_CLIP_PLANES MAX_CLIP_PLANES CLIP_PLANES CLIP_PLANES

14 Supported Shading Languages GLSL1.10 GLSL1.10 GLSL1.20 GLSL1.20 GLSL1.30 GLSL1.30

15 OpenGL 3.0 Texture Arrays “It is the eye of ignorance that assigns a fixed and unchangeable color to every object...” Paul Gauguin Paul Gauguin

16 EXT_texture_array Created August 7, 2008 Created August 7, 2008 Enteracts with either Enteracts with either  NV_geometry_program4  NV_gpu_program4  OpenGL Shading Language (GLSL 3.0)

17 EXT_texture_array What it is: What it is:  Array of textures equal in size and format, arranged in layers  Height (1D) or depth (2D) are the number of layers

18 EXT_texture_array Specifications: Specifications:  1D array: TexImage2D  2D array: TexImage3D

19 TexImage2D(enum target, int level, int internalformat, sizei width, sizei height, int border, enum format, enum type, void *data) TexImage2D(enum target, int level, int internalformat, sizei width, sizei height, int border, enum format, enum type, void *data) Target is a 2D texture Target is a 2D texture Level is level of detail Level is level of detail Internalformat is storage of texture Internalformat is storage of texture Width, height and border are boundaries of the texture Width, height and border are boundaries of the texture Format is current format of texture Format is current format of texture *data is pointer to internal data type *data is pointer to internal data type

20 EXT_texture_array How it Works How it Works  Texture array is seen as a unit in the shader  Access is through single coordinate vector  1 layer of array is selected as 1D or 2D texture  Coordinate of layer is in [0, n-1], where n is the total number of textures in the array  Array textures are rendered by binding them to a framebuffer (EXT_framebuffer_object)‏  Can bind whole array, or single layer

21 EXT_texture_array 6 different textures are possible as input to the array. Each texture is itself a 1D, 2D, or 3D array of images. 6 different textures are possible as input to the array. Each texture is itself a 1D, 2D, or 3D array of images. Each image element is called a texel. Each image element is called a texel. Each image is comprised of 1 to n layers Each image is comprised of 1 to n layers

22

23 Vs. The Old way... Basic problem: Texture animation Basic problem: Texture animation Create separate image file per frame of animation Create separate image file per frame of animation Load every frame as part of user array: texture[index]=LoadTextureRAW(“text1.raw”, 256, 256); Load every frame as part of user array: texture[index]=LoadTextureRAW(“text1.raw”, 256, 256); Set the texture to the coordinate: glBindTexture(GL_TEXTURE_2D,texture[frame]); //where frame is some int Set the texture to the coordinate: glBindTexture(GL_TEXTURE_2D,texture[frame]); //where frame is some int Go to next frame of texture array and repeat Go to next frame of texture array and repeat

24 EXT_texture_array One use of texture animation to a shape is the Beryl Desktop, a 3D cube where each side is a separate desktop, for example. One use of texture animation to a shape is the Beryl Desktop, a 3D cube where each side is a separate desktop, for example.

25 Application: Beryl Desktop *image compliments of Corporal J VanDyke, Auraria PD *image compliments of Corporal J VanDyke, Auraria PD

26 Questions?

27 This Presentation Online http://ouray.cudenver.edu/~oeterrel/Open_G L.html


Download ppt "OpenGL 3.0 Texture Arrays Presentation: Olivia Terrell, Dec. 4, 2008."

Similar presentations


Ads by Google