ReadMe.txt

### OpenCL Procedural Grass and Terrain Example ###
 
===========================================================================
DESCRIPTION:
 
This example shows how OpenCL can be used to create a procedural field of 
grass on a generated terrain model which is then rendered with OpenGL.  
Because OpenGL buffers are shared with OpenCL, the data can remain on the 
graphics card, thus eliminating the API overhead of creating and submitting 
the vertices from the host.
 
All geometry is generated on the compute device, and outputted into
a shared OpenGL buffer.  The terrain gets generated only within the 
visible arc covering the camera's view frustum to avoid the need for 
culling.  A page of grass is computed on the surface of the terrain as
bezier patches, and flow noise is applied to the angle of the blades
to simulate wind.  Multiple instances of grass are rendered at jittered
offsets to add more grass coverage without having to compute new pages.
Finally, a physically based sky shader (via OpenGL) is applied to 
the background to provide an environment for the grass.
 
Note that the .cl compute kernel file(s) and shader files (.vert and .frag)
are loaded and compiled at runtime.  The example source assumes that these 
files are in the same path as the built executable.
 
===========================================================================
BUILD REQUIREMENTS:
 
Mac OS X v10.6 or later
 
===========================================================================
RUNTIME REQUIREMENTS:
 
Mac OS X v10.6 or later with OpenCL 1.0
 
===========================================================================
PACKAGING LIST:
 
English.lproj
Grass.xcodeproj
Grass_Prefix.pch
Info.plist
ReadMe.txt
camera.cpp
camera.h
compute_engine.cpp
compute_engine.h
compute_math.cpp
compute_math.h
compute_types.h
data_loader.h
data_loader.m
grass_kernels.cl
grass_simulator.cpp
grass_simulator.h
grid_mesh.cpp
grid_mesh.h
icon.icns
main.cpp
main.m
mesh_renderer.cpp
mesh_renderer.h
shader.cpp
shader.h
sky.frag
sky.vert
terrain_kernels.cl
terrain_simulator.cpp
terrain_simulator.h
timing.h
version.plist
 
===========================================================================
CHANGES FROM PREVIOUS VERSIONS:
 
Version 1.0
- First version.
 
===========================================================================
Copyright (C) 2008 Apple Inc. All rights reserved.