Commit Graph

1290 Commits

Author SHA1 Message Date
Takahito Tejima
3df04db2cd FarSubdivisionTables: fixed vertsOffsets and removed unused members.
a new function is added to avoid confusion.
-GetNumVertices() returns number of vertices
-GetNumVerticesTotal() returns total number of vertices includins number of lower levels.

#closes 156
2013-04-25 12:01:06 -07:00
manuelk
b815aff333 First pass at fixing the installation part of the Cmake build : now CMAKE_INSTALL_PREFIX can
be used as intended to specify an installation directory, which can be located anywhere on the
file system.

Also improved the doxygen target and made the doxy build "quiet".

fixes #154
2013-04-22 19:35:41 -07:00
manuelk
eadd1b3ce4 fixing some doxygen @param tags not matching variable names in the code
fixes #138
2013-04-22 18:26:53 -07:00
manuelk
d82ce253eb minor fix for a doxygen typo : its @param (singular, not plural)
fixes #138
2013-04-22 18:17:30 -07:00
manuelk
4bf24d9b95 First pass at our "Eval" API : this checkin is a mileston and is still missing
code paths for certain types of feature adaptive patches.

The check-in adds a new "limitEval" code example.

More to come soon...

fixes #45
2013-04-18 19:55:05 -07:00
manuelk
24356cc680 making MSVC++ happy...
fixes #153
2013-04-18 19:22:20 -07:00
manuelk
7e63b20c58 Small refactoring of the DrawContext code to remove duplication of vertex / patch counting code.
fixes #153
2013-04-18 17:54:12 -07:00
manuelk
4bab37310d minor clean up of the patch parametric bitfields API
note : this is not using traditional bit-fields as we cannot guarantee that the CPU-side
compiler will match the bit-packing of the compilers used on the GPU-side.
2013-04-11 14:26:03 -07:00
manuelk
9a6e84800b fix a comment in FarMeshFactory to reflect the changes in FarPtexCoord
fixes #143
2013-04-01 16:45:15 -07:00
David G Yu
ecd5419718 Fixed type of depth var in computePtexCoordinate
Fixes #143
2013-03-25 10:55:03 -07:00
David G Yu
4a6ba2de64 Fixed function proto mismatch in d3d11DrawContext
Fixes #143
2013-03-25 10:54:40 -07:00
Manuel Kraemer
a5b7c0337e size_t requires #include <stdlib.h>
fixes #143
2013-03-25 07:32:17 -07:00
manuelk
e6e7c96a52 We need to leverage our per-patch ptex indexing scheme in the EvalLimit API.
- replace ptex indexing with the FarPtexCoord structure as a way to pass per-patch
  ptex data to the shaders.

  We are replacing a vector<int> arranged as :
  int[0] : ptex face index
  int[1] : (u,v) as 16 bits encoding the log2 coordinate of the top left corner

  Instead we are now using a struct arranged as :
  int[0] : ptex face index
  int[1] : is a bit-field containing u,v, rotation, depth and non-quad

  The u,v coordinates have been reduced to 10 bits instead of 16, which still
  gives us a lot of margin.

- Replace OsdVertexBufferDescriptor with something more adequate for general
  primvar representation (this name will probably eventually change...)

- Improve OsdPatchDescriptor
    - add a "loop" boolean (true if the patch is of loop type)
    - add a GetPatchSize() accessor

- OsdPatchArray :
    - remove some redundant elements (still more to do there)

- Fix all shader / examples / regressions & stuff to make this all work.

