OpenSubdiv/examples/glViewer
David G Yu 8b4ef28116 Updated handling of patchParam and patchCoord
Each patch has a corresponding patchParam. This is a set of three values
specifying additional information about the patch:

   faceId    -- topological face identifier (e.g. Ptex FaceId)
   bitfield  -- refinement-level, non-quad, boundary, transition, uv-offset
   sharpness -- crease sharpness for a single-crease patch

These are stored in OsdPatchParamBuffer indexed by the value returned
from OsdGetPatchIndex() which is a function of the current PrimitiveID
along with an optional client provided offset.

Accessors are provided to extract values from a patchParam. These are
all named OsdGetPatch*().

While drawing patches, the patchParam is condensed into a patchCoord which
has four values (u, v, faceLevel, faceId). These patchCoords are treated
as int values during per-prim processing but are converted to float values
during per-vertex processing where the values are interpolated.

Also, cleaned up more of the shader namespace by giving an Osd prefix
to public functions, and consolidated boundary and transition handling
code into the PatchCommon shader files. The functions determining
tessellation levels are now all named OsdGetTessLevel*().
2015-05-06 13:47:33 -07:00
..
CMakeLists.txt Landing 3.0.0.alpha 2014-09-05 15:07:46 -07:00
glViewer.cpp removing unnecessary cuda includes from examples. 2015-04-28 16:13:48 -07:00
init_shapes.h Changed lefthanded flag to isLeftHanded. 2015-04-15 16:15:19 -07:00
shader_gl3.glsl Amending Apache license language & file headers. 2013-09-26 12:04:57 -07:00
shader.glsl Updated handling of patchParam and patchCoord 2015-05-06 13:47:33 -07:00