Commit Graph

772 Commits

Author SHA1 Message Date
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
788880aeba Minor code cleanup / typo fixes in Far::PatchTables 2014-09-22 13:51:59 -07:00
manuelk
f7b21b941c Add far_tutorial_6 showing how to interpolate primvar data on the surface
limit at arbitrary locations.
2014-09-22 13:51:59 -07:00
barfowl
09789296d9 Modified weighting of sharpness values for Chaikin crease method:
- semi-sharp edges prevented from decreasing by averaging with inf-sharp
    - averaging now includes only semi-sharp edges around the vertex
    - see regression/shapes/catmark_chaikin2
2014-09-18 19:13:55 -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
4dd366593d WIP FarLimitStencilsFactory
- bi-cubic patches should be mostly covered, although portions of the interpolation code
  need to be refactored out into Far::PatchTables as vertex templated functions (following
  patterns established in the Far::TopologyRefiner)

- end-cap patches still have to be done (prob. going to drop Gregory in favor of bilinear)

- Presto needs a fully bilinear code path (no patches) - really ???
2014-09-17 17:53:38 -07:00
Nathan Litke
c355dc1060 Added a comment in PatchTablesFactory::createUniform to explain that options.triangulateQuads may only be set to true for quadrilateral refinement schemes. 2014-09-17 13:51:12 -07:00
manuelk
ad402d3623 Fix inconsistent file access permissions 2014-09-17 13:45:50 -07:00
Nathan Litke
78ae830794 Fixed Osd::Mesh constructors that initialize member variables from user variables. 2014-09-17 13:41:45 -07:00
Nathan Litke
2dc3b17fb2 Fixed triangulation of uniform quad patches. 2014-09-17 13:36:47 -07:00
Manuel Kraemer
b5098a5b0b Fix warning in FarStencilTablesFactory for Windows build 2014-09-13 15:58:54 -07:00
Manuel Kraemer
4eb6450bfe Partial fix of bad tangents for arbitrary limit stencils 2014-09-13 07:38:12 -07:00
Manuel Kraemer
8fc5371ec9 Merge pull request #350 from nathan-at-digitalfish/build_android
Fix build for Android
2014-09-12 17:27:57 -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
manuelk
e538261f7d Fix Cuda compile warning in osd/cudaKernel.cu 2014-09-12 10:43:18 -07:00
Julien Demouth
29b2d033e3 Introduces a kernel for NUM_ELEMENTS=4. It's faster and not buggy,
anymore.
2014-09-12 10:22:30 -07:00
Julien Demouth
cf0fe60ab4 Add a first pass of optimization in CUDA kernels
Conflicts:
	opensubdiv/osd/cudaKernel.cu
2014-09-12 10:21:46 -07:00
Nathan Litke
194ac022eb Added forward declarations for template specializations for raw topology data. 2014-09-11 16:30:56 -07:00
Nathan Litke
91f6f2246d Fix linker settings for Android. 2014-09-11 16:30:56 -07:00
Nathan Litke
d7311801c1 Fix compiler errors for OpenGL-ES. 2014-09-11 16:30:50 -07:00
Nathan Litke
5046d3475a Fix compiler warnings on 32-bit platforms. 2014-09-10 18:51:23 -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
7462ae20ff Fix build warnings in sdc/bilinearScheme and sdc/catmarkScheme 2014-09-10 14:39:51 -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
manuelk
5ede429f2f Release 2.6.1 2014-09-05 10:57:30 -07:00
manuelk
942957a5e7 Update release notes for release 2.6.0 2014-08-19 11:41:16 -07:00
Nathan Litke
0128417447 Allow NEON to be disabled on Android. Works similar to GCD on Mac OS X. 2014-08-07 13:10:54 -07:00
Sergey Sharybin
b836a31a22 Add basic functions to work with FV data via evaluator API
Currently supports clearing and pushing FV name and data.
2014-08-07 10:39:55 -07:00
Manuel Kraemer
cf8f5a97a8 Merge pull request #345 from RachidElGuerrab/neon_kernels
Added subdivision kernels for ARM NEON
2014-08-07 10:07:48 -07:00
Rachid El Guerrab
035e58f44a Added subdivision kernels for ARM NEON
* assembler kernels are based on the C implementation in neonKernel.cpp
* enable assembler kernel functions in neonComputeController.cpp with #define USE_ASM_KERNELS 1
2014-08-05 22:09:12 -07:00
Nathan Litke
22d4939563 Fixes a bug in OsdUtilVertexSplit that occurs when getting the address of the end of a std::vector. 2014-08-05 18:14:45 -07:00
Manuel Kraemer
df719eb9ed Revert "added memcpyasync and streams to cuda backend"
This reverts commit 84212cd725.
2014-08-02 12:40:08 -07:00
Manuel Kraemer
8c9096cdc8 Merge pull request #334 from nathan-at-digitalfish/fix_quad_face_factory
Fix for CATMARK_QUAD_FACE_VERTEX kernel in FarCatmarkSubdivisionTablesFactory
2014-07-24 17:52:46 -07:00
Manuel Kraemer
f987bf7b9f Merge pull request #333 from nathan-at-digitalfish/vertex_splitting
Vertex splitting
2014-07-24 17:52:23 -07:00
Frost
84212cd725 added memcpyasync and streams to cuda backend 2014-07-24 10:18:09 -04:00
Nathan Litke
9446270011 Fixes a bug in FarCatmarkSubdivisionTablesFactory that prevented the CATMARK_QUAD_FACE_VERTEX kernel from being selected for subdivision level 2 or greater. 2014-07-08 15:28:55 -07:00
Nathan Litke
21adceb4ec Added OsdUtilVertexSplit which creates a vertex-varying data table by duplicating vertices in a FarMesh. Catmark subdivision is supported.
* added public functions to `FarMeshFactory` that duplicate, rearrange, and split vertices
* added supporting protected functions to `FarCatmarkSubdivisionTablesFactory` and `FarPatchTablesFactory`
2014-07-08 14:20:37 -07:00
Sergey Sharybin
6e3bad7224 Make C-API evaluator aware of different subdivisions
This makes it possible to use use bilinear subdivisions which
corresponds to Blender's simple subdivisions.

Most of the changes doesn't break any existing API because of
using default values. it's only C-API function which now expects
an extra argument.

