Commit Graph

631 Commits

Author SHA1 Message Date
David G Yu
c82b3d551d Merge pull request #502 from barfowl/patch_eval
Refactor public patch evaluation methods exposed by Far::PatchTables
2015-05-20 19:39:32 -07:00
Takahito Tejima
6a0b43ab2f dxViwer/dxPtexViewer enable back-face culling
since we fixed gregory patch rotation/orientation issues.
2015-05-20 18:28:11 -07:00
barfowl
40832a0f0d Amendment to previous commit deprecating PatchTables::Evaluate methods:
- replaced Evaluate() with EvaluateBasis() in far/tutorial_6
    - commented out use of EvaluateFaceVarying() in examples/farViewer
        - face-varying patches are work in progress
2015-05-20 16:40:32 -07:00
Takahito Tejima
109a3f5383 osd layer: Add GLPatchTable and retire DrawContext
In osd layer, we use GLPatchTable (D3D11PatchTable) as a
device-specific representation of FarPatchTables instead of
DrawContext. GLPatchTable may be used not only for drawing
but also for GPU eval APIs (not yet supported though.
We may add CudaPatchTable etc as needed).

The legacy gregory patch drawing buffers are carved out to
the separate class, named GLLegacyGregoryPatchTable.

Also face-varying data are split into client side for now, until
we add new and more robust face-varying drawing structure
(scheduled at 3.1 release)

Tentatively replicate PatchArray structure in GLPatchTables. It will
be revised in the upcoming change.

Shifting hard-coded SRV locations of legacy gregory buffers in HLSL shaders.
2015-05-20 15:55:06 -07:00
David G. Yu
7ccf7c3320 Fixed build errors for dxPtexViewer w/ TBB 2015-05-20 13:31:20 -07:00
Takahito Tejima
8d9ae550ff Add a HLSL version of GregoryBasis patch shader.
hlslPatchGregoryBasis.hlsl is an equivalent to glslPatchGregoryBasis.
Update dxViewer to be able to switch among bspline, gregorybasis, legacy
end capping.

also fixes a bug of GLSL legacy gregory shader which had an inconsistent
resource naming with example codes.

It looks like there's still an issue of D3D11 patchParam data fetching.
we'll come back to that bug.
2015-05-20 10:49:45 -07:00
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
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
David G Yu
34aac7d0e6 Fixed wireframe drawing for the farViewer 2015-05-19 15:48:25 -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
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
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
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
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
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
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
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
b66380ee52 Refactor Osd::DrawContext
Since unified shading work already removed subPatch info from
Osd::PatchDescriptor, the difference between Far::PatchDescriptor and
Osd::PatchDescriptor is just maxValence and numElements. They are used
for legacy gregory patch drawing.

Both maxValence and numElements are actually constant within a topology
(drawContext). This change move maxValence to DrawContext and let client
manage numElements, then we can eliminate Osd::PatchDescriptor and simply
use Far::PatchDescritor instead.

This is still an intermediate step toward further DrawRegistry refactoring.
For the time being, adding EffectDesc struct to include maxValence and
numValence to be maintained by the clients. They will be cleaned up later.

The side benefit of this change is we no longer need to recompile regular b-spline
shaders for the different max-valences.
2015-05-11 18:06:46 -07:00
Takahito Tejima
94d6eb6491 cleanup remaining ptex specific code in osd layer
- Remove MeshPtexData bit from Osd::MeshBits. It's not used any more
- Rename ptexIndexBuffer in D3D11DrawContext to paramParamBuffer
- Remove Is/SetPtexEnabled from D3D11DrawRegistry
2015-05-11 10:59:16 -07:00
Takahito Tejima
33bfbf699b Refurbish osd layer API.
In OpenSubdiv 2.x, we encapsulated subdivision tables into
compute context in osd layer since those tables are order-dependent
and have to be applied in a certain manner. In 3.0, we adopted stencil
table based refinement. It's more simple and such an encapsulation is
no longer needed. Also 2.0 API has several ownership issues of GPU
kernel caching, and forces unnecessary instantiation of controllers
even though the cpu kernels typically don't need instances unlike GPU ones.

This change completely revisit osd client facing APIs. All contexts and
controllers were replaced with device-specific tables and evaluators.
While we can still use consistent API across various device backends,
unnecessary complexities have been removed. For example, cpu evaluator
is just a set of static functions and also there's no need to replicate
FarStencilTables to ComputeContext.

Also the new API delegates the ownership of compiled GPU kernels
to clients, for the better management of resources especially in multiple
GPU environment.

In addition to integrating ComputeController and EvalStencilController into
a single function Evaluator::EvalStencils(), EvalLimit API is also added
into Evaluator. This is working but still in progress, and we'll make a followup
change for the complete implementation.

-some naming convention changes:
GLSLTransformFeedback to GLXFBEvaluator
GLSLCompute to GLComputeEvaluator

-move LimitLocation struct into examples/glEvalLimit.
We're still discussing patch evaluation interface. Basically we'd like
to tease all ptex-specific parametrization out of far/osd layer.

TODO:
-implments EvalPatches() in the right way
-derivative evaluation API is still interim.
-VertexBufferDescriptor needs a better API to advance its location
-synchronization mechanism is not ideal (too global).
-OsdMesh class is hacky. need to fix it.
2015-05-08 17:31:26 -07:00
Takahito Tejima
8fc0e5db93 Move Ptex code from osd to examples.
we're teasing out ptex specific data from core osd entities,
so there's no reason to keep ptex texturing utilities in core osd.
move them into example libs and let clients assemble shader snippets
as needed.

