Version: 1.0

Posted: 2003-07-07

Build Requirements: N/A

Runtime Requirements: Mac OS X Mac OS X v10.2

View Source Code:

Download Sample (“AGLSurfaceTexture.zip”, 767.2K)
Download Sample (“AGLSurfaceTexture.dmg”, 891.5K)



Description

A sample showing an example of render to texture/texture from surface using aglSurfaceTexture. Version 1.0: Initial release This sample demonstrates using aglSurfaceTexture to texture from a surface which in turn is an aglContext thus also demonstrates render to texture. The basic concept to build an AGLcontext which, is the source for texturing. This surface must comply with all the constraints for the current texturing mode, such as dimensions being a power of two for TEXTURE_2D. This surface (identified by the AGLContext) is then used as the source for the aglSurfaceTexture API. This API is very similar to Texture2D as it provides a current texture for GL to using in texturing operations. All other texturing requirements remain the same (enable, texture coords, etc). Note: Under CodeWarrior you will have to change the access path for the OpenGL SDK with valid a one for your local environment. Requirements: Mac OS X v10.2 Keywords: Carbon, OpenGL, render to texture, texture from surface, aglSurfaceTexture

Document Revision History

Date Notes
2003-07-07Example of render to texture/texture from surface using aglSurfaceTexture.

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.