This doesn't entirely work because it uses adaptive evaluator
which gives some unwanted curvatures when using bilinear scheme.
2014-07-04 21:23:50 +06:00
Sergey Sharybin
4a8bd50633 Support different subdivision schemes for OsdUtilMesh
Basically title says it all, now it's possible to pass
subdivision scheme to the OsdUtilMesh::Initialize().

It's a last argument with default to CATMARK so it doesn't
break existing code.
2014-07-04 17:28:18 +06:00
Sergey Sharybin
1ebf2449dd Fix mismatch in declaration and usage of OsdCudaComputeRestrictedVertexA
Unused argument `pass` was defined in the CUDA kernel and it was never
passed to this function from the C++ code. This argument is also wasn't
used by the function itself.
2014-07-03 16:54:15 +06:00
Sergey Sharybin
7ac06db165 Fix crashes when using rather low-end cards like Intel ones
Solved by checking on run-time whether texture buffer objects
are supported.

When building with GLEW library doing compile-time check is
not enough, because actual information about existing features
is only known on runtime.

This only makes ti so CPU backend works, GLSL backends still
requires some work if we want them to make working. Not sure
it worth doing this now.
2014-07-02 22:17:58 +06:00
Manuel Kraemer
25b655e777 Merge pull request #329 from nathan-at-digitalfish/fix_osd_mesh
Fixed omissions in osd/mesh.h
2014-06-27 07:15:30 -07:00
Nathan Litke
e4d7f3d495 Fixed omissions in osd/mesh.h.
* added `OsdMeshInterface::GetFarMesh` and `OsdMesh::GetFarMesh` to match `OsdGLMesh` and `OsdD3D11Mesh`
* added `interleaved` argument to `OsdMesh::Refine` to match `OsdMeshInterface::Refine`
2014-06-27 02:15:27 -07:00
Nathan Litke
8af05a57c5 Fixed a bug in the vertex order for restricted Catmark vertex-vertex kernel batches. 2014-06-27 02:09:03 -07:00
Nathan Litke
7763ffcb3d Style fixes for changes from v2_5_0..ad84f06. 2014-06-25 11:16:36 -07:00
Manuel Kraemer
ad84f06c60 Merge pull request #320 from nathan-at-digitalfish/new_vertex_vertex_kernels
Added the CATMARK_RESTRICTED_VERT_VERTEX_A, CATMARK_RESTRICTED_VERT_VERT...
2014-06-25 10:52:08 -07:00
Nathan Litke
299966fd5c Fixed an error in createCLBuffer that occurs when the buffer size is zero. 2014-06-24 12:14:41 -07:00
Nathan Litke
73c29a0002 Fixed an error in createCLBuffer that occurs when the buffer size is zero. 2014-06-24 12:12:00 -07:00
Nathan Litke
5d00c37637 Fixed a bug in the creation of an edge-vertex kernel batch. 2014-06-24 11:58:12 -07:00
Nathan Litke
a23c8e05bd Fixed a bug in the creation of an edge-vertex kernel batch. 2014-06-24 11:55:25 -07:00
David G. Yu
54207ce79b Fixed build errors. 2014-06-23 22:07:50 -07:00
Nathan Litke
b7a763853c Added the CATMARK_RESTRICTED_VERT_VERTEX_A, CATMARK_RESTRICTED_VERT_VERTEX_B1, and CATMARK_RESTRICTED_VERT_VERTEX_B2 kernels which compute vertices resulting from the refinement of a smooth or (fully) sharp vertex.
* CATMARK_RESTRICTED_VERT_VERTEX_A handles k_Crease and k_Corner rules
* CATMARK_RESTRICTED_VERT_VERTEX_B1 handles regular k_Smooth and k_Dart rules
* CATMARK_RESTRICTED_VERT_VERTEX_B2 handles irregular k_Smooth and k_Dart rules
2014-06-23 15:59:43 -07:00
Manuel Kraemer
af3424e1da Merge pull request #310 from nathan-at-digitalfish/new_edge_vertex_kernel
New edge vertex kernel
2014-06-23 15:05:49 -07:00
Nathan Litke
634187f6c5 Fixed a bug in the CUDA kernel. 2014-06-23 14:49:10 -07:00
manuelk
23c488b4cf Release 2.5.1 2014-06-19 15:58:46 -07:00
manuelk
9f38860806 Update release notes for release 2.5.1 2014-06-19 15:51:44 -07:00
manuelk
2a181b166a Fix bilinear stencil tangent computions
- fix a couple of sneaky typos in the FarstencilTablesFactory

fixes #319
2014-06-19 11:34:08 -07:00
Nathan Litke
c6dcd30785 Fixed a bug in FarCatmarkSubdivisionTablesFactory introduced in a082ed3. 2014-06-16 12:41:21 -07:00
gelder
3bd2c0aef6 Fixes to boundary interpolation in osdutil. 2014-06-16 12:37:06 -07:00
Nathan Litke
a082ed39f4 Added an argument to FarMeshFactory that indicates which kernel types are supported by the controller. 2014-06-10 16:12:53 -07:00
Nathan Litke
7fcfd237f4 Fixed an error in the DirectCompute shader. This resolves https://github.com/PixarAnimationStudios/OpenSubdiv/issues/313. 2014-06-10 13:40:12 -07:00
Nathan Litke
a6e179367b Fixed an error in the DirectCompute shader. This resolves https://github.com/PixarAnimationStudios/OpenSubdiv/issues/313. 2014-06-09 19:43:02 -07:00
Nathan Litke
94c2a4293c Fixed a compiler error in tbbKernel.cpp. Addressed comments from https://github.com/PixarAnimationStudios/OpenSubdiv/pull/310. 2014-06-03 14:49:30 -07:00
Nathan Litke
e28215446a Changes to address comments from https://github.com/PixarAnimationStudios/OpenSubdiv/pull/310. 2014-06-02 14:20:02 -07:00
Nathan Litke
0af14f8ac6 Added the CATMARK_RESTRICTED_EDGE_VERTEX kernel which computes vertices resulting from the refinement of a smooth or (fully) sharp edge. 2014-05-30 17:44:25 -07:00
Nathan Litke
943a86aa88 Fixed mesh batching for the CATMARK_QUAD_FACE_VERTEX and CATMARK_TRI_QUAD_FACE_VERTEX kernels. 2014-05-30 11:54:28 -07:00
Manuel Kraemer
626921d82e Merge pull request #308 from nathan-at-digitalfish/new_face_vertex_kernels
New face vertex kernels
2014-05-30 10:56:12 -07:00
Nathan Litke
24b4aea686 Fixed a compiler error in the GLSL Transform Feedback kernels on OS X/Mavericks. 2014-05-30 00:55:25 -07:00
Nathan Litke
29b51d80af Implemented CATMARK_QUAD_FACE_VERTEX and CATMARK_TRI_QUAD_FACE_VERTEX kernels for DirectX 11, OpenMP, and TBB platforms. Fixed a bug in the GLSL Transform Feedback kernels. Minor changes for consistent formatting. 2014-05-29 23:20:04 -07:00
Nathan Litke
b769f4f60d Implemented CATMARK_QUAD_FACE_VERTEX and CATMARK_TRI_QUAD_FACE_VERTEX kernels for CUDA, GLSL Transform Feedback, and GLSL Compute platforms. 2014-05-28 17:21:37 -07:00
manuelk
d72ce282fd Release 2.5.0 2014-05-28 16:39:50 -07:00
manuelk
8d877d720b Update release notes for release 2.5.0 2014-05-28 16:35:05 -07:00
manuelk
de57f43db1 Fix doxygen generation errors 2014-05-28 16:19:49 -07:00
Nathan Litke
064115bbe8 Added the CATMARK_QUAD_FACE_VERTEX and CATMARK_TRI_QUAD_FACE_VERTEX kernels.
* The CATMARK_QUAD_FACE_VERTEX kernel calculates the face-vertex for a quadrilateral face.  It applies to every face after the first subdivision step, and may be applied for the first subdivision step of a quadrilateral coarse mesh.

