Version: 1.2

Posted: 2008-07-30

Build Requirements: Xcode 3.x

Runtime Requirements: Mac OS X 10.5

View Source Code:

Download Sample (“GLSLBasicsCocoaDL.zip”, 126.9K)
Download Sample (“GLSLBasicsCocoaDL.dmg”, 127.6K)



Description

Demonstrates the use of GLSL fragment and vertex shaders using a custom NSOpenGLView. This application further demonstrates simple animation technique in a custom NSOpenGLView using a timer, a selector, and Cocoa "drawRect:" method.

Document Revision History

Date Notes
2008-07-30Refactored the sample code to better demonstrate the interaction of OpenGL APIs with an OpenGL view. Moved the GLSL program object instantiation into its own basic class. Moved the GLSL hardware check code into its a separate file. Consistent use of float math library functions for pattern and palette generation. Animation continues during window resizing. Consistent use of doubles and their OpenGL equivalents during geometry generation. Updated the Xcode project to use the new format. Updated the NIB to use the new format. Added a simple GLUT string class.
2007-11-02GLSL fundamentals using NSOpenGLView

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.