HP Workstation zx2000 HP OpenGL Implementation Guide for HP-UX 11.X (IPF versi - Page 13

steps for 3D texturing programming, Enumerated Types for 3D Texturing

Page 13 highlights

overview of OpenGL GL_LINEAR_MIPMAP_LINEAR Filtering may use Two Blocks Enumerated Types for 3D Texturing Extended Area Enumerated Type Description Pixel Storage GL_[UN]PACK_IMAGE_HEIGHT_EXT The height of the image from which the Default: 0 for each texture is created; it supersedes the value of the height passed into glTexImage3DEXT. Pixel Storage GL_[UN]PACK_SKIP_IMAGES_EXT The initial skip of contiguous rectangles of Default: 0 for each the texture. Texture Wrap Modes GL_TEXTURE_WRAP_R_EXT Default: GL_REPEAT The wrap mode applied to the r texture coordinate. Enable/Disable GL_MAX_3D_TEXTURE_SIZE_EXT, GL_TEXTURE_BINDING_3D_EXT Default: N/A The method to enable/disable 3D texturing. Get Formats GL_MAX_3D_TEXTURE_SIZE_EXT, GL_TEXTURE_BINDING_3D_EXT Default: N/A The maximum size of the 3D texture allowed; bind query Proxy GL_PROXY_TEXTURE_3D_EXT Default: N/A The proxy texture that can be used to query the configurations. steps for 3D texturing programming To use the 3D texture extension (see sample program below): 1. Enable the 3D texture extension using glEnable(GL_TEXTURE_3D_EXT); 2. Create a 3D texture using glTexImage3DEXT; 3. Specify or generate the s, t and r texture coordinates using glTexGen or glTexCoord3*; 4. Specify other parameters such as filters just as you would for 2D texturing, but use GL_TEXTURE_3D_EXT for the target. OpenGL implementation guide 1-9

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42

OpenGL implementation guide
1–9
overview of OpenGL
GL_LINEAR_MIPMAP_LINEAR Filtering may use Two Blocks
Enumerated Types for 3D Texturing
steps for 3D texturing programming
To use the 3D texture extension (see sample program below):
1. Enable the 3D texture extension using
glEnable
(
GL_TEXTURE_3D_EXT
);
2. Create a 3D texture using
glTexImage3DEXT
;
3.
Specify or generate the s, t and r texture coordinates using
glTexGen
or
glTexCoord3*
;
4. Specify other parameters such as filters just as you would for 2D texturing, but use
GL_TEXTURE_3D_EXT
for the target.
Extended Area
Enumerated Type
Description
Pixel Storage
GL_[UN]PACK_IMAGE_HEIGHT_EXT
Default: 0 for each
The height of the image from which the
texture is created; it supersedes the value of
the height passed into glTexImage3DEXT.
Pixel Storage
GL_[UN]PACK_SKIP_IMAGES_EXT
Default: 0 for each
The initial skip of contiguous rectangles of
the texture.
Texture Wrap Modes
GL_TEXTURE_WRAP_R_EXT
Default: GL_REPEAT
The wrap mode applied to the r texture
coordinate.
Enable/Disable
GL_MAX_3D_TEXTURE_SIZE_EXT,
GL_TEXTURE_BINDING_3D_EXT
Default: N/A
The method to enable/disable 3D
texturing.
Get Formats
GL_MAX_3D_TEXTURE_SIZE_EXT,
GL_TEXTURE_BINDING_3D_EXT
Default: N/A
The maximum size of the 3D texture
allowed; bind query
Proxy
GL_PROXY_TEXTURE_3D_EXT
Default: N/A
The proxy texture that can be used to query
the configurations.