Also removing older ptex texturing code (without mipmap)
2015-05-07 13:56:48 -07:00
Takahito Tejima
f3aec9eb31 Remove osd/vertex.h
OsdVertex was used in 2.x FarMesh as a placeholder for Hbr template parameter.
We don't need such a class any more.
2015-05-07 12:34:09 -07:00
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
Ignacio Lillo
7882ea99ee Refs #358. Extracted helper functions into gl_common.cpp.
Also fixed some shader linker errors due to a bad
version definition.
2015-05-02 23:54:26 -03:00
George ElKoura
46569132cf Fixed build breakage for CLEW. 2015-04-30 18:28:48 -07:00
David G Yu
f95099a808 Merge pull request #459 from takahito-tejima/dev
glImaging: Fix out-of-bound access when creating varying buffer.
2015-04-30 15:04:28 -07:00
David G Yu
4a602a18fb Merge pull request #457 from takahito-tejima/refactor
remove libpng dependency and use stb_image_write instead
2015-04-30 14:06:10 -07:00
takahito-tejima
3761570714 glPtexViewer: remove -lz option from mac build 2015-04-30 13:17:04 -07:00
Takahito Tejima
b77aaf499e glImaging: Fix out-of-bound access when creating varying buffer. 2015-04-30 12:44:11 -07:00
Takahito Tejima
cb9a93b598 update example glShareTopology to use gregory basis patch. 2015-04-30 11:05:23 -07:00
Takahito Tejima
b3da5d3fab remove libpng and use stb_image_write instead 2015-04-30 11:04:16 -07:00
David G. Yu
421e60f8c5 A couple more DX / OpenCL changes for AMD 2015-04-30 10:01:01 -07:00
Ignacio Lillo
2239450e08 Refs #358. Refactored setGlCoreProfile .
Now it accepts the major and minor opengl version.
Refactored the windows creation flow to try different
opengl profiles before failing.
2015-04-29 23:31:34 -04:00
Takahito Tejima
9316852e69 use OPENSUBDIV_HAS_DX11SDK
replace OPENSUBDIV_HAS_DX of the previous change with
OPENSUBDIV_HAS_DX11SDK since we already have that.
2015-04-29 17:06:42 -07:00
takahito-tejima
04009e8a80 fix mac build. 2015-04-29 14:14:41 -07:00
Takahito Tejima
bfe0be5226 CMakeLists: remove unnecessary lines 2015-04-29 14:00:52 -07:00
Takahito Tejima
dcb022e1db Fix DX-OpenCL/CUDA interop.
- resolves DX-CL interop functions in Osd::ClD3D11VertexBuffer.
- enable CL kernels in DX build.
- more cleanup in test harnesses, adding D3D11 initializations into DeviceContext.
- add new defines OPENSUBDIV_HAS_OPENGL and OPENSUBDIV_HAS_DX for convenience.
2015-04-29 11:51:12 -07:00
Ignacio Lillo
44f965b439 Merge branch 'dev_upstream' into dev 2015-04-28 23:09:33 -04:00
Ignacio Lillo
ee5fe0d3a2 Merge branch 'dev' of github.com:ielillo/OpenSubdiv into dev 2015-04-28 22:49:51 -04:00
Jeremy Cowles
917bfa0c85 Merge pull request #451 from takahito-tejima/travis
Travis CI configuration
2015-04-28 16:55:32 -07:00
Takahito Tejima
dc137283dd removing unnecessary cuda includes from examples. 2015-04-28 16:13:48 -07:00
Takahito Tejima
82a0513326 cleanup CL/CUDA example harnesses.
refactor CL/CUDA specific initialization stuffs into
examples/common/clDeviceContext and cudaDeviceContext, and
update examples to use those structs.

also
- remove CL/CUDA tests from osd_regression. The tests for those kernels will be covered by glImaging.
- update cuda initialization to use the GL-interoperable device if available.
- remove CL specialization from glShareTopology, following the same pattern as we took in the previous OsdGLMesh refactoring. (still something strange with XFB kernels though)
- fix file permissions.
2015-04-28 15:46:37 -07:00
Takahito Tejima
2a543ee9a8 Travis CI configuration
add NO_GLTESTS option to cmake.
2015-04-28 14:44:07 -07:00
Takahito Tejima
de0082ba95 Simplify Osd::MeshInterface.
Removed OpenCL/D3D11 specialization and add DEVICE_CONTEXT as a template
parameter. For the kernels which don't need a context object (e.g.
CPU, OpenGL, cuda) just ignore the context, and for the kernels which
use a context (e.g. OpenCL, DirectX) takes a context or a user-defined
class as which encapsulates device contexts. Note that OpenCL requires
two objects, cl_context and cl_command_queue. The user-defined
class must provide GetContext() and GetCommandQueue() for strongly typed
binding to osd VertexBuffers and ComputeContexts.

Osd::Mesh and MeshInterface have been used as a handy harness to host
multiple GPU kernels and graphics APIs. However it has CL/DirectX
specializations and duplicates large amount of plubming code. With this
change, glMesh.h and d3d11Mesh.h become just typedefs and all logic is
put into mesh.h without specializations.

Also cleaned up unused header files and code formatting.
2015-04-27 11:27:05 -07:00
Takahito Tejima
74b78b3d17 Refactor again FarPatchTableFactory.
- rename "Regular end cap" to "BSplineBasis end cap"
- revert templating and add EndCapType into PatchTablesFactory::Options.
- make EndCapFactories internal in PatchTablesFactory.
- move end cap stencils into PatchTables, keep them relative to the max level.
- add a utility StencilTablesFactory::AppendEndCapStencilTables to splice and factorize endcap stencil tables.
2015-04-23 16:58:56 -07:00
George ElKoura
0371a3aa5f Renamed methods on Far::PtexIndices.
GetNumPtexFaces() became GetNumFaces()
GetPtexIndex() became GetFaceId()
GetPtexAdjacency() became GetAdjacency()
2015-04-21 22:23:22 -07:00
George ElKoura
420473b45b Experiment separating out Ptex from TopologyRefiner.
Remove the ptex-specific code from the Far::TopologyRefiner and instead provide it in a separate class Far::PtexIndices.  Clients who need to use the Ptex API need to first build a Far::PtexIndices object by providing it with a refiner.

