|
Version: 1.0 Posted: 2008-02-06 Build Requirements: Mac OS X 10.5 and Xcode 3.0 Runtime Requirements: Mac OS X 10.5 Download Sample (OpenGLFilterBasicsCocoa.zip, 652.0K) |
||||
DescriptionThis application demonstrates how to install a filter in an OpenGL pipeline using Objective-C and MVC design pattern. Here our model in the MVC design pattern is the filter object that encapsulates the OpenGL algorithmic workflows of loading, compiling, linking and binding of a fragment shader to a program object; texture initialization; framebuffer object instantiation and binding to a texture. The data generation for the filter is encapsulated in the object that produces the rotating 3D models. The controller here acts as a request broker between the filter and the view, and thus feeds the data into the filter and visualizes the results of the computation by updating an OpenGL view. This application further takes advantage of dictionaries to encapsulate the process of initialization of OpenGL view’s pixel format attributes. Dictionaries are also used to abstract the process of initializing GLSL fragment shader uniforms. Furthermore, this application also makes use of the multithreaded OpenGL engine. Document Revision History
|
|