Commit Graph

572 Commits

Author SHA1 Message Date
David G. Yu
f0128a5f5e Fixed Far::PatchParam encoding of refinement level
This change restores the use of 4-bits in Far::PatchParam to
encode the refinement level of a patch. This restores one bit
that was stolen to allow for more general encoding of boundary
edge and transition edge masks. In order to accommodate all
of the bits that are required, the transition edge mask bits
are now stored along with the faceId bits.

Also, accessors are now exposed directly as members of Far::PatchParam
and the internal bitfield class is no longer directly exposed.
2015-06-11 15:10:30 -07:00
Takahito Tejima
531a069410 cmake fix: specify the destination file name for the maya script
This change fixes a cmake build issue, which fails to create lib
directory when maya example plugin is configured to build.
2015-06-10 18:04:01 -07:00
Jeremy Cowles
017f089775 Merge pull request #612 from poljere/fix_maya_plugin
The Maya plugin can interpolate UVs and Vertex color channels.
2015-06-10 14:05:32 -07:00
Pol
dd2b784b22 Cleaning up the Maya plugin a bit more, now accessing the arrays is more clear. 2015-06-09 17:46:29 -07:00
Pol
f669e3a3d7 The Maya plugin can interpolate a UV channel and a vertex color channel. 2015-06-08 15:26:36 -07:00
David G Yu
3c30c804c8 Fixed farViewer hotkeys to match other examples
New key bindings:
    Control edges 'H' (was 'e')
    Control vertices 'J' (was 'r')
    Draw mode 'W' (was 'f')
    Fit Frame 'F' (was previously unavailable)
2015-06-05 14:22:19 -07:00
David G Yu
915f7c9d3a Fixed farViewer to end query operations
Previously, the unterminated queries resulted in invalid GL operations.
2015-06-05 13:56:40 -07:00
David G Yu
ae535c9321 Updated farViewer control mesh display
Previously, farViewer had an incomplete implementation of this which executed
invalid GL commands. Now, farViewer uses the common control mesh display for
consistency with other example viewers.
2015-06-05 13:52:24 -07:00
David G. Yu
af15d752ed Removed GLFW2 -> GLFW3 shenanigans from glUtils 2015-06-03 18:36:08 -07:00
Takahito Tejima
5c01e709f9 example fix: remove unnecessary debugging feature. 2015-06-03 17:40:36 -07:00
Takahito Tejima
8378639deb Add a guard for glMultiDrawElementsIndirect, and also disable it too.
we need more work to get MDI work. disabling it for now.
2015-06-03 15:01:09 -07:00
Takahito Tejima
45d8b1de54 examples fix: CLEW crash, print a message for unsupported GPU kernel
- Fix crashes on glEvalLimit and glStencilViewer with CLEW
- Currently GPU patch evaluation only supports BSpline patches.
  raise an error message in glEvalLimit for the unsupported combinations
  until GregoryBasis evaluation will be added to them.
2015-06-03 15:01:05 -07:00
Takahito Tejima
815e54edd0 Suppress erroneous drawing around valence 2 interior vertex
Although valence 2 gregory patch is not well supported yet, this fix
mitigates artifacts around such a vertex.
Adding a shape catmark_gregory_test8 to see this issue.
2015-06-03 13:56:29 -07:00
Jeremy Cowles
12f260adad Merge pull request #593 from davidgyu/fvarSmoothPatchPostpone
Removed WIP face-varying bicubic patches
2015-06-03 13:46:39 -07:00
jcowles
b081055fe9 Clean up compiler warnings.
stb - potential use of uninitialized variable (this may have been safe)
farViewer - unused variable
patchTableFactory - _channelIndices potentially used uninitialized
FVarLevel - valueIndexInFace0 potentially used used uninitialized (was safe)
2015-06-03 13:17:40 -07:00
David G Yu
521f31468b Removed WIP face-varying bicubic patches
We'll restore this code and finish it up for the next release.