fixes #143
2013-03-22 18:20:50 -07:00
manuelk
86c805fd67 fixes #138 2013-03-20 14:07:22 -07:00
David G Yu
8849a9682b Fixed far public header file install rule 2013-03-19 16:40:04 -07:00
manuelk
b93ab652c6 - adding param descriptions for FarMeshFactory constructor
fixes #138
2013-03-18 15:45:59 -07:00
Manuel Kraemer
95f326eed1 add OpenCL include directories when Cmake detects CL for the OSD build 2013-03-16 18:41:49 -07:00
Manuel Kraemer
5c9ae5537c fix build error : size_t requires stdlib.h 2013-03-16 18:40:53 -07:00
Takahito Tejima
f745aa2807 add paint test example 2013-03-15 12:39:44 -07:00
David G Yu
500bebefb4 Fixed VS2010 build warnings/errors 2013-03-08 12:07:09 -08:00
Takahito Tejima
291debd4a9 change access permissions on files 2013-03-08 08:57:42 -08:00
Takahito Tejima
fbc139d39c fix compile errors on gcd kernel 2013-03-07 22:43:47 -08:00
Takahito Tejima
8efecb0fca Batching stuffs: generalized kernel batches, table/dispatcher refactoring, multiMeshFactory, drawContext, etc.
2 client APIs are changed.
- VertexBuffer::UpdateData() takes start vertex offset
- ComputeController::Refine() takes FarKernelBatchVector

Also, ComputeContext no longer holds farmesh.
Client can free farmesh after OsdComputeContext is created.
(but still need FarKernelBatchVector to apply subdivision kernels)
2013-03-07 17:50:15 -08:00
Takahito Tejima
ced00bf107 fix crash bug when non-quad boundary face exists. 2013-03-07 14:56:14 -08:00
manuelk
d73d74f70b "const" the vertex index pointer in HbrMesh::NewFace (request from sbrew) 2013-03-06 14:31:15 -08:00
manuelk
ea1a87441f Add support for hierarchical hole edits.
- add tag parsing for h-hole in shape_utils
- re-create Renderman's test shape from the documentation (catmark_square_hedit.h)
- fix Hbr to correctly pass the hole tag from parent to child face
- fix FarSubdivisionTables to handle disconnected face-vertices without crashing

fixes #75
2013-03-01 18:27:19 -08:00
Andrew Wong
1c9cb04095 far: Fix compiler warnings 2013-02-25 22:36:30 -05:00
Andrew Wong
60d81afd02 ptexTextureLoader: Fix a few compiler warnings 2013-02-25 22:29:50 -05:00
manuelk
d21de79ac1 Merge branch 'master' of github.com:PixarAnimationStudios/OpenSubdiv 2013-02-20 14:16:57 -08:00
manuelk
25f79e7ff2 - change adaptive refinement in FarMeshFactory to not refine inside holes,
while retaining a necessary 1-ring on the inside of a hole edge

- add IsInsideHole() function to HbrHalfEdge

- add HasChild() function to HbrVertex and HbrHalfedge

- add a regression shape with adjacent holes and creases (tests dart, crease & boundaries)

Note : this does not address hierarchical edits inside holes or hole tags in hierarchical edits

fixes #78
2013-02-20 14:12:09 -08:00
David G Yu
452b30f72f OsdMesh no longer owns its ComputeController
Now a ComputeController is passed as an
argument to OsdMesh::Create(). This is
a better match to the underlying object
model and can be much more efficient for
compute controllers that have expensive
resources, e.g. compiled shader kernels.

Fixes #103
2013-02-19 17:33:32 -08:00
manuelk
a52c70ab8b First pass implementation of holes :
- make sure HBR passes down the hole tag to children when subdividing faces
- minor API modification : allow to unset the hole flag on a face
- modify uniform / adaptive FarMeshFactory to be aware of the flag
- make the FarSubdivisionTableFactory assert when finding unconnected HBR vertices (as it should)

* Uniform subdivision :
    The refinement scheme only creates faces & vertices necessary
    to maintain the one-ring around the edges of a hole, so this solution
    is quite efficient.

* Adaptive subdivision :
    At the moment we are still performing full topological analysis on holes and
    only skipping patches associated to holes. This is sub-optimal in 2 ways :
        1. the topological analysis can potentially be cranking on a lot of unnecessary
           geometry
        2. even though we may not be drawing the patches, the compute stage is still
           applying kernels on all the control vertices of these patches.
    We will have to revisit feature adaptive subdivision & holes, so keep the issue active.

