GLAF
OpenGL Advanced Functionality

Back to documentation index


Copy Texture availability test

None, since this feature is always available (GLAF will emulate it if necessary). However, you can call glaf_IsCopyTextureNative(), that will tell you whether the system really supports copy texture or if GLAF is emulating it.
 

Copy Texture support rules

  • If we're running in OpenGL 1.1 or higher, and the query of the address of the core functions is successful, the core implementation is used.
  • Otherwise, if GL_EXT_copy_texture is supported, and the query of the address of the extension functions is successful, this extension is used.
  • Otherwise, the feature is emulated by GLAF.


Copy Texture enumerants

None.
 

Copy Texture functions

glaf_CopyTexImage1D
glaf_CopyTexImage2D
 

Copy Texture definitions in 'gl2glaf.h' (optional)

#define glCopyTexImage1D                glaf_CopyTexImage1D
#define glCopyTexImage2D                glaf_CopyTexImage2D
 

Copy Texture side effects

If GLAF needs to emulate the copy texture feature, and you're copying a 1D texture but you left 2D convolution enabled, the texture may not be copied. This problem may happen only with 1D textures. Convolution is correctly managed for 2D textures.

The emulation mode will perform a glReadPixels() honoring the current state of the full pixel transfer pipeline (including imaging extensions), followed by a glTexImage() with a "disabled" pixel transfer pipeline. The complete state of the pixel transfer pipeline and pixel store modes will be restored to their previous value before returning.

Just a very few 1.0 implementations lack copy texture, so this emulation mode won't be used too often. Anyway, if you wish to avoid it, you can guess if it's emulated or not with glaf_IsCopyTextureNative()
 



Copy SubTexture Availability Test

GLboolean glaf_IsCopySubTextureSupported(void)

Unlike Copy Texture, Copy SubTexture can't be emulated if the SubTexture feature is not supported. This function returns GL_TRUE if the feature is supported or GL_FALSE otherwise. Calling the functions of an unsupported feature or using its enumerants may crash the application, or generate OpenGL errors, or even undefined behaviour, so you should never use a feature without testing its availability first.
 

Copy SubTexture support rules

  • If we're running in OpenGL 1.1 or higher, and the query of the address of the core functions is successful, the core implementation is used.
  • Otherwise, if GL_EXT_copy_texture is supported, and the query of the address of the extension functions is successful, this extension is used.
  • Otherwise, if the SubTexture feature is supported, Copy SubTexture is emulated by GLAF.
  • Otherwise, Copy SubTexture is not supported.


Copy SubTexture enumerants

None.
 

Copy SubTexture functions

glaf_CopyTexSubImage1D
glaf_CopyTexSubImage2D
 

Copy SubTexture definitions in 'gl2glaf.h' (optional)

#define glCopyTexSubImage1D             glaf_CopyTexSubImage1D
#define glCopyTexSubImage2D             glaf_CopyTexSubImage2D
 

Copy SubTexture side effects

If the Copy Texture feature is not natively supported but SubTexture is, then Copy SubTexture will be emulated. In this case, the same notes from 'Copy Texture side effects' above apply.
 

Back to documentation index
 

Copyright (C) 2001 César Blecua Udías