For now, removing this code restores parity with the 3.0 beta,
i.e. face-varying patches are always all bilinear.
2015-06-03 12:49:01 -07:00
Takahito Tejima
ef55c48123 Merge pull request #587 from davidgyu/fvarSmoothPatchPostpone
Prepare to defer face-varying bicubic patches
2015-06-03 12:33:05 -07:00
Jeremy Cowles
8966519b8b Merge pull request #589 from barfowl/topology_descriptor
Separated Far's TopologyDescriptor from the RefinerFactory classes
2015-06-02 17:07:18 -07:00
barfowl
6c61f1b006 Separated Far's TopologyDescriptor from the RefinerFactory classes:
- moved TopologyRefiner out of the RefinerFactoryBase into Far
    - moved implementation of its Factory<MESH> to far/topologyDescriptor.*
    - updated examples and tutorials (no more references to FactoryBase)
2015-06-02 16:27:19 -07:00
Takahito Tejima
5c54962d3b Improve OpenCL/DX interop configuration
build osd and examples with DX/CL interop only of cmake finds
cl_d3d11.h or cl_d3d11_ext.h.
2015-06-02 16:20:59 -07:00
David G Yu
1c4bdbb726 Prepare to defer face-varying bicubic patches
There's a lot of good foundational work here to eventually support
smooth interpolation of face-varying patches. Unfortunately, this
is not quite ready to release. Therefore, we've decided to defer this
feature until a later release.

This change hides this code behind the FAR_FVAR_SMOOTH_PATCH macro.
2015-06-02 15:28:31 -07:00
Takahito Tejima
36465ed96c Merge pull request #586 from davidgyu/fvarRename
Renamed per-patch face-varying access methods
2015-06-02 14:26:25 -07:00
David G Yu
0243f54b29 Updated patch table face-varying interface
Now the channel specifier is the last parameter in a method's
parameter list with a default of 0.  This is consistent with the
topological face-varying queries and also simplifies the common
case of just a single face-varying channel.
2015-06-02 13:51:32 -07:00
Takahito Tejima
7d2de8bc28 Merge pull request #585 from davidgyu/fvarUniformFix
Fixed face varying shading for examples
2015-06-02 13:13:38 -07:00
Takahito Tejima
1e02fbebf8 Sync HLSL shaders for the single crease orientation fix.
- add HLSL equivalents of the previous GLSL change
- rename OsdGetSingleCreaseSegmentParameter to
OsdGetPatchSingleCreaseSegmentParameter.
- add shadingMode UI for dxViewer similar to glViewer
2015-06-02 12:03:27 -07:00
David G Yu
385df434ec Renamed per-patch face-varying access methods
This matches more closely the pattern used elsewhere in Far:
    GetFVarPatchValues() --> GetPatchFVarValues()
    GetFVarPatchesValues() --> GetFVarValues()
2015-06-02 09:13:17 -07:00
David G Yu
89468a40b6 Fixed face varying shading for examples.
Renamed the shader define used by the glViewer and glFVarViewer to
make the intended use more clear and robust.
2015-06-02 08:49:11 -07:00
takahito-tejima
71470b1ab7 glViewer: mac shader compile error fix 2015-06-01 22:16:43 -07:00
Takahito Tejima
fe92265db9 Unlabel the rotation of single crease patch.
use boundaryMask to identify the crease edge from 4 edges.
with this change, single-crease patch no longer needs to be rotated on
its population.

In shader, experimentally use same infinite sharp matrix for both
boundary and single-crease patch.
2015-06-01 21:26:39 -07:00
David G Yu
5d36d87dda Merge pull request #579 from takahito-tejima/dev
glViewer: separate displayStyle(wire) and shading.
2015-06-01 12:08:02 -07:00
Takahito Tejima
b250fdcfc3 glViewer: fix invalid drawing on the first frame
uniform blocks were not set correctly.
2015-06-01 11:22:32 -07:00
Takahito Tejima
a09539c0a7 glViewer: separate displayStyle(wire) and shading.
- split displayStyle and shadingMode control into two different settings.
- add more shadingModes:
   normal, curvature(screen space), curvature (from patch)
