Commit Graph

1703 Commits

Author SHA1 Message Date
David G Yu
e42885a4cc Merge pull request #495 from c64kernal/dev_farviewerfix
Fixed crash in farViewer when not using Adaptive.
2015-05-19 21:57:20 -07:00
David G Yu
5831bc68f0 Merge pull request #494 from barfowl/test2
Minor performance improvements to Sdc limit masks for the regular case:
2015-05-19 21:57:10 -07:00
David G Yu
1a721d7558 Merge pull request #493 from c64kernal/dev_farviewer
Removed Hbr code from farViewer.
2015-05-19 21:56:48 -07:00
George ElKoura
a586fe1715 Fixed crash in farViewer when not using Adaptive.
Fixed a simple crash in farViewer when not using adaptive.
Also snuck in a small code clean up.
2015-05-19 20:19:54 -07:00
George ElKoura
5d89260d5b Merge branch 'dev' of https://github.com/PixarAnimationStudios/OpenSubdiv into dev_farviewer 2015-05-19 19:23:43 -07:00
George ElKoura
b781c6efd3 Removed Hbr code from farViewer.
The code in farViewer that was used to draw the Hbr representation
of meshes is now gone.  This code was mostly used as a way to compare
against the Vtr implementation.  However, we don't want this to serve
as an example for others as the Hbr code is not meant to be instructive
otherwise.
2015-05-19 19:17:50 -07:00
Takahito Tejima
71a5e8495e Merge pull request #492 from davidgyu/farViewerRefactor
Fixed wireframe drawing for the farViewer
2015-05-19 19:16:23 -07:00
Takahito Tejima
911b5bbfbf Merge pull request #491 from barfowl/test
Move topology queries specific to a level to new Far::topologyLevel c…
2015-05-19 19:16:03 -07:00
Takahito Tejima
e1b128c64d Merge pull request #490 from davidgyu/dxfix
Fixed FindDXSDK to prefer more recent D3DCompile
2015-05-19 19:15:19 -07:00
barfowl
e3db2c94a6 Minor performance improvements to Sdc limit masks for the regular case:
- simple loop unrolling and branch reduction in Loop and Catmark limits
2015-05-19 15:49:19 -07:00
David G Yu
34aac7d0e6 Fixed wireframe drawing for the farViewer 2015-05-19 15:48:25 -07:00
barfowl
33cbbbc4f8 Move topology queries specific to a level to new Far::topologyLevel class:
- added new class to far/topologyLevel.h
    - updated TopologyRefiner to manage set of TopologyLevels internally
    - added TopologyRefiner method to retrieve TopologyLevel
    - redefined obsolete TopologyRefiner methods in terms of TopologyLevel
2015-05-19 15:06:41 -07:00
David G. Yu
b167096dd8 Fixed FindDXSDK to prefer more recent D3DCompile
The most up-to-date version of the HLSL compiler is now shipped as part
of the Windows SDK. Previously, the HLSL compiler was included with
the DirectX SDK.

There is more that we can do to improve this cmake module, but this
makes it more likely to find the correct tool.
2015-05-19 14:47:14 -07:00
Takahito Tejima
6421c52fae Merge pull request #489 from davidgyu/irregularRotate
Fixed varying stencils for end cap patches
2015-05-19 13:19:30 -07:00
Takahito Tejima
2f90e3799a Merge pull request #488 from jcowles/dev-size
Prefix header guards and add pragma once.
2015-05-19 13:18:18 -07:00
David G. Yu
8d33bb8dd9 Fixed varying stencils for end cap patches 2015-05-19 13:00:53 -07:00
jcowles
9d32712ec4 Prefix header guards and add pragma once. 2015-05-19 11:22:37 -07:00
David G Yu
4500f9a679 Merge pull request #487 from takahito-tejima/examples2
remove SupportsAdaptiveTessellation from OsdDrawContext (and example cleanups)
2015-05-19 10:57:57 -07:00
Takahito Tejima
c3aa00e706 remove SupportsAdaptiveTessellation from OsdDrawContext, and example cleanups
As a preparation for retiring DrawContext, move SupportsAdaptiveTessellation
method to examples/common/glUtils, which is renamed and namespaced
from gl_common.{cpp,h} to be consistent to other files.
Same renamings applied to other example files.
2015-05-19 10:30:16 -07:00
Takahito Tejima
de358d7f82 Merge pull request #486 from jcowles/dev-size
Change stencils sizes from unsigned char to int.
2015-05-19 10:29:57 -07:00
jcowles
7b4aa33a1f Change stencils sizes from unsigned char to int. 2015-05-19 10:16:56 -07:00
Jeremy Cowles
d28a5c01c9 Merge pull request #485 from c64kernal/dev_vtrviewer
Renamed vtrViewer to farViewer.
2015-05-19 09:17:07 -07:00
George ElKoura
a79dbcc074 Renamed vtrViewer to farViewer.
The name change is motivated by the desire to reflect that Vtr is
private API and its functionality is exposed publically through Far.
2015-05-18 19:46:22 -07:00
Takahito Tejima
05bbc3bb27 Merge pull request #483 from davidgyu/interpolate
Removed Interpolate{Boundary,Corner}Patch from Far
2015-05-18 18:06:12 -07:00
David G Yu
d97d9941be Removed Interpolate{Boundary,Corner}Patch from Far
Far::GetBSplineWeights() now handles boundary and corner edges.
2015-05-18 15:05:30 -07:00
David G Yu
4ac2fb9909 Merge pull request #482 from barfowl/test
Refactored Far computation of Gregory patch basis functions:
2015-05-16 13:29:50 -07:00
David G Yu
3d7bf8a2a6 Merge pull request #480 from takahito-tejima/refactor
update glShareTopology example.
2015-05-16 13:24:50 -07:00
barfowl
0d7ae5c461 Refactored Far computation of Gregory patch basis functions:
- fixes normalization of (s,t) hidden in Bezier weight computation
    - includes computation of true derivatives for future reference