fixes #78
2013-02-13 14:34:33 -08:00
Manuel Kraemer
5ad40fe535 Merge pull request #121 from andrewkww/vs2012_warnings
VS2012 warnings: more conversion warnings and a few others
2013-02-12 17:26:25 -08:00
Andrew Wong
d4c62d4aef osd: fix conversion warnings in glDrawContext
warning C4242: 'argument' : conversion from 'int' to 'unsigned char', possible loss of data
2013-02-09 23:35:02 -05:00
Andrew Wong
e04c95988c far: fix conversion warnings in Far*SubdivisionTablesFactory
warning C4242: 'argument' : conversion from 'int' to 'unsigned char', possible loss of data
2013-02-09 23:35:02 -05:00
Andrew Wong
329a9a7b40 hbr: fix a few more warnings 2013-02-09 23:35:01 -05:00
Andrew Wong
08ca7af0c9 hbr: fix warnings in the Hbr*Edit constructors
warning C4242: 'initializing' : conversion from 'int' to 'const unsigned char', possible loss of data
2013-02-09 23:34:59 -05:00
Andrew Wong
b25226134f fix warnings for having assignments inside conditionals
warning C4706: assignment within conditional expression
2013-02-09 23:34:58 -05:00
Andrew Wong
108ee96317 subdivisionTablesFactory: Fix typo in assert 2013-02-09 19:06:06 -05:00
Manuel Kraemer
6d4565e6b8 Merge pull request #109 from aras-p/glvbo-fixes
CpuGLVertexBuffer performance fix + glViewer fixes

reviewed, approved & much appreciated : thank you

takahito + manuelk
2013-02-06 18:27:48 -08:00
Takahito Tejima
4738916173 Fix ptex guttering on corner pixels.
Fixes #114
2013-02-05 18:06:19 -08:00
manuelk
6f5d1e34be partial solution to run-time environment configuration :
- add bool OsdGLDrawContext::SupportsAdaptiveTessellation() method
- modify glViewer to use that instead of #ifdefs

Note : this is not the final word on this as OSD really needs a more comprehensive
system to provide run-time information about available features to the client code.

fixes #111
2013-02-05 15:04:07 -08:00
Aras Pranckevicius
0d5b543c4a CpuGLVB: code review changes 2013-02-04 22:10:36 +02:00
Aras Pranckevicius
58cb40ec5c CpuGLVB: dirty flag to not keep on uploading if data did not change 2013-02-04 20:57:19 +02:00
Aras Pranckevicius
a4a8cd122d CpuGLVB: reading data back from the GPU each time model is changed is not very efficient.
Model the GL VB after D3D11 one, where there are no data read backs, however this means
an extra memory copy of the buffer. 4th level uniform subdiv on Car, glGetBufferSubData
was taking 50% of CPU time before (actual subdiv 22%), now that is gone. Full CPU Draw
62ms -> 54ms, looks like most of overhead now is just waiting on GL queries).
2013-02-04 07:55:42 +02:00
Aras Pranckevicius
a379ec2b9a gcd: cleanup 2013-02-03 10:15:31 +02:00
Aras Pranckevicius
8b59d99d20 gcd: cleanup CMakeLists 2013-02-03 10:12:29 +02:00
Aras Pranckevicius
e8ceaba176 gcd: convert face loop to work in 32 item size batches.
MBP6,2 (2 core 4 thread), catmark_car Lv4: 31.2ms CPU, 15.8ms GCD (was 22ms)
2013-02-03 10:05:58 +02:00
Aras Pranckevicius
c4b463668a gcd: convert most of loops to submit work in 32 item size batches.
MBP6,2 (2 core 4 thread), catmark_car Lv3: 6.9ms CPU, 5.2ms GCD; Lv4: 31.2ms CPU, 22.ms GCD
2013-02-03 09:38:33 +02:00
Aras Pranckevicius
b556e9d6cd gcd: naive implementation using dispatch_apply for all loops. Not faster, dispatch overhead too high 2013-02-02 23:22:04 +02:00
Aras Pranckevicius
54c7329ba4 gcd: files for GCD dispatcher (right now just copy of OMP one), add items to glViewer 2013-02-02 22:53:33 +02:00
Nathan Litke
68488d86b0 Fixed a buffer overrun error in OsdCLGLVertexBuffer::UpdateData. 2013-01-30 00:20:37 -08:00
Takahito Tejima
ab4f79c128 Remove deprecated GL calls, comply with 4.2/3.3 core profile. Use VAO, update glsl shaders, remove immediate draws, etc.
In example code, GLUT has been replaced with GLFW so that glViewer/ptexViewer can run on OSX (10.7 or later).