This has the advantage of keeping the API on the TopologyRefiner a little cleaner.  The ptex methods were const but were mutating state with const_casts.  The new mechanism still achieves the same lazy initialization behavior by forcing clients to instantiate them exactly when needed.

A disadvantage of this approach is that the PatchTablesFactory creates its own PtexIndices and throws it out after the patch tables are created.  This is great if you're never going to need the ptex indices again, but not so great if you will need them again.
2015-04-21 17:34:02 -07:00
Takahito Tejima
43aa2500c4 Refactor far factories.
This change moves all gregory patch generation from Far::PatchTablesFactory
so that we can construct patch tables without stencil tables as well as client
can chose any end patch strategies (we have 3 options for now: legacy 2.x style
gregory patch, gregory basis patch and experimental regular patch approximation).

Also Far::EndCapGregoryBasisPatchFactory provides index mapping from patch index
to vtr face index, which can be used for single gregory patch evaluation on top
of refined points, without involving heavier stencil tables generation.
2015-04-20 18:59:07 -07:00
David Yu
d3a554c5de Fixed glViewer shader code for OS X GL runtime. 2015-04-18 15:24:24 -07:00
David G Yu
50ee424b1c Updated vtrViewer to match recent API changes. 2015-04-18 14:59:16 -07:00
George ElKoura
6ac11ae63b Fixed a bug in the display of the dxViewer cursor
Make sure to initialize the cursor of the window class in dxViewer as required.
2015-04-18 00:45:02 -07:00
David G. Yu
acedb6c710 Fixed windows build regressions. 2015-04-17 18:28:38 -07:00
Takahito Tejima
c58e63c8d5 Refactor single crease patch to be in unfined shader. 2015-04-17 16:26:57 -07:00
Takahito Tejima
aec1f61fb0 Merge pull request #422 from davidgyu/patch-drawing
Unified adaptive patch drawing
2015-04-17 15:39:37 -07:00
David G Yu
010a31efc4 Checkpoint changes to unify adaptive patch drawing. 2015-04-17 07:42:53 -07:00
Jeremy Cowles
6efe3e0bce Merge pull request #418 from asluk/dev
osd3 support for lefthanded meshes
2015-04-16 16:59:05 -07:00
Takahito Tejima
6e6e8040b7 CMakeLists: add enable_testing/add_test 2015-04-16 10:52:08 -07:00
asluk
df3c856b51 Changed lefthanded flag to isLeftHanded. 2015-04-15 16:15:19 -07:00
asluk
4752bcdd69 Add support for lefthanded meshes. 2015-04-15 16:13:43 -07:00
George ElKoura
88cae52f85 Fixing invalid memory read error in glEvalLimit.
We were erroneously using the number of vertices of the refined mesh to copy
data only allocated for the coarse mesh's number of vertices.
2015-04-15 13:38:59 -07:00
Ignacio Lillo
1831888a92 Refs #358. Extracted tesselation check into its own function.
If glew is present it will use it to query for tesselation information.
Otherwise it will use the information provided by the the header
files during compilation.
2015-04-12 19:32:43 -03:00
Ignacio Lillo
3847c02d85 Refs #358. Refactored code to use runtime information.
This is done since the header usually defines opengl
functionality that is not implemented. So it needs
to be queried at runtime using glew if available,
otherwise the use the header information.
2015-04-12 17:52:02 -03:00
Ignacio Lillo
d008c385d5 Refs #358. Refactored shader source into a method.
This was done since since sometimes the headers indicates
an opengl feature that is not implemented. Now the
function queries the opengl capabilities during runtime
to determine which version to use.
2015-04-12 17:35:18 -03:00
Ignacio Lillo
013a333680 Refs #358. Added helpers functions to determine opengl version. 2015-04-12 16:28:05 -03:00
Takahito Tejima
ce94262354 Add glImaging test. It iterates over regression shapes and kernels then generate images 2015-04-10 15:14:07 -07:00
Takahito Tejima
8da827336d Removes FarKernelBatch.
This is the first step to tease off Osd compute controller/contexts
from Far API.
Currently FarStencilTable only creates a kernelbatch for the entire range,
so we can use [0, numStencils) for all cases instead of KernelBatch.
This might not be true if we apply non-factorized level-wise stencils,
then we'll add another modular utility to serve those cases.
2015-04-10 11:08:24 -07:00
Jeremy Cowles
0bf42103ce Fixing shaders to make OSX/AMD GLSL compiler happy.
Write vec4(0) to the vertex shader OutputVertex.patchCoord, which is consumed
by the geometry shader.
2015-04-08 22:14:33 -07:00
Takahito Tejima
24f9dc154b Enable GregoryBasis patch.
PatchTablesFactory fills 20 indices topology into patchtable, and use it for eval and draw.

note: currently screen-space adaptive tessellation of gregory basis patches is
broken and cracks appear around them.
2015-04-08 17:07:10 -07:00
jcowles
13e9b43b38 Removing attempt to silence compiler warning.
This wasn't compiling on Windows and worse. Instead, we plan to disable the
warning as a compiler switch.
2015-04-02 11:11:12 -07:00
barfowl
9222c9e169 Removed use of "full topology" flag with Far::AdaptiveOptions:
- it was always ignored as full topology is required for PatchTables
    - it will soon be removed from AdaptiveOptions entirely
2015-04-01 14:57:28 -07:00
jcowles
76efdcfcf7 Fix initCL, make conditional based on CLEW
When CLEW is present, CL functions become macros which may resolve to null
function pointers. A previous change attempted to guard against CL-related
crashes, but introduced compiler warnings.

This change conditionally tests the function when CLEW is present.