* The CATMARK_TRI_QUAD_FACE_VERTEX kernel calculates the face-vertex for a triangle or quadrilateral face.  It may be applied for the first subdivision step of a coarse mesh composed of triangles and/or quadrilaterals.

* Both kernels calculate each face-vertex using four vertex indices (triangles are specified by repeating the third index).  Therefore neither kernel uses the F_ITa codex table, and instead the first vertex offset in the F_IT index table is stored in the FarKernelBatch's table offset.
2014-05-28 13:52:12 -07:00
Nathan Litke
95aca6ed21 Minor changes to fix typographical errors, and for consistency across class method prototypes. 2014-05-28 13:40:51 -07:00
Takahito Tejima
7f2b65ba46 Reordering includes to address a compile error on mac/glew environment 2014-05-23 13:23:24 -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
d7afc82133 Fix compiler warnings in OsdClVertexBuffer 2014-05-16 14:52:43 -07:00
manuelk
b74f45f68d Decrease compiler warning thresholds and fix outstanding warnings (continued)
- turn off some of icc's remarks (mostly because of tbb)
- fix many of icc -w3 remarks (more to fix once i can work around icc 14.0 linker barfing)
2014-05-15 18:03:44 -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
Sergey Sharybin
f410190cde Fix some meory leaks in adaptive evaluator
- It used to create _computeContext twice.
- Ownership of refiner didn't set properly, because
  Initialize() forces evaluator to drop ownership.
  So now ownership sets after initialization from
  topology.