OSX note: still have some problem with clang, may need to explicitly specify gcc on cmake cmdline
 -DCMAKE_CXX_COMPILE=/usr/bin/g++

fixes #98
2013-01-29 15:54:18 -08:00
manuelk
d03a04d088 Fix OSD crash bug within CUDA & CL compute modules :
- remove the GL error check in cudaGLVertexBuffer :
  * unrelated GL errors left on the stack were triggering erroneous
  vertexBuffer allocation errors
  * we should not be checking for GL errors here anyway (as most other
  buffer allocations aren't checked either)

- add some pointer checking in the GL / D3D drawContexts in case the
  vertexBuffer pointers passed are NULL

- add some additional typedefs in OsdError to report some of the new
  CUDA / GL related errors
2013-01-25 18:31:40 -08:00
manuelk
9ed6ac7da8 - clean up all unused variables / constructors...
- add a -Wall flag, but leave it commented out for now until the same is done for other compilers

fixes #96
2013-01-22 14:47:46 -08:00
manuelk
54dff770d4 clean access permissions on files (rw-rw-r--) 2013-01-18 13:40:39 -08:00
Manuel Kraemer
ba7bf7b41c fix compiler warnings on class constructors 2013-01-18 13:30:31 -08:00
opensubdiv
96520b4845 Fixed a few VS2010 build warnings 2013-01-10 13:33:04 -08:00
manuelk
2baa3c82c1 removing some crusty tabs & other minor formatting 2013-01-10 11:14:41 -08:00
manuelk
f9dd284be0 Some notes :
- still need to change these changes with other compilers (MSVC / clang...)

- had to add a -Wno-invalid-offsetof for GCC (still need to test w/ other compilers) : apparently gcc 4.4 is somewhat incorrect in tagging our templated class as POD.

- had to change fvarData.h to initialize bitfields to 0 as gcc generates truncated int warnings when trying to initialize 31 bits to -1

- in mesh.h replaced original tbb::concurrent_vector with std::vector until a better solution can be found

Fixes #93
2013-01-10 10:47:50 -08:00
David G Yu
95c84b8f56 Adaptive tess using projected bounding sphere
This avoids adaptive tessellation artifacts near silhouette edges
by using the projected diameter of an edge's bounding sphere
rather than the length of the projected edge itself.

There is a nice writeup of this by Bryan Dudash of NVIDIA at:
https://developer.nvidia.com/content/dynamic-hardware-tessellation-basics
2013-01-04 19:15:24 -08:00
David G Yu
8440d83607 Fixed build to switch on features not platforms
Also, allow updated to allow the default install path
to be overriden for Android NDK builds.
2012-12-20 19:11:46 -08:00
David G Yu
1547b59570 Updated to support GLES 2.0 on iOS and Android 2012-12-20 10:25:41 -08:00
David G Yu
ce2f29d368 Upload only the coarse vertex data from CPU to GPU 2012-12-19 23:30:36 -08:00
manuelk
9ac6c3081e - fix broken ptex block allocation : iterates over all faces to find the longest edge
- code style fixes

fixes #89
2012-12-17 10:31:55 -08:00
manuelk
607b62337a Switching ptex coordinates structures to centroid based interpolation. This does not fix completely the problem though and we will have to revisit our guttering.
fixes #88
2012-12-17 10:26:14 -08:00
David G Yu
49a493a7bf Fixed a typo in the DirectCompute dispatch code. 2012-12-17 09:48:49 -08:00
David G Yu
77bdde36c6 Fixed a few build issues for OS X
Also, updated viewer_compat.cpp to more closely match viewer.cpp
2012-12-15 20:34:31 -08:00
David G Yu
6042649efa Added DirectCompute backend for Osd Compute 2012-12-13 10:22:30 -08:00
David G Yu
4f00990ae1 Fixed SRV format for level and valence buffers 2012-12-13 10:00:46 -08:00
manuelk
ab47ee53b3 adding some ASCII art to document cryptic CV names in Gregory shader code.
fixes #86
2012-12-11 14:26:06 -08:00
manuelk
419741442d defining M_PI to fix some compiler errors on OSX 10.8
fixes #44
2012-12-11 13:50:27 -08:00
manuelk
10c687ecd5 Release Candidate 1.0 :
- [Feature Adaptive GPU Rendering of Catmull-Clark Surfaces](http://research.microsoft.com/en-us/um/people/cloop/tog2012.pdf).

- New API architecture : we are planning to lock on to this new framework as the basis for backward compatibility, which we will enforce from Release 1.0 onward. Subsequent releases of OpenSubdiv should not break client code.

- DirectX 11 support

- and much more...
2012-12-10 17:15:13 -08:00
Jeremy Cowles
0f6efb6aec Make VertexKernelBatch public when building with clang.
There seems to be a bug in clang: despite the fact that FarMeshFactory is
declared to be a friend class from FarSubdivisionTables, clang protests that
VertexKernelBatch is not accessable.

This hack adds an #ifdef __clang__ block to make that structure public and keep
Far compiling under OSX.
2012-11-11 23:17:27 -08:00
Manuel Kraemer
7fd99b421f Taking a first stab at a doxygen config file and matching cmake rules.
Also reformatting a chunk of FAR's comments to work w/ doxygen.

Closes #75
2012-10-06 17:53:51 -07:00
manuelk
5f5207999f Refactoring far (cliff notes):
- All data representation classes are now single-templated for a vertex class 'U'

    - All constructors / instancing code has been moved into "Factory" functions that are dual-templated
      for two vertex classes <class T, class U=T>. This allows hbr specialization with a placeholder
      vertex flass 'T' for faster analysis without paying interpolation costs, while far can still specialize
      a fully implemented vertex class 'U' with full subdivision functionality.

    - Some preliminary clean-up work on FarVertexEditTables with the addition of a FarVertexEdit class
      as a replacement for the former HbrVertedEdit which was introducing back dependencies on hbr. The
      implementation is very lightweight. Some slight renaming / cleanup of the code, with some more to
      be done.

    - there are no more dependencies on hbr (not even #include) from far's data structure !

Notes :
    - the FarDispatcher mechanism has become somewhat awkward and should be re-evaluated when refactoring osd.

    - the "Factory" pattern survives this round of refactoring until we can find something better.

Closes #34
2012-09-17 18:41:48 -07:00
manuelk
9d37554969 Making CMakeLists more consistent 2012-09-12 15:01:32 -07:00
manuelk
60d92d7212 Making CMakeList more consistent 2012-09-12 15:00:04 -07:00
manuelk
56d4bbdd3c Fix sanity check for max value of level in FarMeshFactory::sumList()
Closes #73
2012-09-12 13:05:11 -07:00
manuelk
07b4c064d0 tiny comment fix 2012-09-11 15:12:16 -07:00
manuelk
bddf9a87e2 Fix FarVertexEditTables : include the correct hbr file and fix templating problems
Closes #62
2012-08-23 13:33:10 -07:00
Takahito Tejima
b4ff94d8af forgot to add new files. sorry! 2012-08-22 16:22:08 -07:00
Takahito Tejima
a157628b08 OsdMesh refactoring. Added OsdElementArrayBuffer and OsdPtexCoordinatesTextureBuffer, which manage GL resources on behalf of OsdMesh. 2012-08-22 13:57:36 -07:00
Julian Fong
2420738dad Merge branch 'master' of github.com:PixarAnimationStudios/OpenSubdiv 2012-08-20 13:35:05 -07:00
Julian Fong
0866814fb3 HbrFace::Unrefine() needs to work with new face allocation strategy. 2012-08-20 13:29:05 -07:00
Julian Fong
59edf56416 Change container get methods (HbrMesh::GetVertices, etc) to take
output iterators instead of std::vector - eases prman integration
for cases where std::list makes more sense.

Block allocate face children array in common case (<= 4 children).

Other, minor consistency edits.
2012-08-20 13:21:12 -07:00
Takahito Tejima
fad4a2b7ae Changed deprecated GLenum names 2012-08-20 09:38:45 -07:00
manuelk
3c16c2c18f Good catch - in practice this should be pretty hard to get into... but
better safe than sorry.

Closes #46
2012-08-10 15:24:04 -07:00
manuelk
e2217e182c From now on, hbr assumes that its clients will provide the defition of a
mutex class with Lock / Unlock public functions.

- remove Mutex implementation from Hbr (and revert to original PRman code)
- provide a Mutex class stub in osd
- add some forward declarations in OsdMesh to limit some of the mutex spills
- #include <osd/mutex.h> where needed (little hackish until we can refactor
some of far better)
- remove ILM_BASE from some CMakeLists

Closes #48
2012-08-10 15:14:02 -07:00
manuelk
bc959f6411 renaming verion to BETA_1_1 2012-08-10 12:03:58 -07:00
manuelk
004591ba70 Adding legal header to osd/vertex.h 2012-08-10 12:02:41 -07:00
Takahito Tejima
e3d939ee61 fix for win64 build 2012-08-03 20:15:24 -07:00
manuelk
a1552cfe82 Siggrpah 2012 - rolling over all of prepro work into beta 1.1 2012-08-03 19:51:27 -07:00
U-octave\dyu
f9a0531e6e Fixed clDispatcher::Map to return void (instead of void *> to avoid errors on VS2010. 2012-06-26 02:04:11 -07:00
manuelk
d9f46575cd Fix gl / glew includes and fix some related windows build issues
Closes #29.
2012-06-21 12:30:12 -07:00
gelder
fb97e723dd Merge branch 'master' of github.com:PixarAnimationStudios/OpenSubdiv 2012-06-20 18:52:54 -07:00
gelder
2c99708795 Missed in previous checkin. Make sure not to include glew.h in headers
where it can cause havoc downstream, and move vertexBuffers into the cpp
file to avoid gl.h inclusion and to fix dynamic cast issues.  These were
found during Presto integration.
2012-06-20 18:51:16 -07:00
manuelk
5c12beb8b0 Merge branch 'master' of github.com:PixarAnimationStudios/OpenSubdiv 2012-06-20 18:21:52 -07:00
manuelk
3920f9c39a Add a SHARED target for OSD and direct dependent example / regression code
to link against that version (except on Windows where we stay on STATIC mode
until all the kinks can be worked out)

Closes #27.
2012-06-20 18:20:41 -07:00
gelder
0e27dc6c20 Updates for correct complilation with glew found during Presto integration, and
change to vertexBuffer ot avoid dynamic cast issues in Presto.
2012-06-20 17:11:17 -07:00
manuelk
54c2345647 Adding GLSL compute kernels for bilinear scheme
Closes #19.
2012-06-19 18:57:43 -07:00
manuelk
eb26c65a88 first pass at an osd regression suite, following similar lines to the far regression.
- modify shape_utils to return a vector of coarse vertices when creating an hbr mesh

- minor cleanup of osd mesh and the addition of a vector parameter in the creator to
  save the remapping between the hbr mesh progenitor and the current serialized osd mesh.

- minor fallout modifications to the glutViewer & far regression code

Notes :

- the dual template of far is causing a lot of complications
  -> suggest finding a way to isolate the T template to the factory code.
  -> far needs a concept of a vector of vertex & varying data (to abstract the vertex buffer
     away from osd)
  -> the dispatched mechanism is awkward and needs refactoring
  -> suggest moving the default CPU kernels away from the subdivision tables
  -> suggest finding a way to completely untemplate the tables (we might need a templated
     factory function though)
  -> osd should be able to call delete on the far mesh to get rid of all the CPU-bound data
     once the GPU data has been laid-out.

Closes #18.
2012-06-19 17:15:07 -07:00
Manuel Kraemer
9afa90230d Add public & private header files to the source_group statements.
Closes #24
2012-06-19 12:34:26 -07:00
Manuel Kraemer
599e337387 Fix syntax (cast to int)
Closes #23.
2012-06-19 12:30:55 -07:00
manuelk
aa56fe341f Adding a virtual function that returns the number of tables needed to represent
a given subdivision scheme.

Closes #4.
2012-06-18 15:31:58 -07:00
Manuel Kraemer
c465e3316f Adding support for OpenCL kernels (tested & working on F16 - still needs testing on Win / RH / Apple) 2012-06-16 16:03:52 -07:00
manuelk
d57dbcceb9 Merge branch 'master' of github.com:PixarAnimationStudios/OpenSubdiv 2012-06-15 19:16:57 -07:00
manuelk
f651dea885 * Fixed a while loop that could crash when boundary interpolation
rules are set to "none" (both in Catmark & Loop)

* Amended shape_utils to always set a default boundary interp. rule
  even when no tag was read (ie. don't default to "none")

* Added a regression test for the "dart" shape to test both
  "edge only" and "edge corner" boundary interp. rules.

Closes #2.
2012-06-15 19:13:29 -07:00
Takahito Tejima
44fc3a3d9f Merge branch 'master' of https://github.com/PixarAnimationStudios/OpenSubdiv 2012-06-15 17:53:32 -07:00
Takahito Tejima
deea155b06 Add OpenCL kernel and dispatcher. not to be compiled yet. 2012-06-15 17:52:36 -07:00
manuelk
909eb0c8de adding -fPIC to CUDA compiler arguments
Closes #20.
2012-06-15 17:19:13 -07:00
manuelk
27be3cf5ec general code cleanup :
- comments added / modified
- replaced tabs w/ spaces
2012-06-15 14:09:14 -07:00
Takahito Tejima
91bb75f0ec Merge branch 'master' of https://github.com/PixarAnimationStudios/OpenSubdiv 2012-06-14 21:25:54 -07:00
Takahito Tejima
1981885f6d Changed to use kernel enum rather than strings. If clients need to add their own
kernel, call OsdKernelDispatcher::Factory::Register() and keep the integer
result value as kernel handle.

Attempted to elimiate registering function from client code, but currently
disabled (in kernelDispatcher.cpp) because of Maya plugin doesn't work with cuda
kernel.

glutViewer creates kernel menu dynamically according to linked kernels.

Fix a bug of maya plugin crashes.

Closes #14
2012-06-14 21:18:00 -07:00
manuelk
7a6fd95f6b Move Hbr behind the OpenSubdiv namespace
Fix all regressions / plugins.

Closes #3.
2012-06-14 18:47:57 -07:00
manuelk
320af0e553 Merge branch 'master' of github.com:PixarAnimationStudios/OpenSubdiv 2012-06-14 14:05:13 -07:00
manuelk
6206b2baad - making the FindGlew/Glut modules more Windows friendly (and fix some issues like static linking of GLEW)
- add status messages for missing dependencies and what features are being disabled.
- cleanup osd cmakefile

Closes #13.
2012-06-14 14:03:30 -07:00
Takahito Tejima
dd29d0d345 add vertexBuffer.h
Closes #11
2012-06-14 09:30:28 -07:00
Takahito Tejima
350d32494f Revert "add vertexBuffer.h"
This reverts commit 86d36ace44.
2012-06-14 09:29:31 -07:00
Takahito Tejima
86d36ace44 add vertexBuffer.h 2012-06-14 09:26:29 -07:00
manuelk
b3b857eec7 re-engineering the find_package strategy :
- use find_package(OpenMP) to test that the compiler supports OMP
  (looks like the "express" versions of MSVC do not)

- if not available, make sure that osd does not register those
  compute kernels (but does register the CPU standalone ones)

- similar refinements on other dependencies (Maya, CUDA) where
  the build "opts in" depending on which libs are found.

some CMakeLists still need more cleanup...

Closes #9
2012-06-13 17:41:18 -07:00
manuelk
f293ac859c fix the friend call to properly address "Match" as a struct and not a class
minor code formatting fixes
2012-06-13 17:14:39 -07:00
manuelk
228ffd4de6 fix some of the cmake conditionals so that windows can find custom
locations for dependencies (using the <lib>_LOCATION variables)

Closes #7
2012-06-13 14:30:28 -07:00
Takahito Tejima
851c00d04c Added OsdVertexBuffer class. OsdMesh no longer has vertex buffer and vertex
specification (how many elements exists in the buffer).
client will create OsdVertexBuffer and provide it as an argument of
OsdMesh::Subdivide() function. It would be more flexible and hopefully matches
various use cases.

Since each dispatcher has to accept arbitrary vertex buffer, introduced a simple
shader registry into glslDispatcher. It will configure shaders for given vertex
elements on demand (for now, just works only for varying buffer).

Fixed cuda kernel's GL resource leakage. Since cuda GL interop seems one-way,
OsdCudaVertexBuffer manages vertex updating instead of just using
OsdGpuVertexBuffer.

Cleaned up some kernel codes and renamed ambiguous names.
2012-06-12 16:28:17 -07:00
Takahito Tejima
29b85a0e8c Merge branch 'master' of https://github.com/PixarAnimationStudios/OpenSubdiv
Conflicts:
	opensubdiv/osd/mesh.h
2012-06-12 16:04:12 -07:00
Takahito Tejima
340b89f99a adding vertexbuffer class (incomplete) 2012-06-12 09:28:00 -07:00
Takahito Tejima
6cae48665d add bilinear computation for cuda kernel (not yet for CL, GLSL kernels) 2012-06-11 18:09:23 -07:00
Takahito Tejima
ee40f8d259 add bilinear compute to cpu kernel ( not yet for other kernels) 2012-06-11 17:52:32 -07:00
Manuel Kraemer
fe5e1fd9a1 including the correct version file so namespaces work 2012-06-11 17:02:27 -07:00
Manuel Kraemer
f66c7e19c9 - adding mayaViewer as another code sample
- more work on the glutViewr example
    - fixing some compiling / linking issues for osd
2012-06-11 11:53:35 -07:00
Manuel Kraemer
03e474f422 resolving some symbol problems : these functions don't link in the sample code with the new namespace scheme - they apparently have to be declared extern "C" 2012-06-11 07:54:26 -07:00
Manuel Kraemer
b121bf69e3 adding cmake rule to install Osd public headers 2012-06-11 06:55:06 -07:00
Manuel Kraemer
284a2884bb checkpoint for the glutViewer in the example code (not functional yet) 2012-06-10 19:59:04 -07:00
Manuel Kraemer
fb709d9fa6 adding CUDA kernels 2012-06-09 14:22:57 -07:00
Manuel Kraemer
a4a5bc253a adding support for optional GLSL compute kernels 2012-06-09 13:40:48 -07:00
Manuel Kraemer
9988aad7f4 code formatting / quick cleanup pass 2012-06-09 11:12:34 -07:00
Manuel Kraemer
92b1930927 adding OsdVertex to the OpenSubdiv namespace 2012-06-09 09:23:28 -07:00
Manuel Kraemer
03a78f07e9 switching some size_t to int's to prevent some cross-platforms issues (Fedora in this particular case) 2012-06-08 22:20:37 -07:00
Manuel Kraemer
a055967056 first pass at osd module - no GLSL / CUDA / CL kernels yet 2012-06-08 17:06:35 -07:00
Manuel Kraemer
dcb6572ae9 Base check-in of Hbr / Far 2012-06-08 11:18:20 -07:00