- minor cleanup
2015-06-01 11:13:54 -07:00
barfowl
e52dd83b14 Removed unnecessary files include by public headers in Far 2015-06-01 00:14:19 -07:00
Takahito Tejima
85bb0a156e examples cleanup: remove framebuffer class
- the framebuffer class in examples/common is unstable in certain drivers.
removing offscreen rendering for now.
- move screenshot function to GLUtils.
- fix vertex attrib binding bug (not showing control mesh on osx)
2015-05-31 20:52:20 -07:00
Takahito Tejima
7394bf5f51 Examples cleanup: factor out control mesh drawing.
- add GLControlMeshDisplay and D3D11ControlMeshDisplay into
  examples/common
- delete all drawCageEdges/drawCageVertices from viewers and
  use ControlMeshDisplay class
2015-05-31 15:08:37 -07:00
David G. Yu
808d0322fd Workaround dxPtexViewer link dependencies 2015-05-31 10:20:41 -07:00
Takahito Tejima
d470bc81b9 Merge pull request #570 from davidgyu/dxRefactor
Sync'd screen-space single-crease patch fix to DX
2015-05-31 09:08:23 -07:00
Takahito Tejima
cdef7870e7 Merge pull request #568 from c64kernal/dev_arg
Command line options for GL context.
2015-05-31 09:07:14 -07:00
David G. Yu
bd6d9b4ea9 Sync'd screen-space single-crease patch fix to DX 2015-05-31 08:18:18 -07:00
George ElKoura
f3eae18197 Command line options for GL context.
Adding command line options to glViewer to make it easy
to control the requested GL version and profile.  While
it is only enabled for glViewer in this change, it will
be easy to extend to all our example viewers.  The new
command line options are:

    -glCoreProfile on|off
    -glForwardCompat on|off
    -glVersion M.n
2015-05-31 01:22:35 -07:00
George ElKoura
742dca5b81 Get more viewers using GLUtils.
farViewer and glPaintTest now use GLUtils to set the GL context instead of
rolling their own.
2015-05-31 01:01:11 -07:00
David G Yu
4bf1ef722c Merge pull request #564 from takahito-tejima/singlecrease
Fix screen-space tessellation on single crease patch.
2015-05-30 23:58:39 -07:00
George ElKoura
fb096fdfed Move OPEN_GL_FORWARD_COMPAT setting
Move OPEN_GL_FORWARD_COMPAT setting inside CORE_POFILE guard.
2015-05-30 23:24:44 -07:00
George ElKoura
e3b20b5418 Fix GL context init for Linux and Windows.
Move the core profile specification into the OSX only section.
2015-05-30 23:16:27 -07:00
Jeremy Cowles
3b64c80f7f Only specify an OpenGL version hint on OSX
It appears the behavior of the version hint is operating system
(and perhaps driver) specific. On OSX the version hint is a
minimum version, but on Linux you get exactly the version
requested.

The GLFW FAQ seems to suggest that any driver not supporting
ARB_compatibility may need the hint.

s
2015-05-30 22:52:52 -07:00
Takahito Tejima
2102b4f6b2 Fix screen-space tessellation on single crease patch.
- Rename OsdPerPatchVertexBSpline to OsdPerPatchVertexBezier
- Split OsdGetTessLevels into 3 functions,
  OsdGetTessLevelUniform, OsdGetTessLevelAdaptiveRefinedPoints,
  OsdGetTessLevelAdaptiveLimitPoints.
- Add a regression test shape : catmark_single_crease
2015-05-30 22:41:24 -07:00
George ElKoura
5a51f31104 Remove mention of vtr from tests and examples.
- Renamed common/vtr_utils to common/far_utils.
- Renamed all mentions of Vtr in the sources of tests and examples.
2015-05-30 22:10:07 -07:00
George ElKoura
fbfc657d03 Fixed build breakage in mayaPolySmooth.
Make sure to maintain constness to fix the build break for gcc.
2015-05-30 16:16:35 -07:00
Takahito Tejima
997d6035b9 Merge pull request #558 from davidgyu/fvarFix
Fixed a couple of problems with FVar handling
2015-05-30 12:00:32 -07:00
David G Yu
c49cc09966 Removed a vim swp file accidentally checked in 2015-05-30 11:39:51 -07:00