2014-05-11 13:37:03 +02:00
gelder
b85324dbf9 Merge pull request #299 from Nazg-Gul/dev
Implement C-API accessor to evaluator topology
2014-05-11 00:23:45 -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
Manuel Kraemer
ec89f76038 EvalStencil Context & Controller code cleanup
- fix some variable names (private vs. public)
    - implement constructors to guarantee initialized pointers (d'oh)
    - add a 'Reset' method to unbind buffers

Note: while the new contexts have been cleaned up, we now have a fair amount of duplicated code in the controllers...
2014-05-10 16:38:13 -07:00
Manuel Kraemer
e9b4006a56 Reorganize EvalStencilContext and EvalStencilController
Moved transient states (current vertex buffer etc) to controller.
ComputeContext becomes constant so that it's well suited for coarse-grain
parallelism on cpu.
2014-05-10 14:49:15 -07:00
Sergey Sharybin
c70daced19 Code cleanup: no need to use struct keyword in C++ code
It's only required for anonymous structures in C.

Also made a bit of whitespace cleanup.
2014-05-10 21:55:38 +02:00
Sergey Sharybin
c1dbc50527 Add getter of topology object to evaluator C-API
Useful for cases when some parts of the pipeline needs to know the
topology object. Simply helps saving memory so topology from the
evaluatgor can be re-used for stuff like HbrMesh creation.
2014-05-10 21:53:39 +02:00
Sergey Sharybin
8b627c1c73 Implement C-API accessor to evaluator topology
This way external application might check whether it need to
re-create evaluator from scratch or it might re-use existing
one without storing extra data from it's side.

TODO: Tags are still not accessible via C-API, it's marked as
to be solved later when it becomes more clear what is the best
way to expose them and when there'll be a real application to
test the tags.
2014-05-10 21:45:05 +02:00
Takahito Tejima
727077a8e0 Fix mistakenly deleted memory barrier in glsl compute kernel. 2014-05-09 21:16:04 -07:00
manuelk
9424784fe5 Change EvalLimit Gregory patch kernels to the large weights table to accomodate higher valences.
This change matches this CPU kernel more closely to our GPU patch shaders.

fixes #298
2014-05-09 17:26:03 -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
gelder
2e02892216 Remove debugging std::cout calls as these classes get used in Presto. 2014-05-06 09:25:55 -07:00
Takahito Tejima
a57dd034e7 Reorganize ComputeContext and ComputeController.
Moved transient states (current vertex buffer etc) to controller.
ComputeContext becomes constant so that it's well suited for coarse-grain
parallelism on cpu. The prims sharing same topology (ComputeContext) can
be refined simultaneously by having mutiple compute controllers.
Client facing API doesn't change.
2014-05-06 08:53:36 -07:00
David G. Yu
02da793be4 Fixed calculation of screen space LOD tess factors for transition corner patches.
fixes #296
2014-05-02 15:59:30 -07:00
Takahito Tejima
d937580b02 temporary workaround for the synchronization bug of glsl compute kernel.
closes #295
2014-05-02 15:46:03 -07:00
manuelk
bba6cda858 Fix incorrect FarMeshFactory logic for isolating multiple corner vertices in corner patches.
- the previous fix omitted to use the corner count which might have caused trouble with certain topologies

fixes #294
2014-04-30 19:02:28 -07:00
manuelk
ac04e124be Fix file permissions on farPatchTablesFactory.h 2014-04-30 16:10:32 -07:00
manuelk
42cd37e060 Fix adaptive isolation of sharp corner vertices
- fix the vertesIsBSpline logic to correctly recognize these sharp corner vertices
- fix another bug where a loop was missing vertices from from quad faces with 2
  non-consecutive boundaries

fixes #294
2014-04-30 14:37:21 -07:00
manuelk
69755c6f22 Fix OsdUtilAdaptiveEvaluator concurrency issue
- add a limit evaluation method to EvalLimitController that allows
  client code to directly pass the output buffer without binding it
  to the Context (the call only computes vertex interpolation of a
  single sample)

- switch the OsdUtilAdaptiveEvaluator to use the new method from the controller
  and stop stomping member

- cleanup buffer and member variables no longer used

- cleanup initialization logic to be better aware of uniform / adaptive

- add some assert sanity checks in the cpuEvalLimitKernels

fixes #293
2014-04-29 18:27:04 -07:00
manuelk
6b6fa11447 Fix OsdUtilRefiner incorrect "Invalid size of patch array" error reporting.
The size of the patch array can only be checked in uniform mode. An argument can be
made that this should be an assert...

fixes #292
2014-04-29 10:21:38 -07:00
Nathan Litke
180c1804cc Fixes a bug introduced in 808aabf that causes OsdUtilPatchPartitioner to fail to rebuild the face-varying data table correctly for triangle patches. 2014-04-22 18:52:11 -07:00
manuelk
068035c26a Fix Windows build warning in FarPatchTablesFactory 2014-04-22 14:45:43 -07:00
Manuel Kraemer
808aabfbc5 Merge pull request #284 from nathan-at-digitalfish/add_far_triangulate
Generate triangle patches for a uniformly subdivided mesh
2014-04-22 11:42:56 -07:00
Nathan Litke
d5deab632c Changes to address comments in #284.
* rolled getNumFVarVertices into allocateTables
* renamed tessellate to triangulateQuads (technically speaking, Loop scheme uses a trivial triangulation)
* condensed the pointer arithmetic used for triangulating the data tables
2014-04-21 17:59:46 -07:00
Manuel Kraemer
d4b85556b8 Merge pull request #280 from Nazg-Gul/dev
Return success status from openSubdiv_finishEvaluatorDescr()
2014-04-21 17:14:31 -07:00
gelder
96baf03c68 Add missing third parameter to templated OsdDrawContext usage, caught in Presto build. 2014-04-21 16:14:35 -07:00
Manuel Kraemer
2dbf93f90c Merge pull request #285 from nathan-at-digitalfish/add_osd_mesh_ctor
Add a public constructor to OsdMesh
2014-04-21 14:34:12 -07:00
manuelk
4747dd84e7 Release 2.4.1 2014-04-21 12:28:17 -07:00
manuelk
b643c28b99 Update release notes for release 2.4.1 2014-04-21 12:18:16 -07:00
gelder
2545306e21 Add correct OpenSubdiv namespace begin/end blocks. 2014-04-21 10:25:38 -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
5195d93947 Added an option to FarMeshFactory to generate triangle patches instead of quadrilateral patches for a uniformly subdivided mesh. This option is applicable to GL-ES, which does not support quadrilateral primitives. 2014-04-18 16:19:13 -07:00
gelder
feb74f51f0 Compile osdutil with -fPIC for correct linking in Presto. 2014-04-18 16:19:09 -07:00
Takahito Tejima
ea2421843b Merge pull request #282 from nathan-at-digitalfish/issue281
Draw contexts do not fully initialize patch arrays #281
2014-04-18 14:24:29 -07:00
Takahito Tejima
5c5c7e2ab1 Fix a bug of OsdUtilMeshBatch, the varying buffer isn't computed with CL kernel. 2014-04-18 14:01:19 -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
Sergey Sharybin
43bb3b64f6 Return success status from openSubdiv_finishEvaluatorDescr()
Before this change the given function used to fail silently in
cases topology is bad or uniform evaluator initialization failed.
This used to leave evaluator in a state which is not usable for
further processing but callee function would never know this and
will likely crash later when evaluating subdivision limit surface.

Ideally error message or code need to be passed to the calle, but
that's marked as TODO for now.
2014-04-18 00:55:43 +06:00
manuelk
3405e952ba Release 2.4.0 2014-04-16 11:38:47 -07:00
manuelk
88c2448db0 Update release notes for release 2.4.0 2014-04-16 11:29:10 -07:00
manuelk
50980cea5a Fix access rights to d3d11ComputeController.h 2014-04-16 10:27:48 -07:00
Sergey Sharybin
0d349c57ed Remove debug print from adaptive evaluator's initialization
That's not good at all if an application which uses OpenSubdiv
library will suddenly have more console output coming from the
OpenSubdiv library.
2014-04-16 16:41:47 +06:00
Sergey Sharybin
337817dc19 Fix wrong logic in openSubdiv_setEvaluatorCoarsePositions
Issue was that evaluator.SetCoarsePositions() is expecting number
of floats in the array to be passed, but the C-API function used
to pass number of vertices there.
2014-04-16 15:26:13 +06:00
takahito-tejima
7363049472 Fixing a crash on Marvericks w/glew 2014-04-11 21:54:35 -07:00
manuelk
7bdbf0c8a2 One more fix for the Linux cmake build
fixes #258
2014-04-11 18:33:11 -07:00
Takahito Tejima
f65c746294 Use DSA APIs for GL buffer update (if available).
Fix some inappropriate usage hints.
2014-04-11 18:03:36 -07:00
Manuel Kraemer
8af3e25ac7 Merge pull request #273 from nathan-at-digitalfish/issue272
OsdUtilPatchPartitioner does not support face-varying data #272

This is looking great: thanks a lot Nathan !
2014-04-10 17:23:56 -07:00
nathan-at-digitalfish
1b784ef7b3 OsdUtilPatchPartitioner does not support face-varying data #272
* instantiates FarPatchTables with face-varying data for a single uniform subdivision level, or for an adaptively subdivided mesh
* face-varying data is not regenerated if data for multiple uniform subdivision levels is present
2014-04-09 16:30:40 -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
mkraemer
e011fa34af Fix typo (and Doxygen warning) 2014-04-09 15:20:01 -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
gelder
1bb469995f Improve error reporting in osdutil refinement classes, and fix a build issue
in the python wrapping code.
2014-03-28 12:28:59 -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
d2fc86ba5e Move table splicing functions of FarMultiMeshFactory into factories,
in preparation for relocating MultiMesh to OsdUtil.
2014-03-20 14:52:42 -07:00
Takahito Tejima
76818e630b Refactor FarSubdivisionTables.
Delete scheme specialized subdivision tables. The base class FarSubdivisionTables
already has all tables, so we just need scheme enum to identify which scheme
the subdivision tables belong to.
This brings a lot of code cleanups around far factory classes.
2014-03-19 17:19:08 -07:00
takahito-tejima
e5c54cc9eb fix typo in gcdComputeController 2014-03-19 11:51:54 -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
Takahito Tejima
40dbbfd294 Fix another multi mesh splicing bug of face varying data.
Change FarPatchTables::Descriptor::begin() to take starting patch type so that we can use a desc iterator for uniform quads/tris as well.
2014-03-19 09:10:49 -07:00
manuelk
3fe1d97342 Fix build warning in FarMultiMeshFactory 2014-03-17 14:59:28 -07:00
manuelk
bea9d59a97 Release 2.3.5 2014-03-17 11:45:09 -07:00
manuelk
a9f321482a Update release notes for release 2.3.5 2014-03-17 11:41:58 -07:00
manuelk
90a21ca74b Fix doxygen parameter documentation for OsdCPUSmoothNormalContext 2014-03-17 11:39:45 -07:00
Takahito Tejima
cf6e9bc6de Fix a splicing bug in FarMultiMeshFactory.
* the number of split vertices has to be taken into account when splicing vertex valence table.
* followed patch descriptor iterator api changes.
2014-03-17 11:20:02 -07:00
manuelk
5d3ca52e1a Minor code cleanup in FarPatchTablesFactory
- remove crufty #defines
- directly allocate & populate quadOffsets table
2014-03-11 18:37:25 -07:00
manuelk
d0c3ed9f38 Refactoring FarPatchTables and FarPatchTablesFactory
minor code cleanups:
- change Descriptor::iterator to use a static vector instead of overly complicated logic
- change the private factory PatchType struct for better readability
- variable name changes
2014-02-24 17:12:39 -08:00
David G. Yu
ead34f1662 Added 'static' specifiers for non-kernel CL funcs at program scope. 2014-02-23 21:25:47 -08:00
David G Yu
ff4fe169bb Removed address space qualifiers from OpenCL kernel functions
These aren't needed and will raise errors on some implementations.
2014-02-22 22:35:36 +00:00
manuelk
9fda7b73f7 Minor code cleanup of FarMeshFactory 2014-02-13 11:46:31 -08:00
manuelk
f1518a5f59 Fix Gregory Boundary patch buffer overrun
Prevent boundaryEdgeNeighbors[2] from being overrun when an interior
vertex has more than 2 boundary neighbor vertices. The fix is applied
to the GLSL / HLSL and CPU implementations.

Note: this appears to fix long-standing problems with Gregory patches,
but i am not entirely convinced that this fixes the general case.

fixes #259
2014-02-13 11:30:33 -08:00
manuelk
fea9288a1f Replacing un-necessary dynamic_cast with reinterpret_cast within FarDispatcher
First step in removing RTTI from Far and Hbr - further fixes require modifications of Hbr
and will tackled in another fix.

fixes #257
2014-02-03 14:29:53 -08:00
Takahito Tejima
75c02c6043 Fixes black texels when the resolution of a ptex face is less than 4.
Closes #253
2014-02-03 12:03:17 -08:00
manuelk
ec98c7fe03 Move VBO buffer allocation out of allocate() and into BindVBO()
fixes #256
2014-01-30 17:29:14 -08:00
manuelk
704a6129cb Fix build warnings (optimized) 2014-01-22 14:26:42 -08:00
manuelk
be9d23fedd Release 2.3.4 2014-01-13 10:57:21 -08:00
manuelk
14908b737c Update release notes for release 2.3.4 2014-01-13 10:52:17 -08:00
manuelk
89e18fb179 Adding OpenMP SmoothNormal Context & Controller 2014-01-10 15:31:48 -08:00
manuelk
dabaac8187 Adding a TBB SmoothNormal Context & Controller
Also:
    - Add a _numVertices member to cpuSmoothNormalContext (for memory reset function)
    - Fix memory reset function in cpuSmoothNormalContext (was performing redundant memsets)
    - Add a resetMemory boolean to cpuSmoothNormalContext to make reset step optional (default is off)
2014-01-10 14:56:59 -08:00
manuelk
6465d3594c Adding a Context / Controller pair for CPU evaluation of smooth normals 2014-01-09 17:36:35 -08:00
manuelk
8918173fda Improve stringification of shaders & kernels in build.
- added a _stringify function to top CMakeLists
- switched all stringification tasks to use the macro
- all suffixes are now .gen.h instead of .inc (to help cmake track dependencies)
2014-01-03 16:59:26 -08:00
manuelk
5c4e8286e5 Fix build warning from osdutil/adaptiveEvaluator.cpp 2014-01-03 15:43:16 -08:00
jcowles
eb09b9e14c Use obj targets for faster CPU/GPU lib builds
Further leverage cmake object libraries to share object files for CPU
and GPU OSD libraries, avoiding duplicate complation for dynamic/static
build passes.

CMake restricts object library inputs to header and source files, so the
.inc files were renamed to .gen.h (which seems like a better name
anyway) to make CMake happy.

Also updated the .gitignore file to ignore .gen.h files.

Conflicts:
	opensubdiv/osd/CMakeLists.txt
2014-01-03 14:52:35 -08:00
manuelk
00b0d95058 Remove CMake compiling redundancies
- set OBJECT targets for osd cpu & gpu libs, and use the obj target for
  static and dynamic linking

- add a new examples_common_obj OBJECT target
- replace direct source dependencies to obj target in all examples CMakeLists

This change makes it possible to not re-compile the same source files
multiple times when they are used in multiple targets. Thanks to jcowles
for uncovering the CMake functionality.

Note: it seems that multi-process build is working again (gmake -j <x>)
2014-01-03 13:39:48 -08:00
jcowles
e8a25c511a Make osd a cmake object library.
An object library allows other build targets to use the object files
from this library.

The change introduces osd_static_cpu_obj which is consumed by
osd_static_cpu.

This will be useful for emscripten integration where we cant use the
compiled library, rather it will use the object files, targeting
osd_static_cpu_obj.
2014-01-03 11:02:51 -08:00
Dirk Van Gelder
1329ea34de Update license headers to apache. 2014-01-01 21:08:53 -08:00
Dirk Van Gelder
01fa0eac63 Add C compatible API to access the adaptiveEvaluator class from non-C++.
This is the case with blender.
2014-01-01 21:02:56 -08:00
Dirk Van Gelder
7f22c49cd3 Install was incorrectly set to bindir. Changed to libdir. 2014-01-01 10:31:11 -08:00
David G. Yu
570ebf7156 Fixed VS2010 warnings/errors. 2013-12-31 23:50:55 -08:00
David G. Yu
fdc3d11852 Added 'f' suffix to float constants in stencil factory data tables. 2013-12-31 23:43:37 -08:00
Dirk Van Gelder
7e0f6955c7 Added adaptiveEvaluator class inspired by Sergey's work in blender.
Do feature adaptive refinement, then use the cpuEvalLimit API to evaluate
grids of points on faces.

Test harness is tessellateObjFile which has a -blender option to trigger
the gridding tessellation code.
2013-12-31 22:35:52 -08:00
Dirk Van Gelder
8b65c1b2f4 Updates for blender development. Add convenience function
for adding faces and specify that osdutil is an installed
library.
2013-12-23 08:59:13 -08:00
manuelk
1a8b41287e Fix OsdCpuEvalLimitKernel
Correct some vertex buffer descriptor mixups between length & stride

fixes #248
2013-12-20 15:40:52 -08:00
manuelk
d41cb5cd1f Fix maxvalence calculation in FarMeshFactory
The lowest max valence should always be 4: even a triangle
generates 4 quads.

fixes #249
2013-12-20 15:24:14 -08:00
manuelk
69ebcb8cc3 Fix FarStencilTablesFactory: replace limit tangents table
The new table accomodates verts with valence up to 20.

Dr. DeRose provided me with a python script to generate the tables, but wants to
investigate a closed-form alternative to pre-computed tables.

Also: our logic is incorrect - it is missing adjacent face-points in the
interpolation (apparently this has been incorrect since day 1). Further fixes
coming next year...

fixes #246
2013-12-20 11:01:58 -08:00
David G Yu
8990d5712f Fixed iOS build 2013-12-15 23:39:32 -08:00
manuelk
bb13047db2 Fix FarStencilFactory control stencil caching
The logic that invalidates the vertices in the control stencil and
the cached bspline patch weights was not triggering correctly.
Hopefully this new bit of logic should clear up some of the incorrect results.

fixes #246
2013-12-13 16:23:19 -08:00
manuelk
a4f3627ec2 Removing asset for high-valence vertices running off limit tangent pre-computed table.
Note: the stencils generated will be incorrect for extraordinary crease vertices with valence > 11.

fixes #246
2013-12-11 13:30:36 -08:00
manuelk
96b63884f0 Fix degenerate stencil limit tangent code path.
Limit tangent stencil crease rule was accumulating the wrong vertices. This
change switches from using an Hbr operator to using a less efficient std::list,
but allows us to rotate around the vertex from an arbitrary starting incident
edge.

The values returned are "plausible", but more extensive testing would be required
to validate this new code.

fixes #246
2013-12-10 14:13:30 -08:00
Manuel Kraemer
a565526977 Fix unused variable build warnings (gcc 4.8.2 - Fedora 19) 2013-12-08 13:47:14 -08:00
manuelk
8a335c3858 Release 2.3.3 2013-12-05 11:28:42 -08:00
manuelk
14f5d60af9 Update release notes for release 2.3.3 2013-12-05 11:12:38 -08:00
Takahito Tejima
f7f2ca2581 Move uniform block definitions out of osd common shader into client shader.
Important notice: all client shader code must have following functions and compose them to osd intrinsic shaders (vertex/tessEval/tessControl)

mat4 OsdModelViewMatrix()
mat4 OsdProjectionMatrix()
mat4 OsdModelViewProjectionMatrix()
float OsdTessLevel()
int OsdGreogryQuadOffsetBase()
int OsdPrimitiveIdBase()

We probably should write a utility class for basic binding of them, to make client code simpler.
2013-12-03 15:59:38 -08:00
manuelk
469a196fee Fix FarStencilTablesFactory to correctly check for tangent output pointers
And not perform interpolation if output pointers for tangents weren't passed to the
factory

fixes #243
2013-12-03 10:53:05 -08:00
manuelk
d9562164f7 Fix stencil tangents incorrect magnitude scale
The tangents were only scaled in the "bail-out" code branch that
pushes vertices to the limit and performs bi-linear interpolation.

Now we are also scaling the bi-cubic patch interpolation code branch.

There may be another code path left to fix (as well as some pointers
being currently unchecked)

fixes #243
2013-12-02 19:07:09 -08:00
manuelk
8484d1e318 Adding stdlib.h include to fix OSX build. 2013-11-22 15:23:40 -08:00
manuelk
000cb400ca Revisit singular vertex fix for FarSubdivisionTables
The previous fix pointed far indexing tables to the origin vertex
of duped singular verts.

This fix goes one step further and actually shifts all vertex indexing
to start at the end of the coarse mesh vertices, using the space for
data that was previously occupied by duplicated singular verts.

The consequence is that client code no longer needs to duplicate vertex
data in vertex buffers (huzzah !).

- fix FarSubdivisionTablesFactory to shift factory vertex table offsets using Hbr's
  singular verts map
- fix schema table factories (Catmark, Loop...) to correctly use these offsets
- remove vertex data duplication code from osdPolySmooth example
- remove some (unrelated) cruft from glViewer example
- shape_utils unfortunately still needs to dubplicate the singular verts to
  allow the coarse edge drawing in our example viewers to work correctly
  (although it could be fixed to avoid data duplication too...)

fixes #241
2013-11-22 11:27:01 -08:00
manuelk
c3cb17fa99 Modify Far remapping of singular vertices to point to their source vertex.
- Add a vector of index pairs to HbrMesh to track the index of a split
  vertex and its origin vertex
- Correct the Far remap tables in FarSubdivisionTablesFactory to point split
  vertices to their origin instead of themselves
- Fix regression/common/shape_utils.h to use the new HbrMesh::GetSplitVertices()
  method.
- Fix the osdPolySmooth example to use the new HbrMesh::GetSplitVertices()
  method.
- Add a paragraph to the documentation

fixes #241
2013-11-21 16:05:31 -08:00
David G. Yu
d881ea6046 Fixed VS2010 build warning 2013-11-20 18:03:28 -08:00
manuelk
791995cf32 Refactoring Ptex Mipmap and Analytic Displacement code
Moving Takahito's implementation into the core API:
- added <gl/d3d11>PtexCommon.<glsl/hlsl> shader code
- added control to enable Ptex common trunk in <gl/d3d11>DrawRegistryBase classes
- fixed GL & D3D11 ptexViewer examples to use the new API
2013-11-20 15:47:59 -08:00
Dirk Van Gelder
8bc953fd3f Better tag support, removed debug print statements, added support for writing
refined .obj files, currently a bug there though.
2013-11-19 22:03:55 -08:00
manuelk
ab0cd0f8a2 Fix crashes induced by typeid
- implement virtual accessors in FarSubdivision tables that return a Scheme enum
- implement a safe typeid comparison in FarMeshFactory to get the same information
  from Hbr subdivision classes

fixes #240
2013-11-19 16:19:27 -08:00
manuelk
86b27e1ade Small code refactoring in FarPatchTablesFactory
- move private mthods computePatchParam() and computeFVarData() as private members of the FarPatchTablesFactory
- minor code cleanups
2013-11-15 17:42:57 -08:00
manuelk
cb93045236 Release 2.3.2 2013-11-15 15:15:51 -08:00
manuelk
beecafbd35 Update release notes for release 2.3.2 2013-11-15 15:12:34 -08:00
manuelk
691253a0e7 Fix OSX build: stdlib.h needs to be included in glPtexMipmapTexture.h for size_t typedef 2013-11-11 13:18:43 -08:00
David G Yu
795be229dc Fixed compiler warnings. 2013-11-10 00:36:01 +00:00
Takahito Tejima
81099f32ad Returns the common shader config for all non-tess patcharrays. 2013-11-08 10:46:41 -08:00
Dirk Van Gelder
291040584f Read/write .obj files in uniformEvaluator testing. 2013-11-07 23:20:37 -08:00
manuelk
2dc8520938 Fix Chaikin rule
The Chaikin crease interpolation mode seems to be broken:
	   - Catmark / Loop / Bilinear are passing the wrong halfedge vertex to the
	     SubdivideCreaseWeight function which results in sub-edge crease weights
	     being swapped
	   - the loop that iterates over adjacent edges needs to check against both
	     the original edge and its opposite, otherwise it may be incorrectly
	     accumulated into summation of these adjacent edges (with a 0.25 weight)

	   The proposed fix:
	   - Swaps the Dest/Org vertex passed to the SubdivideCreaseWeight (and
	     we probably want Julian to confirm that this the correct fix)
	   - Checks against both the original edge and its opposite in the iteration
	     over adjacent edges
	   - Replaces the std::vector based query with an HbrHalfedgeOperator for
	     better performance (hopefully)

	   The similar fix to OpenSubdiv been reviewed by Tony DeRose.

    Also in the fix:
        - fix "obj" tag parsing of the smooth triangle tag that was incorrectly
          associated with the crease method (and reporting the wrong errors)
        - add regression shapes for both Loop & Catmark schemes to hbr_regression
        - add same shapes to the glViewer
        - improve hbr_regression output to be more readable
        - add command-line argument parsing to hbr_regression
        - add functionality to dump an obj file when regression fails for comparison

fixes #235
2013-11-07 17:06:55 -08:00
David G. Yu
8fd412ed4d Fixed VS2010 build errors. 2013-11-06 14:35:10 -08:00
gelder
def6542192 Fixed problem with refinement level being hardwired to 1, fixed error messages,
other improvements.
2013-11-06 14:00:29 -08:00
David G. Yu
9ad6b117c7 Fixed VS2010 build errors. 2013-11-06 13:52:43 -08:00
manuelk
40b564e1f9 Fix the build: add missing #include in osdUtil & projectTest 2013-11-06 11:06:58 -08:00
manuelk
fe0d2bdec5 Fix return value of allocate function for OsdCPUGLVertxBuffer 2013-11-06 10:46:36 -08:00
Dirk Van Gelder
6cd7b8caf7 Copied .obj reading and writing code from shape_utils.h, use that
in projectTest.
2013-11-06 00:13:04 -08:00
Dirk Van Gelder
81b4aec1f5 Fixed build for uniformEvaluator if omp not found, add a public domain teapot test .obj file. 2013-11-05 23:29:53 -08:00
gelder
ecd726742f Added evaluator, first .obj file reading and subdividing. 2013-11-05 21:50:11 -08:00
gelder
7dbf3d4198 Updates to simple cpu wrapper classes being written for Presto deformers. 2013-11-05 20:23:37 -08:00
gelder
3dda914e34 Updates to simple cpu osdutil classes, split topology into a separate file, added first support for stencil evaluation.
Getting there, this code is being tested with Presto deformers and is working well.  Valgrind reports no memory errors with the simple projectTest test harness.
2013-11-05 20:13:20 -08:00
manuelk
2a825b9d1c Removing some glGetError checks that are causing problems for Autodesk. 2013-11-05 18:17:02 -08:00
David G. Yu
20a3b0f5bb Fixed WIN32 build error when no DXSDK installed. 2013-11-04 15:19:14 -08:00
Dirk Van Gelder
0925fe5a4b Fix for crash in new mesh/refiner code in OsdUtil. Need to
set HBR_ADAPTIVE before including hbr code.  Also use an ifndef in
far/meshFactory.h so that code can be included where someone else has
already defined HBR_ADAPTIVE.
2013-11-01 22:17:11 -07:00
manuelk
d81cbe2c33 Release 2.3.1 2013-10-30 12:44:43 -07:00
manuelk
b87b0f1c33 Bump dev version number 2013-10-30 12:13:17 -07:00
manuelk
14355da767 Fix VS2010 build errors in FarStencilTablesFactory
We shouldn't have to declare these classes as friends, MS compiler's the
only one issuing errors, and they are very likely incorrect.
2013-10-30 11:56:54 -07:00
manuelk
c8d490e292 Fix some warnings that are failing VC++ builds 2013-10-28 15:48:51 -07:00
manuelk
9e9fd5c021 Fix Far to handle disconnected vertices in an Hbr mesh.
Also:
    - change our shape parser to skip non-manifold faces (print a warning)
    - add a 'fan' non-manifold test shape to the glViewer

fixes #233
2013-10-28 10:40:24 -07:00
Dirk Van Gelder
25d7333a37 Added license headers. 2013-10-27 23:11:39 -07:00
Dirk Van Gelder
38399a382c This change adds simple HbrMesh and FarMesh wrapper classes to osdutil
and a projectTest example binary to test.  Currently projectTest crashes,
Manuel has been looking into the crash- thanks!
2013-10-25 23:24:23 -07:00
manuelk
404ec9649d Fix edge-only face-varying interpolation.
For face-varying interpolation, sharpness should be interpreted as an
infintely sharp boundary. Hbr implements this correctly for vertex
sharpness, but inconsistently for edge sharpness: both the fvarbits
cache and methods that gather face-varying sharpness need to be corrected.

fixes #231
2013-10-22 09:43:50 -07:00
Takahito Tejima
dd8cc1a3b7 improve ptex guttering. 2013-10-15 17:47:58 -07:00
Takahito Tejima
72eb4750a9 Ptex loader : Add memory usage limiting. Clean code styles. 2013-10-07 19:05:19 -07:00
Takahito Tejima
f26c457bac Add fractional partitioning, normal derivatives computation into hlsl shaders. 2013-10-07 19:02:41 -07:00
Manuel Kraemer
2b8b0205ba Fix a minor osdutil build warning (seen with gcc 4.8.1) 2013-10-06 14:42:16 -07:00
Takahito Tejima
ff65a3efb8 Add a DX11 version of ptex mipmap loader 2013-10-04 18:27:06 -07:00
Takahito Tejima
d8defd42d3 Fix patch parambuffer generation in OsdD3D11DrawContext. Also fixes hlsl shader bug. 2013-10-04 18:26:22 -07:00
Takahito Tejima
28356dae40 Optimize a bit of ptex mipmap lookup. 2013-10-04 18:23:20 -07:00
manuelk
8c12f84a72 Fix build symbol conflict in Far
Override the destructors of the Hbr rotation operators to force the compiler to
inline them (they are no-op's)

fixes #229
2013-10-04 17:06:23 -07:00
David G Yu
e977614461 Adjusted include order for clKernelBundle.cpp
Avoids GL declaration conflicts w/ OpenCL on OS X
2013-09-28 10:39:24 -07:00
manuelk
a5b40969ec Release 2.3.0 2013-09-27 13:30:49 -07:00
manuelk
c637a1f912 Update release notes 2013-09-27 13:27:08 -07:00
manuelk
3ae50d1c50 Amending Apache license language & file headers.
New text:

     Copyright 2013 Pixar

     Licensed under the Apache License, Version 2.0 (the "Apache License")
     with the following modification; you may not use this file except in
     compliance with the Apache License and the following modification to it:
     Section 6. Trademarks. is deleted and replaced with:

     6. Trademarks. This License does not grant permission to use the trade
        names, trademarks, service marks, or product names of the Licensor
        and its affiliates, except as required to comply with Section 4(c) of
        the License and to reproduce the content of the NOTICE file.

     You may obtain a copy of the Apache License at

         http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the Apache License with the above modification is
     distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied. See the Apache License for the specific
     language governing permissions and limitations under the Apache License.
2013-09-26 12:04:57 -07:00
Takahito Tejima
d44724c5b7 Fix a bug of bad fvar splicing for loop surface. 2013-09-23 14:18:43 -07:00
Takahito Tejima
c018aa1fc6 fix the file permission on osd/ptexMipmapTextureLoader.cpp 2013-09-23 13:22:09 -07:00
Takahito Tejima
52a0224d05 Add face varying macros for loop subdivision 2013-09-23 12:52:27 -07:00
Takahito Tejima
173dc4d33b Add an error check on updating cuda buffer. 2013-09-23 09:06:22 -07:00
Takahito Tejima
c2e0d06f56 Second derivatives computation, fix tangent/bitangent length 2013-09-20 18:23:28 -07:00
Takahito Tejima
d4579a8f85 Add a new ptex mipmap loader. very slow... 2013-09-20 18:22:09 -07:00
manuelk
924d994fdd Fix CMake executable macro
- Added a macro for non-cuda / non-glfw executables to add proper dependencies for ICC
- Switched various examples & regressions
2013-09-16 18:16:28 -07:00
Nathan Litke
cf34b6ead9 Fixed clKernelBundle.cpp to build on Android. 2013-09-16 13:37:25 -07:00
Manuel Kraemer
35a6a4afaf Remove some cast warnings that are triggered in gcc 4.7 (seen in Fedora 18)
fixes #223
2013-09-13 23:00:23 -07:00
Manuel Kraemer
cf61fbc08a Fix Doxygen comments 2013-09-13 09:28:20 -07:00
manuelk
a8a4b6d5cb Fix incorrect bilinear limit tangents in FarStencilTablesFactory
Compensate for the CCW edge rotation when iterating the half-edge cycle
of the face.

fixes #220
2013-09-12 11:57:46 -07:00
manuelk
44df7603bd Release 2.2.0 2013-09-11 18:41:41 -07:00
manuelk
7d4999c46e Adding support for subdivision stencils.
- Adding FarStencilTables and FarStencilTablesFactory classes
- Adding Osd EvalStencil context & controllers for CPU, OMP and TBB backends
- Adding the code example glStencilViewer
- Adding reST documentation
- Changing version to 2.2.0_dev
- Fix HbrMesh::Unrefine function
- Fix "CanEval" function in OsdVertexBufferDescriptor

Note 0: there is no stencil support for hierarchical edits

Note 1: there is no support for face-varying data stencils yet

Note 2: the current stencil factory is lazy but the caching system is not re-entrant
2013-09-11 16:05:14 -07:00