Resolves: #400
2015-03-31 15:05:13 -07:00
Jeremy Cowles
28e39bf86f Enable osd_regression and suppress warnings. 2015-03-30 22:18:18 -07:00
George ElKoura
da9c8a83dc Make sure to double check that we have properly bound the OpenCL API
before using it.
2015-03-29 17:06:24 -07:00
George Elkoura
9d22e8bdda Make sure to include <string> before we use it in clInit.h 2015-03-28 23:44:10 -07:00
jcowles
cc5a9e891c Fixed more array indexing issues in examples/tutorials 2015-03-12 12:32:30 -07:00
manuelk
9e25b193ff Fix Win build 2015-02-27 15:52:12 -08:00
manuelk
d0a624f373 Add "smooth UVs" to Far
- extend Far::PatchTables data structures & interfaces to store requisite
  information for channels of face-varying bi-cubic patches
- implement gather function in Far::PatchTablesFactory to populate face-varying
  channels with adaptive patches
- extend accessor interface in Vtr::Level
- propagate code fall-out throughout OpenSubdiv code base, examples & tutorials
- extend vtrViewer code to visualize tessellated bi-cubic face-varying patches
2015-02-26 13:57:47 -08:00
David G Yu
cc6a89b373 Fixed vtrViewer build errors on OS X. 2015-02-16 23:09:51 -08:00
manuelk
866b88b7c9 Add support for single-crease patches to D3D draw context & controller
- also updated the dxViewer code example

note: dxPtexViewer still needs to be updated
2015-02-08 17:31:55 -08:00
manuelk
60a0fd783a Fix dxViewer build for latesst MSVC
- recent MSVC versions attempt to compile files with hlsl
  extensions when passed on the command-line. This breaks
  the build because these files are not meant to be compiled
  directly by MSVC. I removed the dependency from the
  CMakeList to prevent this from happening.
2015-02-08 17:26:53 -08:00
Christoph Kubisch
222f95d6c3 build option to disable DX on windows 2015-01-27 16:15:36 -08:00
manuelk
5e0c13f188 Add a fast code path to bypass frame interpolation when reading single (non-animated) OBJ files 2015-01-22 11:06:33 -08:00
manuelk
04c63537d1 Change patch color coding for single-crease transition patches
- add a small gradient to the patchColors tables so that single-crease transition patterns
  have slightly different colors
2015-01-22 11:05:01 -08:00
Takahito Tejima
0ca61278a5 Fixing crash of glShareTopology when switching to uniform subdivision. 2015-01-12 16:59:44 -08:00
Henry Schaefer
7c73cf0128 dxPtexViewer fixes:
- changed ptex layout data types in shaders to match srv format
 - changed ptex srv type to unorm format for uchar data
 - fixed hlsl compiler warning: initialized edgeDistance of OutputVertex struct in domain shader even if we are not in wireframe mode
 - added directx debug device and enabled automatic break points to easily spot dx errors
2015-01-09 02:03:42 +01:00
barfowl
9bb98a94fd Renaming of a few Sdc types and constants:
- renamed Sdc::Type to SchemeType and TypeTraits to SchemeTypeTraits
    - renamed TYPE_ prefix to SCHEME_
    - updated all usage within core library
    - updated all usage in examples, tutorials, etc.
2015-01-06 17:40:11 -08:00
barfowl
865fe5591f Modified Far::TopologyRefinerFactory<>::Create() take new Options as argument
- update examples, tutorials, regressions, etc. accordingly
2015-01-06 00:03:21 -08:00
manuelk
bfbd868fe2 Modify Far::TopologyRefiner refinement options
- move level of refinement / isolation into the Options structs
- fix splash damage in rest of the code

note 1: this is less than ideal, because most compilers accept the previous
        call to these functions with an incorrect parameter list (ie. passing
        the level instead of the struct issues no warnings and compiles...)
        caveat emptor...

note 2: the level parameter names may not be final for adaptive modes
        as we will likely want independent controls over crease vs.
        extraordinary vertex isolation.
2014-12-30 14:07:24 -08:00
manuelk
7954fbab37 Fix tangents in Osd::EvalLimitController
- don't rotate (s,t) coordinates but rotate the patch instead !

- refactor osd/cpuEvalLimitKernels to share Far::PatchTables cubic spline
  interpolation functions : this replaces tensor product formulation with
  weight matrices, which does not really impact performance here, but would
  have to be replaced when implementing regular gridding functions.

- fix OsdCpuEvalLimitController to not rotate coordinates and pass the rotation bitfields

- expose Far::PatchTables spline interpolation API (protected -> public)

- fix glEvalLimit tangent buffers (remove empty padding - see below)

