Commit Graph

673 Commits

Author SHA1 Message Date
Mike Erwin
bd3113e7e3 spelling phase 4 -- examples, tutorials, regression tests
Read all comments and made corrections to files that aren't part of
OpenSubdiv itself but are packaged with it.

Commandline output of glPtexViewer is affected. Otherwise no functional
changes.
2017-01-24 22:48:48 -08:00
Mike Erwin
0beb654f0b spelling
Noticed a few typos when browsing comments. Proceeded with a "manual
spell check", reading all comments and tweaking spelling, grammar,
punctuation.

Didn't bother with Hbr library.

Comments only, no functional changes.
2017-01-11 12:40:49 -08:00
barry
796a2f40a7 Fixed bug with non-manifold face-varying topology causing crash:
- corrected the regular patch assembly in Far::PatchTableFactory
    - updated regression shapes to include the problematic topology
2016-12-15 12:33:36 -08:00
David G Yu
0a9b1f6373 Updated glFVarViewer/glEvalLimit for FVar stencils
These viewers now use stencil tables to refine all
face-varying primvar values, i.e. for both refined
points and local points.
2016-11-22 20:05:42 -08:00
David G Yu
197100cbcb Fixed glImaging errors w/ ctest
Fixed some incorrect shader configurations hit
while running the glImaging example through CTest
2016-10-20 17:26:27 -07:00
David G Yu
552e308266 Added OsdGetPatchIsRegular() for GLSL and HLSL 2016-10-17 15:25:17 -07:00
David G Yu
5ad64bc33e Addressed some FVar PatchTable API review notes
Fixed some inconsistencies with the methods added
to support face-varying patches.
2016-10-14 20:11:17 -07:00
barry
e21b4d902f Added a few more test shapes for face-varying and inf-sharp patches:
- added new shapes to regression/shapes
    - updated shapes/all.h to include them
    - updated init_shapes.h for glViewer and glFVarViewer
2016-10-13 19:59:38 -07:00
David G Yu
df5d01ad3c Fixed naming inconsistencies in Far::PatchTable
The methods which return arrays of FVarPatchParam have
been made plural, e.g. GetFVarPatchParams(), for consistency
with the other methods in PatchTable.

Also fixed a missing doxygen tag.
2016-10-11 17:07:14 -07:00
barfowl
ffdb32cbac Merge pull request #877 from davidgyu/inf_sharp_stencil_viewer
Updated glStencilViewer for InfSharpPatches
2016-10-10 16:45:45 -07:00
David G Yu
705e144fb5 Updated glStencilViewer for InfSharpPatches
Added a toggle to enable the use of infinitely sharp
patches and also implemented fitFrame ('f' keypress).
2016-10-07 17:40:58 -07:00
David G Yu
a3ba5f08f3 Updated glEvalLimit viewer for InfSharpPatch
Added a toggle to enable the use of infinitely sharp
patches and also implemented fitFrame ('f' keypress).
2016-10-07 17:21:59 -07:00
David G. Yu
c9a3bb4d87 Updated glViewer and dxViewer for InfSharp patches
Both of these have been updated to expose toggles
to enable refinement and creation of infinitely
sharp patches.
2016-09-30 11:00:31 -07:00
David G. Yu
42f5090290 Updated glFVarViewer and glEvalLimit examples
These have both been updated to test the refinement
and evaluation of face-varying patch data.
2016-09-29 10:00:19 -07:00
David G Yu
b49d40100d Fixed compile warnings in ptex examples on macOS 2016-09-06 23:24:46 -07:00
David G Yu
8babf1e12b Removed mayaPolySmooth example
Also removed the remaining Maya dependencies. These
were most useful during the early days of OpenSubdiv.
Now OpenSubdiv has been integrated directly into Maya
and these examples serve little purpose.
2016-09-06 17:08:05 -07:00
George ElKoura
d856975ef3 No longer use CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR
As mentioned in issue #814, avoiding the use of CMAKE_SOURCE_DIR makes it easier to integrate OpenSubdiv as a submodule in other projects.

Fixes #814.
2016-07-08 22:45:33 -07:00
David G Yu
781b060bd8 Merge pull request #812 from c64kernal/dev_dxv
Fix unsigned/signed compare in dxViewer
2016-06-26 10:49:20 -07:00
George ElKoura
507e655a10 Fix unsigned/signed compare. 2016-06-25 21:55:51 -07:00
David G. Yu
1ba1e07ad1 iso-646 fix for ptex / examples / tutorials 2016-06-25 14:27:53 -07:00
David G. Yu
3e3695652f iso-646 fix for CUDA / CL / TBB 2016-06-25 14:23:55 -07:00
David G Yu
3d08e0ac27 Merge pull request #810 from thomthom/dev-iso646-fix-dx
iso-646 fix for DirectX project
2016-06-25 13:55:54 -07:00
Thomas Thomassen
b1e1ff31b4 Clean up DX, example and tutorials. 2016-06-25 10:30:50 +02:00
Thomas Thomassen
72610a3043 Glean up GLEW and GLFW. 2016-06-25 10:29:59 +02:00
Thomas Thomassen
aa0599b4bc Merge branch 'dev'
Conflicts:
	opensubdiv/far/patchTableFactory.cpp
