Export to GitHub

glextensions - GL_ARB_texture_non_power_of_two.wiki


Contents

  • Dependencies
  • Overview
  • New Procedures and Functions
  • New Tokens
  • Errors
  • New State
  • New Implementation Dependent State

Dependencies

Written based on the OpenGL 1.4 specification.

GL_ARB_texture_mirrored_repeat (and GL_IBM_texture_mirrored_repeat) affects the definition of this extension.

GL_ARB_texture_border_clamp affects the definition of this extension.

GL_EXT_texture_compression_s3tc and GL_NV_texture_compression_vtc affect the definition of this extension.

Overview

Conventional OpenGL texturing is limited to images with power-of-two dimensions and an optional 1-texel border. GL_ARB_texture_non_power_of_two extension relaxes the size restrictions for the 1D, 2D, cube map, and 3D texture targets.

There is no additional procedural or enumerant api introduced by this extension except that an implementation which exports the extension string will allow an application to pass in texture dimensions for the 1D, 2D, cube map, and 3D targets that may or may not be a power of two.

An implementation which supports relaxing traditional GL's power-of-two size restrictions across all texture targets will export the extension string: "GL_ARB_texture_non_power_of_two".

When this extension is supported, mipmapping, automatic mipmap generation, and all the conventional wrap modes are supported for non-power-of-two textures

New Procedures and Functions

None

New Tokens

None

Errors

Various errors are ELIMINATED when this extension is supported as noted.

INVALID_VALUE is NO LONGER generated by TexImage1D or glCopyTexImage1D if width is not zero or cannot be represented as 2^n+2(border) for some integer value of n.

INVALID_VALUE is NO LONGER generated by TexImage2D or glCopyTexImage2D if width or height is not zero or cannot be represented as 2^n+2(border) for some integer value of n.

INVALID_VALUE is NO LONGER generated by TexImage3D if width, height, or depth is not zero or cannot be represented as 2^n+2(border) for some integer value of n.

New State

None

New Implementation Dependent State

None