- change policy for tangent buffers : the output buffer descriptor is
  **NO LONGER APPLIED** to tangent output buffers. Tangent primvar data
  buffers are no longer applying the offset and stride from the descriptor
  (because it doesn't make sense to share it). If more flexiblity is
  required, we will consider adding independent descriptors for the tangent
  buffers. This change will impact existing code that generates tangents
  with the EvalLimit controller.

fixes #370
2014-12-25 13:22:27 -08:00
manuelk
5944ada0f9 Add Options structs to Far::TopologyRefiner refinement methods
- fix all splash damage to tutorials / examples...
2014-12-23 10:07:24 -08:00
manuelk
b59c36d691 Add glfw error callback to code examples 2014-12-20 14:44:50 -08:00
manuelk
15b4135cfb Fix infinitely sharp edges isolation
- change topology refiner to check for edge sharpnesses when selecting faces for isolation
- add face-aggregator for edge tags to Vtr::Level
- fix logic in Far::PatchTablesFactory to correctly tag single-crease patches along infinitely sharp edges

note : this fix is a bit of a cludge - barfowl confirms that the vertex crease tags (VTags) are intended to
carry neighborhood information, which they currently do not. we will revisit this shortly and fix the tags,
which will allow us to simplify the traversal logic when isolating topology features.

fixes #369
2014-12-19 18:18:13 -08:00
manuelk
4643a51fb0 Fix Png dependency in examples build (fixes screenshot ability in glViewer) 2014-12-18 11:13:28 -08:00
manuelk
48cf4b6528 Refactor Vtr::Array for better "const" safety
Const' declared instances of Vtr::Array do not protect the pointer held
privately by the class properly. In order to force the compiler to
protect this pointer, we removed all non-const accessors from Vtr::Array
(now renamed Vtr::ConstArray) and moved them to a child class (Vtr::Array),
which requires const_cast<> operators internally to allow access.

The change & renaming is then propagated to all internal dependencies.
2014-12-15 10:23:13 -08:00
manuelk
9a3a88546d Rename some members of Far::TopologyRefinerFactory::TopologyDescriptor for consistency
- propagate changes to tutorials / examples
2014-12-12 11:19:24 -08:00
manuelk
ce55f56d50 Rename Sdc::Options vertex boundary interpolation rule enums
- VVarBoundaryInterpolation is now VtxBoundaryInterpolation
- enum prefix change from VVAR to VTX
- generel cleanup / doxyfication
- update of beta / release notes
2014-12-12 11:10:17 -08:00
manuelk
544213b3f0 Fix smooth triangles catmark weights
- rename enums in sdc/options
- add support for "smoothtriangles" tag in Shapes
- add 2 test shapes to glViewer
2014-12-11 09:19:41 -08:00
manuelk
4236aa8c06 Fix glViewer crash for Win Debug build
- switch std::vector::reserve() to resize() so that boundary check on read doesn't have a size 0 vector

fixes #362
2014-12-05 10:50:09 -08:00
manuelk
0ff7b15711 Fix Win build
- make sure we don't get conflicting enums (CODE_ERROR)
- fix template specialization for Far::TopologyRefinerFactory in regression/common/vtr_utils
- fix remaining error reporting code around osd
2014-12-03 20:04:35 -08:00
manuelk
cc6c0925a3 Refactor error reporting system
- change error codes from situational to general (fatal / coding / run-time...)
- pull error functions from Osd into Far
- add a templated topology validation reporting system to Far::TopologyRefinerFactory
- fix fallout on rest of code-base
2014-12-03 17:19:07 -08:00
manuelk
538c13f394 Fix Windows build 2014-11-25 14:14:59 -08:00
manuelk
b27b55e4a8 Refactor Far::PatchTables
- split Far::PatchDescriptor into its own class (mirrors Far::PatchParam)
- hide PatchArray as a private internal structure
- add public accessors patterned after Far::TopologyRefiner (returning Vtr::Arrays)
- propagate new API to all dependent code

note: some direct table accessors have not been removed *yet* - see code for details
2014-11-25 12:41:19 -08:00
manuelk
2d0182e3e9 Enabling Loop test shapes in glViewer and glFVarViewer code examples 2014-11-18 12:44:52 -08:00
manuelk
b599bbc0cc Fix vtrViewer code example
- add control to toggle display of gregory basis
- add dedicated (yellow) color to common/patchColors for gregory basis
- fix display of end-cap quads
2014-11-18 10:57:19 -08:00
manuelk
e8210886a8 Extend stencil-driven Gregory basis code support to Osd::EvalLimit (cpu) 2014-11-11 17:35:52 -08:00
manuelk
f43854a2dd Add test shapes to glStencilViewer code example (gregory test 6 & 7) 2014-11-11 11:29:33 -08:00
manuelk
15725d28e8 Fix VtrViewer to display Gregory patch basis (debugging) 2014-11-11 11:28:39 -08:00
manuelk
c237ab00fc WIP check-point for Gregory basis factorization
- adding support for StencilTables creation from a Gregory basis
- fix a bug in the prot-stencil allocator (slow memory pool was not being cleared properly)
2014-11-04 11:14:21 -08:00
manuelk
9ee67664ae Adding visualization ability for Gregory patch basis to vtrViewer 2014-10-31 17:09:20 -07:00
manuelk
b3124649f8 Fix vtrViewer - breaks introduced by single-crease patch additions
note: adaptive wireframe display still needs work
2014-10-29 10:56:55 -07:00
David G Yu
e9aed5394a Fixed a few problems with the vtrViewer on OS X (Mavericks and Yosemite) 2014-10-24 22:16:47 -07:00
manuelk
5f810a0f8e Add support for 'hole' faces
- adaptive mode: remove faces tagged as holes from the selection of faces to isolate

- uniform mode: faces tagged as holes are still included in the refinement process,
                however they are removed from patch tables

- future improvements: add a 'selective refinement' code path separate from 'uniform refinement'
  to handle this case without un-necessary subdivision work.
2014-10-24 13:52:40 -07:00
David G Yu
cae2144f6c Fixed glPaintTest build error related to High DPI changes. 2014-10-24 11:25:28 -07:00
David G Yu
e99ac7e0c1 Updated example framework code to disable SSAO by default. 2014-10-24 11:18:51 -07:00
David G Yu
4c0f026bee Fixed a few problems with High DPI displays in the example programs. 2014-10-24 11:15:19 -07:00
David G Yu
e2bcc041d3 Added catmark_gregory_test{6,7} to a few examples. 2014-10-24 11:07:24 -07:00
David G. Yu
a9cbb1b3fd Fixed VS2012 compile error. 2014-10-23 14:17:49 -07:00
David G. Yu
cc71c8e741 Fixed Osd namespace use in DX examples. 2014-10-23 13:48:55 -07:00
manuelk
8e5426d93e Fix build for vtrViewer code example (match refactor of Far::StencilFactory) 2014-10-22 11:01:22 -07:00
manuelk
7d07e341e0 Adjust near clipping plane in glViewer automatically when SSAO is turned off
- when SSAO is turned off, we can bring the near clipping plane much closer to help close-up inspection...
2014-10-21 18:50:54 -07:00
manuelk
f145f70fd2 Refactor Far::StencilTablesFactory
- re-implement the pool allocator
    - use templates to remove code redundancy between regular & limit stencils
    - leverage [] operator overloading to simplify stencil factorization
    - add the ability to treat subdivision levels independently (see below)

- refactor Far::TopologyRefiner::Interpolate<>() methods to pass buffers by reference
  (allows overloading of [] operator)

- rename some of the stencil factory options
- propagate changes to Osd / examples / tutorials...
2014-10-21 16:36:26 -07:00
manuelk
7704d682d6 Reset default prim in glViewer code example to first in list 2014-10-13 11:27:43 -07:00
Takahito Tejima
c0907c7bc1 Introduces 'single-crease patch' : implements "Efficient Evaluation of Semi-Smooth Creases in
Catmull-Clark Subdivision Surfaces", Niessner et al, Eurographics 2012.

This change includes;
-topology identification for single-crease patch during adaptive refinement.
-patch array population (similar to boundary)
-sharpness buffer generation
-glsl shader

Eval stuffs will be coming.
2014-10-13 08:52:09 -07:00
manuelk
c30087cb52 Fix face-varying code in examples / tutorials to reflect changes in commit 4d84dfd7be 2014-10-10 11:57:43 -07:00
manuelk
a79832b3a1 Far::PatchTables re-factor & clean-up
- remove Descriptor iterators
- switch 'unsigned int' indices to typed Far::Index

We aren't done yet... but its a step in the right direction
2014-10-09 14:48:50 -07:00
manuelk
64610cacf7 Addng a regression shape to test face-varying boundary interpolation rules 2014-10-06 16:22:10 -07:00
manuelk
43c235b85d Adding 2 regression shapes to exercise face-varying interpolation code paths 2014-10-03 10:35:32 -07:00
manuelk
43493bb9ae Add support for bilinear stencils to the FarLimitStencilsFactory
- also update glSencilViewer code example to visualize the new stencil type
2014-10-02 16:09:17 -07:00
manuelk
431ee0fabb Fix boundary interpolation rule bug in glFVarViewer
- "propagate corner" rule was swapped with "always sharp" rule
2014-10-01 16:38:06 -07:00
manuelk
d898ab9779 Update glFVarViewer code example to match face-varying boundary policy changes in Sdc 2014-10-01 11:27:57 -07:00
manuelk
0d4582b34c Add 'sticles' to the glEvalLimit code example
Make the sample locations dynamic by adding a velocity vector. Face boundary
crossing is handled using the new ptex adjacency functionality recently
added to the Far::TopologyRefiner.
2014-09-30 18:53:47 -07:00
manuelk
82e7a1bcc5 Minor EvalLimit naming refactor
- also added some additional animation to the glEvalLimit code example
2014-09-22 16:01:43 -07:00
manuelk
d02bfc48d2 WIP on LimitStencilTablesFactory
- added an option to Far::StencilTablesFactory to generate stencils for
  coarse control vertices
- refactored interpolation code out into Far::PatchTables
- corrected tangent interpolation
- code cleanup & comments
2014-09-18 17:48:34 -07:00
manuelk
2e81594050 Fix GL_DEPTH_TEST in glStencilViewer 2014-09-17 17:52:37 -07:00
manuelk
cab8e0a038 Adding catmark_chaikin2 test shape
- this shape tests for Chakin rule around vertices with multiple incident creased edges
  (shows where Hbr is wrong)
2014-09-17 14:46:10 -07:00
Manuel Kraemer
4eb6450bfe Partial fix of bad tangents for arbitrary limit stencils 2014-09-13 07:38:12 -07:00
manuelk
c3cfb6824b Fix window title for glStencilViewer code example 2014-09-12 17:04:26 -07:00
manuelk
c66ee724a8 WIP limit stencils factory
todo:
- fix rotated tangents on patches
- add "end-caps" (bilinear or Gregory ?)
- add pure bilinear stencil mode
2014-09-12 16:59:16 -07:00
Takahito Tejima
0d6aaeeebe Fixes GL error caused by incomplete framebuffer on hud initialization. 2014-09-10 15:29:24 -07:00
Takahito Tejima
b3f6f52bb9 Fixes the bug of glShareTopology. This example mutates patchDescriptor in drawcontext, so it needs a write access.
Adding another GetPatchArray() returning non-const reference. We should think about better API for this.
2014-09-10 15:24:16 -07:00
manuelk
b07c3de607 Fix GL_DEPTH_TEST for GL code examples after adding image shader 2014-09-10 14:28:55 -07:00
manuelk
f784e2d958 Cosmetic update to glPaintTest code example
- added image shader to fill in background gradient
- fix retina display bug
2014-09-10 14:00:21 -07:00
manuelk
7323cdf2bb Cosmetic changes to glShareTopology
- add image shader to fill baground gradient
- fix retina display bug
2014-09-10 13:54:18 -07:00
manuelk
935b691f45 Cosmetic update to glEvalLimit
- add image shader to fill background gradient
2014-09-10 13:46:26 -07:00
manuelk
770ebfeb9c Cosmetic updates to glFVarViewer
- apply image shader on background (look consistent with glViewer)
- fix retina display bug
2014-09-10 13:17:52 -07:00
manuelk
c93a15b9df Extend export_obj.py Maya script to export uv set named 'map1' 2014-09-10 11:11:42 -07:00
manuelk
c399655dcc Landing 3.0.0.alpha
Sync'ing the 'dev' branch with the 'feature_3.0dev' branch at commit 68c6d11fc36761ae1a5e6cdc3457be16f2e9704a

The branch 'feature_3.0dev' is now locked and preserved for historical purposes.
2014-09-05 15:07:46 -07:00
Nicholas Yue
4d36cf8c3c Fix duplicate variables with identical name 2014-06-25 14:52:33 -07:00
manuelk
50874a5d00 Fix OSX Core Profile build
- remove obsolete glPushClient functions

note: this code is still duplicated in the ptexViewer (which still needs to be upgraded to the new framebuffer)

fixes #307
2014-05-28 12:39:43 -07:00
manuelk
84fcf01a40 Fixing broken build (forgot to remove WIP hbao from CMakeList) 2014-05-28 10:37:56 -07:00
Manuel Kraemer
8741687d20 Code cleanup for GLFrameBuffer in examples/common
- cleanup some duplicated code
- change the background color ramp function to make UI more readable
2014-05-27 07:20:57 -07:00
Takahito Tejima
46baf7af2f Fix Hud (d3d11) 2014-05-23 13:30:36 -07:00
Takahito Tejima
9a6c37b86d Fix Hud display for higher DPI (MBP retina) 2014-05-23 13:24:31 -07:00
Sergey Sharybin
6ef232c95a Integrate CLEW into osd library and examples
If the system has CLEW installed (which is detected by recently
added FindCLEW routines) then OpenSubduv would be compiled against
this library.

It makes binaries and libraries more portable across the systems,
so it's possible to run the same binary on systems with and without
OpenCL SDK installed.

The most annoying part of the change is updating examples to load
OpenCL libraries, but ideally code around controllers and interface
creation is to be de-duplicated anyway.

Based on the pull request #303 from Martijn Berger
2014-05-22 09:10:59 +02:00
David G. Yu
b28d470e9b Fixed build warnings/errors with VS2010 Pro 2014-05-19 09:23:22 -07:00
Sergey Sharybin
f6d45a6de0 Fix compilation error on windows+msvc2013
- Some missing includes of <algorithms> in order to have
  stdd::min() and similar functions.
- Need to cast numIndices and numNVerts to int explicitly
  in order to solve warning treated as an error about
  precision loss.
- Can't do vector[0] for an empty vector, it'll generate
  a runtime range check error.
- MSVC only works fine with make_pair(foo, bar) syntax,
  without explicit template substitution here. Otherwise
  weird 'can't cast int to int&&' errors are happening.
2014-05-17 12:52:02 -07:00
manuelk
da5db17d15 Fix framebuffer shader compiling for OSX
The driver apparently does not tolerate #version after a #define
2014-05-16 14:36:29 -07:00
manuelk
77b71a0446 Minor fixes to gl_hud and gl_framebuffer
- leave framebuffer off by default (and remove SSAO UI from examples)
- fix some resources leakage when toggling SSAO on/off
2014-05-16 13:38:25 -07:00
manuelk
9913e349df Adding a programmable image shader to gl_hud
- add a framebuffer to gl_hud with programmable image shader
- add optional SSAO image shader to the new framebuffer
- add screenshot to png functionality
- implement in glViewer

note: ptexViewer and some others still need refactoring to use the new hud capabilities
2014-05-15 13:53:43 -07:00
manuelk
5ff9edf4f9 Decrease compiler warning thresholds and fix outstanding warnings.
Note: this round fixes clang / gcc -Wetra warnings. More fixing remains for icc -w3 errors.
2014-05-15 13:34:32 -07:00
Takahito Tejima
efc8cddb18 examples: use GL timer query to measure the GPU draw timing more precisely. 2014-05-15 10:26:23 -07:00
Takahito Tejima
8cb0028db4 glViewer: use GL timer query to measure the GPU draw timing more precisely. 2014-05-15 09:32:47 -07:00
Manuel Kraemer
827efd14e3 Reorganize EvalLimitContext and EvalLimitController
Moved transient states (current vertex buffer etc) to controller.
ComputeContext becomes constant so that it's well suited for coarse-grain
parallelism on cpu.

Client-facing API has changed slightly - limitEval example has been adjusted
2014-05-10 17:55:50 -07:00
Takahito Tejima
4589453608 Added new example 'topologySharing'.
It tests vbo interleaving, aggregation, sharing topology, etc
2014-05-09 15:44:52 -07:00
Takahito Tejima
9aaacae853 Added interleaved buffer mode in glViewer 2014-05-09 15:44:52 -07:00
Takahito Tejima
ee061291b7 Interleaved buffer support in OsdCompute. Removed OsdVertexDescriptor and replaced with OsdVertexBufferDescriptor.
All kernels take offset/length/stride to apply subdivision partially in each vertex elements.

Also the offset can be used for client-based VBO aggregation, without modifying index buffers.
This is useful for topology sharing, in conjunction with glDrawElementsBaseVertex etc.
However, gregory patch shader fetches vertex buffer via texture buffer, which index should also
be offsetted too. Although gl_BaseVertexARB extension should be able to do that job, it's a
relatively new extension. So we use OsdBaseVertex() call to mitigate the compatibility
issue as clients can provide it in their way at least for the time being.
2014-05-09 15:44:52 -07:00
Takahito Tejima
2372eb45ef Add tbb kernel to glBatchViewer 2014-05-09 15:44:52 -07:00
Takahito Tejima
a786b2de15 enable GLSL compute kernel in glBatchViewer 2014-05-02 15:21:44 -07:00
Takahito Tejima
207cd494d5 glViewer: stop updating during freeze. 2014-05-02 14:19:08 -07:00
takahito-tejima
b59d67f501 Fixed ptexViewer build error on mac 2014-04-30 20:53:37 -07:00
manuelk
1284fa958b Minor cosmetic fixes to the HUD's font 2014-04-30 16:41:55 -07:00
manuelk
d6889c2105 Fix HUD pulldown mouse-click to handle relative window coordinates. 2014-04-30 16:08:49 -07:00
manuelk
7100f41f6c Minor improvements to HUD pulldown
- don't close the pull-down when selecting an item
- change color of down-arrow to yellow when the pulldown is open
2014-04-30 15:41:05 -07:00
manuelk
a7d5db4d7d More cosmetic fixes to examples' GUI
- fix default selection for pulldown widgets
- move widgets around to prevent overlap in examples
- add a little triangle indicator to the pulldown widget
- switch color from white to yellow for selected pulldown item
2014-04-28 16:36:39 -07:00
manuelk
6e7404f150 Cosmetic fixes to the ptexViewer example GUI
- switch to pulldown widget
- move GUI components around
- add TBB as a compute controller
2014-04-28 12:09:15 -07:00
Manuel Kraemer
a497528c59 Adding a NO_MAYA flag to CMakeLists to disable all Autodesk Maya dependencies in the build 2014-04-28 10:21:39 -07:00
Manuel Kraemer
48c119cb26 More cosmetic changes to the examples GUI
- switch shading radio buttons to pulldowns
- re-ordered elements on screen in most viewers

note: the ptex viewer has not been updated to the new look yet
2014-04-28 10:10:10 -07:00
Manuel Kraemer
00f2419388 Additional GUI updates to GL example code
- switch Compute selection to pull-down menu
- add TBB controller to ptexViewer
- small cleanup in Hud

note: shading should also switch to a pull-down
2014-04-27 23:05:18 -07:00
Manuel Kraemer
aa584ed2ce Adding a PullDown widget to our HUD in examples/common
- adding pulldown type menu selector
- updated shape selection to use the new widget in various Gl examples
2014-04-27 18:38:51 -07:00
Nathan Litke
0c837b73b2 Added a public constructor to OsdMesh that initializes the members objects from its arguments, allowing those members to be created by a subclass or an external function.
* maintainance work on the D3D11 specialization of OsdMesh to bring it in line with the other template specializations
* updated the facePartition example to derive PartitionedMesh from OsdMesh in order to allow other vertex buffer and compute controller configurations
2014-04-18 20:52:13 -07:00
Nathan Litke
2a463b5c83 Draw contexts do not fully initialize patch arrays #281
* added the numVertexElements argument to Osd*DrawContext::Create, which is used to initialize the patch arrays when calling OsdDrawContext::ConvertPatchArrays
* removed the unused level argument from Osd*DrawContext::_initialize
* maintenance work on CL/D3D11 bindings to get them to compile
2014-04-17 18:55:07 -07:00
manuelk
cd8a247243 One more fix for the windows cmake build
fixes #258
2014-04-16 11:27:35 -07:00
manuelk
7bdbf0c8a2 One more fix for the Linux cmake build
fixes #258
2014-04-11 18:33:11 -07:00
David G. Yu
d426d6f07c One more fix for the windows cmake build
fixes #258
2014-04-09 15:16:13 -07:00
mkraemer
0f687c4c62 Fix Windows build following CMake changes
Add conditionals testing for non-empty OPENGL_INCLUDE_DIR path

fixes #258
2014-04-09 18:09:53 -04:00
mkraemer
05a7db5e14 Make CMake path variables more robust
Add quotes around variables containing paths - this might require a second pass...

fixes #258
2014-04-09 16:43:38 -04:00
manuelk
99c34d2aec Adding functionality to store uniform face-varying data across multiple levels of subdivision
- switch FVarDataTable to a class
- add offsets to keep track of level
- modify dependent code
- rename 'totalFVarWidth' to 'fvarWidth'

fixes #271
2014-04-04 19:10:34 -07:00
Takahito Tejima
d960990063 Remove FarMesh dependency from Osd*Context. The context constructor takes
subdivision tables and vertex edit tables directly.
2014-03-28 12:10:13 -07:00
Dirk Van Gelder
061c861dbf Change PxOsdUtil prefix to final OsdUtil prefix. 2014-03-27 08:26:55 -07:00
Takahito Tejima
84bc05ac9f more refactoring on FarMesh and move FarMultiMeshFactory to OsdUtil. 2014-03-24 19:13:40 -07:00
Takahito Tejima
44a7cb6a45 Refactor Far API.
* replace void* of all kernel applications with CONTEXT template parameter.
  It eliminates many static_casts from void* for both far and osd classes.
* move the big switch-cases of far default kernel launches out of Refine so
  that osd controllers can arbitrary mix default kernels and custom kernels.
* change FarKernelBatch::kernelType from enum to int, clients can add
  custom kernel types.
* remove a back-pointer to farmesh from subdivision table.
* untemplate all subdivision table classes and template their compute methods
  instead. Those methods take a typed vertex storage.
* remove an unused argument FarMesh from the constructor of subdivision
  table factories.
2014-03-19 11:44:51 -07:00
Takahito Tejima
1d8cb62255 Add OsdUtilPatchPartitioner. It splits patcharray into subsets so that clients can draw partial surfaces for both adaptive and uniform.
Also added a new example facePartition which uses OsdUtilPatchPartitioner.
2014-03-19 10:25:12 -07:00
manuelk
5aecc9e46e Fix Maya OsdPolySmooth node component output
The existing code in the node assumes that all the faces in the mesh have the same valence
when populating the component tables describing properties such as per-face material assignment.
This fix accounts for arbitrary topology.

fixes #269
2014-03-13 14:49:19 -07:00
manuelk
6e1f619941 Add cleanup function to osdPolySmooth Maya plugin
New function called osdPolySmoothCleanup added.

fixes #268
2014-02-28 14:58:19 -08:00
manuelk
fb3efcad71 Fix osdPolySmooth Maya plugin
- fix crash in the case of partial uv & color sets
- make sure that the default uv set is not dropped if its name is not 'map1'

note: the current fix carries the first uv set to the refined mesh, but custom
names are dropped and replaced by 'map1'. We appear to be running into a Maya
API bug.

fixes #267
2014-02-27 16:45:34 -08:00
David G. Yu
5031d0686a Fixed OpenCL initialization to be slightly more robust.
On platforms with multiple devices (e.g. OS X Mavericks
with both Intel and Discrete GPU CL devices) we must
create the context and command queue with the correct
device in order to share resources with GL.
2014-02-23 21:27:00 -08:00