2016-06-24 23:30:44 +02:00
David G Yu
90e8b58145 Merge pull request #804 from c64kernal/dev_cmake
Use cmake's folder feature on platforms that support it.
2016-06-23 12:56:01 -07:00
George ElKoura
923d60ca74 Use cmake's folder feature on platforms that support it.
We now make use of folders where they are supported.  In particular, on Visual Studio, this produces much nicer solutions to navigate.
2016-06-09 17:04:26 -07:00
George ElKoura
bd4ee29144 Fixed two issues with HUD sliders.
- Capping was broken (thanks to fakebits for pointing it out).  Fixes #801.
- Slides where min != 0 were also broken.
2016-05-01 13:43:21 -07:00
David G Yu
76137e5cc1 Merge pull request #788 from manuelk/dev
Improved Ptex configuration and DX compatibility
2016-03-29 12:20:59 -07:00
Takahito Tejima
7cb13ee4a8 fix ptex lookup shaders to clamp the patchcoord
with MSAA enabled, patchcoord could overrun the guttering pixels.
2016-03-10 12:39:41 -08:00
manuelk
b5cabd2259 More dxPtexViewer improvements:
- fullscreen mode added (-f)
- added usage error message
- added IBL lighting
- matched GUI to glPtexViewer
- removed some ptex HW filter options (missing code is causing crash)

Note : the IBL BRDF definitely needs some tweaks...
2016-02-25 17:14:09 -08:00
manuelk
84d0e02fa2 dxPtexViewer code example updates:
- update GUI to match more closely glPtexViewer
- added pipeline stats query for number of triangles tesselated
- matched CPU / GPU compute timers
- added obj animation
- fixed near / far clip planes
2016-02-24 11:38:14 -08:00
Thomas Thomassen
c422a79031 Rename and, or and not to &&, || and ! to address compilers that don't support them out of the box without extra headers. 2016-02-21 15:47:11 +01:00
manuelk
4926fd2c3e Ptex fixes:
- fix build compiling & linking to accomodate recent code churn in Ptex
- fix FindPTex.cmake module to correctly extract version number
- fix dxPtexViewer & glPtexViewer source to compile with new Ptex namespace changes
- add alpha channel padding function to ptexMipmapLoader as a workaround to the absence of 3-channel DXGI formats
- mirror ptex memory limit function from glPtexViewer to dxPtexViewer
2016-02-19 16:58:56 -08:00
David G. Yu
12b53689cf Fixed pointer increment in glStencilViewer.cpp 2016-02-05 16:20:02 -08:00
manuelk
223d756a14 More compile warning fixes (MSVC 2015) 2016-02-05 15:31:16 -08:00
David G. Yu
dcc4b61bf7 Re-enabled fractional tessellation in viewers 2015-10-23 15:26:46 -07:00
Takahito Tejima
f5810bac97 Fix windows build 2015-09-30 11:20:03 -07:00
Jeremy Cowles
84ff9d3604 Merge pull request #728 from significant-bit/win32-lean
use WIN32_LEAN_AND_MEAN properly
2015-09-20 22:36:25 -07:00
George ElKoura
effe6a2ed6 Fixed small bug in glFVarViewer for Loop.
- Make sure to pass in the LOOP define to the shader when dealing with
Loop surfaces.
2015-08-24 17:33:30 -07:00
Mike Erwin
585858c1e4 use WIN32_LEAN_AND_MEAN properly
Misspelled W32_LEAN_AND_MEAN in osd/opengl.h had no effect on windows.h.

Also added to example code wherever windows.h is included.
2015-08-07 17:45:41 -04:00
David G Yu
b1ab8e3f8b Fixed single crease patch classification
This fixes a regression in the function used to identify single crease
patches. This also updates the patch color values used by the glImaging
regression test to match the colors used in other example viewers so
that patch types can be more easily identified during automated testing.
2015-08-04 17:50:51 -07:00
David G Yu
e897a1c0e5 Merge pull request #702 from daz3d/cmake_error_on_no_gpu
Fixes cmake projects for non-gpu use case
2015-08-04 08:00:58 -07:00
David G Yu
282c462097 Disabled Fractional Spacing toggles from viewers
Fractional tessellation is not currently supported by the core
tessellation shaders. This will be fixed in a future release.
2015-08-03 12:51:59 -07:00
Takahito Tejima
3825319149 example viewer hud: disable depth test 2015-07-30 15:53:33 -07:00
Takahito Tejima
376e9dd3eb glViewer,dxViewer: disable catmark_pole360 2015-07-30 15:53:08 -07:00
Takahito Tejima
def029a273 glEvalLimit example: add bilinear shape into test cases 2015-07-29 14:49:51 -07:00
Takahito Tejima
8a8771c97d Revert "Add ISPC limit surface evaluation" 2015-07-20 17:13:51 -07:00
Sheng Fu
d3f8725e79 Add ISPC limit surface evaluation 2015-07-20 14:12:11 -07:00
Christopher Jones
87dc09e769 Fix cmake projects to not require GLFW when NO_OPENGL provided and not build gpu lib if not needed. 2015-07-15 23:55:14 -06:00
Jeremy Cowles
ab5d5341af Remove all unused references to AddVaryingWithWeight
Far no longer supports this method, so the existing functions were pure noise.
Hbr, however still requires it, so there are still a couple instances of it in
the hbr tutorial files.
2015-06-25 22:12:38 -07:00
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