2015-05-15 18:52:02 -07:00
David G Yu
e378927035 Merge pull request #481 from barfowl/test
Removed more usage of alloca() dependent on maximum valence:
2015-05-15 18:02:23 -07:00
barfowl
2ec507e107 Removed more usage of alloca() dependent on maximum valence:
- replaced alloca() usage in far/gregoryBasis.cpp with StackBuffer
2015-05-15 17:20:03 -07:00
Takahito Tejima
948895369d update glShareTopology example.
This examples is rewritten as a more comprehensive example
of Far and Osd APIs to generate batched index buffer and
vertex buffer, as well as sharing same topology and stencil
table among multiple objects.

Also this change includes an experimental code path of using
glMultiDrawElementsIndirect. It's currently incomplete due to
the missing interface of osd tessellation shader.
2015-05-15 16:26:17 -07:00
Takahito Tejima
ffc7678e1c Merge pull request #479 from davidgyu/evalfix1
Fixed example code use of single crease patches
2015-05-15 15:45:04 -07:00
David G Yu
8716a8eebf Fixed example code use of single crease patches
Also made a couple minor changes to true up the GLSL patch shaders.
2015-05-15 11:52:41 -07:00
Takahito Tejima
c11041f93d Merge pull request #477 from davidgyu/winbuildfix
Fixed an alloca buffer overrun error in Far
2015-05-14 18:24:41 -07:00
David G. Yu
b0dd44dd47 Fixed an alloca buffer overrun error in Far 2015-05-14 13:25:33 -07:00
Takahito Tejima
2fdd410b4b Merge pull request #475 from davidgyu/winbuildfix
Changed default draw modes for dxViewer
2015-05-14 13:21:08 -07:00
Takahito Tejima
0bf78b5431 Merge pull request #476 from davidgyu/macbuildfix
Removed an unused local var from interpolate.cpp
2015-05-14 13:20:50 -07:00
David G Yu
6ade89c221 Removed an unused local var from interpolate.cpp
Fixes a build warning from clang on OS X.
2015-05-14 12:55:04 -07:00
David G. Yu
984aedf842 Changed default draw modes for dxViewer
This restores the previous defaults and works around an
apparent runtime error on some platforms which is triggered
in the legacy gregory patch drawing code when patch culling
is disabled.
2015-05-14 12:48:36 -07:00
David G Yu
c5b7224b77 Merge pull request #474 from takahito-tejima/refactor2
Osd drawing API refactoring.
2015-05-14 10:05:35 -07:00
Ignacio Lillo
a305f31a30 Merge branch 'upstream-dev' into dev
Conflicts:
	examples/glViewer/glViewer.cpp
2015-05-13 23:15:06 -03:00
Ignacio Lillo
56f1b5c765 Merge branch 'dev' of github.com:ielillo/OpenSubdiv into dev 2015-05-13 22:46:16 -03:00
Takahito Tejima
4a4322983f Osd drawing API refactoring.
Remove DrawRegistry from osd layer and put a simple shader caching
utility into examples/common. osd layer only provides patch shader
snippet and let client configure and compile the code. Clients also
maintain the lifetime of shader object, which is preferable for the
actual application integration.

update all examples to use the new scheme.
2015-05-13 17:35:46 -07:00
Takahito Tejima
a0e3b59ae5 Merge pull request #471 from davidgyu/evalfix1
Removed BOUNDARY and CORNER patch types
2015-05-13 13:12:11 -07:00
David G Yu
fb009f41b2 Removed BOUNDARY and CORNER patch types
These are now redundant since all bspline patches are encoded in
the patch tables consistently using 16 point indices with boundary
and corner edges indicated in the boundary mask of the patch params.
2015-05-13 11:31:02 -07:00
Takahito Tejima
d77d627180 Merge pull request #470 from davidgyu/evalfix1
Fixed evaluation of boundary and corner patches
2015-05-13 09:18:25 -07:00
David G Yu
7b69117f02 Fixed evaluation of boundary and corner patches
My earlier change which simplified the categorization of
patch types broke evaluation for boundary and corner patches.

Previously, boundary and corner patches were always rotated
into a canoncial orientation by permuting the point indices
of the patch. This was convenient in some cases, but generally
made things unecessarily complicated, since the parameterization
of the patch had to be counter-rotated to compensate.

Now patches always remain correctly oriented with respect
to the underlying surface topology and evaluation of boundary
and corner patches is accommodated by simply adjusting the
spline weights to account for the missing/invalid patch
points along boundary and corner edges.

There is more to clean up and optimize, but this restores
correct behavior.
2015-05-12 16:13:57 -07:00
Takahito Tejima
4f372fa695 Merge pull request #469 from davidgyu/macbuildfix
Added stronger guards for OSD_MAX_VALENCE
2015-05-12 11:42:47 -07:00
David G Yu
1c91945d10 Added stronger guards for OSD_MAX_VALENCE 2015-05-12 11:15:51 -07:00
David G Yu
7c28326d1a Merge pull request #468 from takahito-tejima/refactor
Refactor Osd::DrawContext
2015-05-12 10:30:27 -07:00