Commit Graph

390 Commits

Author SHA1 Message Date
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
David G Yu
dfb5c100de Added OpenCL header include paths where necessary
This follows existing patterns (more or less), but
there are certainly opportunities to move more of this
sort of logic into macros defined at the top level.
2014-02-22 21:37:11 +00:00
David G Yu
a07ad19559 Fixed examples to run correctly on high DPI displays with GLFW 3
The example code now uses the new glfw*FramebufferSize methods
to determine the size of the windows's framebuffer for rendering
and glfw*WindowSize method for user interaction

Fixes #263
2014-02-21 19:25:00 -08:00
manuelk
6e3b70cd29 Fix GLSL array instantiation syntax for glStencilViewer
fixes #263
2014-02-21 17:57:56 -08:00
manuelk
6d0600d05e Fix Zlib include in ptexViewer
libpng 1.5 does not include zlib.h anymore (good !) - now we have to do it ourselves.

fixes #261
2014-02-18 14:41:06 -08:00
David G Yu
be540d63b8 Fixed a build error when using older versions of GLFW 2014-02-05 17:53:09 -08:00
David G. Yu
859bb964ae Enable uvViewer on OS X now that Mavericks is released. 2014-02-02 22:37:56 -08:00
David G. Yu
1484856269 Modified ptexViewer and uvViewer shaders to address some portability issues. 2014-02-02 22:35:59 -08:00
David G Yu
8f7d23aba4 Fixed ptexViewer shader errors. 2014-02-03 03:23:03 +00:00
manuelk
0ba68c00bd Adding screen-capture function to ptexViewer
- renders off-screen a higher resolution version of the current view
- saves the render to image files (screenshot.x.png)
- modified the background color to have alpha set to 0 (screenshots can be composited)
2014-01-23 13:21:42 -08:00
manuelk
0bda8963e9 Adding the ability to read obj files to the dxViewer example
(passed from command line!)
2014-01-22 15:36:08 -08:00
manuelk
704a6129cb Fix build warnings (optimized) 2014-01-22 14:26:42 -08:00
manuelk
9fb89a2761 Fix glViewer support for GLSL compute
Core-profile request code was incorrect: we need to request GL 4.3 core profile whenever available.

fixes #254
2014-01-22 14:23:04 -08:00
manuelk
b79ebd796c Fix UV merging in osdPolySmooth code example
Because our plugin sets UVs with individual face-varying vertices,
Maya interprets the buffer as discontinuous everywhere. Adding a
node in the graph that merges UVs along non-boundary edges resolves
this problem (until the plugin outputs the UV vertex indices in
an aggregated manner).
2014-01-17 15:16:46 -08:00
manuelk
51db7e5ef1 Fix ptexViewer: enable specular pass in both IBL and point lighting 2014-01-17 11:56:30 -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
1d4891fe8f Fix include paths for new common example objects build (windows build) 2014-01-03 15:29:43 -08:00
manuelk
94d2408c15 File missing from commit: 00b0d95058 2014-01-03 14:22:48 -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
David G. Yu
570ebf7156 Fixed VS2010 warnings/errors. 2013-12-31 23:50:55 -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
David G Yu
35a4d45cf2 Changed the hud to ignore mouse clicks when not visible. 2013-12-16 12:08:56 -08:00
Manuel Kraemer
a565526977 Fix unused variable build warnings (gcc 4.8.2 - Fedora 19) 2013-12-08 13:47:14 -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
b3b2e56a26 Adding recommended isolation output to OsdPolySmooth node.
- added attribute to the maya example node
- added AE template for editor display
- added ReSt documentation for the plugin
2013-11-25 17:12:57 -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
manuelk
25f6565238 Fix incorrect capitalization in GL ptexViewer shader.glsl: it's PtexMip*m*apLookup
fixes #242
2013-11-20 18:36:29 -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
manuelk
c621c93aca Fix singular vertex handling by correctly populating the vertex buffer data.
Also:
- add logic to locate the GUI mel scripts where the binary is located, then default to script search paths
- remove min/max macro defines
- remove iso646.h header (covered by CMake build)
- remove redundant Osd includes
- remove some build warnings
- code style fixes
- build tweak: move the mel scripts to the correct location in the build area

fixes #239
2013-11-15 14:55:46 -08:00
manuelk
5a473033f2 Fix OsdPolySmoothNode build
- remove cruft
- add installation rule for mel script
2013-11-14 11:37:35 -08:00
manuelk
dc540e37cc Fix Linux build for osdPolySmooth Maya plugin
- remove unused variables
- isolate MSVC specific pragmas (these should eventually be cleaned up from the code...)
- add the plugin to the general build
2013-11-13 15:27:43 -08:00
Scot Brew
b666fa8108 Adding Maya osdPolySmooth plugin into OpenSubdiv examples.
Developed by Autodesk Consulting.
2013-11-13 14:49:33 -08:00
David G Yu
0569a9c691 Fixed GLSL shader portability. 2013-11-10 00:37:18 +00:00
David G Yu
d6c05925ab Fixed compile warnings. 2013-11-10 00:36:43 +00:00
Takahito Tejima
496d8ae8eb add control cage drawing to ptexViewer 2013-11-08 10:47:11 -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
gelder
def6542192 Fixed problem with refinement level being hardwired to 1, fixed error messages,
other improvements.
2013-11-06 14:00:29 -08:00
manuelk
40b564e1f9 Fix the build: add missing #include in osdUtil & projectTest 2013-11-06 11:06:58 -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
manuelk
83d9315e64 Fix Chaikin tag parsing
Also:
- add 2 shape examples with Chaikin rule tag
- add shapes to the glViewer
- add a stub in the documentation

Note: the Chaikin rule currently applied by Hbr appears to be somewhat off...

fixes #236
2013-11-01 11:38:20 -07:00
David G. Yu
9d60586400 Fixed VS2010 build errors. 2013-10-28 17:36:04 -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
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
Takahito Tejima
dd8cc1a3b7 improve ptex guttering. 2013-10-15 17:47:58 -07:00
Takahito Tejima
b41d55eda3 dxPtexViwer : more parity to ptexViewer 2013-10-07 19:07:26 -07:00
Takahito Tejima
3e28bbe7d6 ptexViewer : show ptex memory usage 2013-10-07 19:06:40 -07:00
Takahito Tejima
d702eecfcb Add DX11 ptex viewer (unfinished) 2013-10-04 18:28:00 -07:00
Takahito Tejima
28356dae40 Optimize a bit of ptex mipmap lookup. 2013-10-04 18:23:20 -07:00
David G Yu
c8fb9bb7d3 Fixed ptex cache resource release sequence. 2013-09-28 18:23:55 +01: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
8807904cbd ptexViewer : add surface normal mode, use ptex cache for faster mipmap generation 2013-09-26 09:31:54 -07:00
manuelk
47ce9fe1b4 Fix ptexViewer build with GLFW 2.x 2013-09-24 09:04:20 -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
541a4c81ae fix msvc warnings 2013-09-23 13:20:58 -07:00
Takahito Tejima
d2192f0d16 Fix face varying rendering on loop surface 2013-09-23 12:56:46 -07:00
Takahito Tejima
f38d0ac3af New example : uvViewer, to see how face varying interpolation rule works 2013-09-23 12:53:41 -07:00
Takahito Tejima
f6b9d90697 Analytical displacement mapping,
from 'Analytic Displacement Mapping using Hardware Tessellation; Niessner and Loop [TOG 2013])

and ptexViewer code cleanup
2013-09-20 18:29:00 -07:00
Takahito Tejima
c7d8368fff Add a slider component and cleanup hud code. 2013-09-20 18:19:34 -07:00
David G Yu
945bd59c7e Fixed glBatchViewer build for GLFW 2.x 2013-09-19 12:08:12 -07:00
Kenneth Russell
81d3955280 Set GLFW_OPENGL_FORWARD_COMPAT on Mac OS to make samples work on that platform.
Fixed "Quit" menu option in glBatchViewer.
2013-09-17 10:18:32 -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
Manuel Kraemer
0172d47a59 Squash build warning 2013-09-13 09:18:13 -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
Takahito Tejima
d41b4e9df0 Fixes facevarying rendering in glBatchViewer 2013-08-28 17:15:42 -07:00
Takahito Tejima
b3948bb336 Fixes overlapped hud menu 2013-08-28 16:36:06 -07:00
David G Yu
fb2a519d52 Added cmdline obj loading to the DX11 viewer 2013-08-17 13:33:52 -07:00
manuelk
ac72015310 Adding TBB Compute back-end to glViewer 2013-08-16 10:51:51 -07:00
manuelk
b81d159b91 Enabling Intel's C++ Studio XE icc compiler in Linux
- Add a ICC_LOCATION option to CMake configuration
- Fix icc dependencies
- Add documentation
2013-08-15 15:21:00 -07:00
takahito-tejima
8cf9c834df Fix overlapping HUD menu 2013-07-18 19:49:16 -07:00
takahito-tejima
dd91b2de8c Fix some portability issues on OSX. (GLEW will be used if exists) 2013-07-18 19:49:00 -07:00
Takahito Tejima
8796be66e9 Add 'freeze' button to ptexViewer + cleanup 2013-07-18 15:08:17 -07:00
Takahito Tejima
51a45b598d Updating EULA 2013-07-18 14:19:50 -07:00
Takahito Tejima
a13c0565e4 Renamed texture buffers and uniforms
g_VertexBuffer -> OsdVertexBuffer
g_ValenceBuffer -> OsdValenceBuffer
g_QuadOffsetBuffer -> OsdQuadOffsetBuffer
g_ptexIndicesBuffer -> OsdPatchParamBuffer
g_uvFVarBuffer -> OsdFVarDataBuffer
LevelBase -> PrimitiveIdBase
2013-07-18 12:57:26 -07:00
David G Yu
d19bedb51c Fixed macro redefinition errors
Reported by AMD and Apple GLSL compilers
2013-07-16 17:02:22 +01:00
Takahito Tejima
de3e706379 Potential fix for the shader compilation problem.
Replace face varying computation functions with equivalent macros
to avoid gl_PrimitiveID undefined error.
2013-07-08 16:16:28 -07:00
Manuel Kraemer
7a71def44a Adding more documentation
- new RST pages for our excample code
- fix doxygen documentation link from the nav tab
- fix cmake build rules (still not quite working as intended)
- adding API RST documentation all around
2013-07-04 19:17:34 -07:00
Takahito Tejima
2b4dd1cb0a Add convenient functions to compute face varying attributes.
closes #171
2013-07-03 12:08:10 -07:00
Takahito Tejima
33e0d6e42d Add varying buffer interface to OsdUtilMeshBatch.
Update glBatchViewer for varying/facevarying color display
2013-07-02 11:18:06 -07:00
Takahito Tejima
37b2b8150e Add FaceVarying color display mode into glViewer 2013-07-02 11:16:27 -07:00
David G Yu
c6eff9860a Fixed dxviewer clear color to be in sRGB space 2013-07-02 10:09:45 -07:00
Takahito Tejima
a1d9e028bc Fix a bug in ptexViewer: the ptex level computation of non-quad face was wrong 2013-07-01 14:23:00 -07:00
David G Yu
b9c14e4abe Fixed hotkey display for fractional tess 2013-07-01 11:41:49 -07:00
David G Yu
288b27dc28 Finished varying color shader updates for glViewer 2013-06-28 18:34:34 -07:00
David G Yu
c94c928fe9 Fixed file execute permissions 2013-06-28 17:02:16 -07:00
Takahito Tejima
b9086b4686 Fix OsdGLSLTransformFeedbackComputeContext to bind vertex/varying buffer correctly.
Closes #186
2013-06-28 16:09:04 -07:00
David G Yu
d2abf61c56 Added adaptive tess of user varying values
This isn't necessarily a final design, but
it gets enough of the pieces in place to move
forward.
2013-06-28 14:05:47 -07:00
takahito-tejima
bd42d42be5 Fix varying color display on glViewer/mac 2013-06-27 14:05:24 -07:00
Takahito Tejima
184e90f9a1 Add fractional spacing mode for patch rendering. 2013-06-27 13:34:25 -07:00
Takahito Tejima
e030157f73 Add varying buffer handling to OsdMesh.
Fix a bug that breaks varying interpolation on cuda kernel
Clean up glViewer with some new functions : varying color, screen space lod, patch culling
2013-06-27 12:57:21 -07:00
David G Yu
7d16bffccb Continued cleanup of OpenGL dependencies 2013-06-26 00:52:57 -07:00
manuelk
876cf3bc86 fix GLFW problems with ptexViewer and paintTest
GLFW 3.0.1 made the reshape callback explicit. Since we are using it to setup some framebuffers,
we need to call this function ourselves before starting the main-loop.

fixes #181
2013-06-20 13:51:07 -07:00
manuelk
30ec963112 fix example code to work with GLFW 3.0
- fix FindGLFW.cmake to match the new locations

- fix all viewer & examples to build with 3.0, 3.0.1 and 3.0.2

Note : ptxViewer and paintTest do not work with 3.0.1 and 3.0.2 (yet)
2013-06-20 11:53:33 -07:00
manuelk
edfc9b4bb6 limitEval example : add the ability to read regular obj files as a command line argument (usefuly for debugging...) 2013-06-18 16:52:21 -07:00
manuelk
bbe4435b19 minor API refactor of for EvalLimit :
- Replaced EvalData and EvalVertexData classes with a simpler DataStream class that only
  accesses a single data stream, binds and unbinds it

- DataStream has both an input and an output version which avoids much of the const-ness
  const-related ambiguity of the previous design pattern

- Vertex, varying and face-varying data now all have a dedicate struct (VertexData, VaryingData, FaceVaryingData)
  as a way of gathering the various data-streams required to perform sampling

- renamd some "Buffers" into "Tables" for better naming consistency with Far
2013-06-17 18:13:13 -07:00
David G Yu
077f95b8f0 Fixed a couple bugs/typos in simple_math.h 2013-06-14 09:55:55 -07:00
manuelk
54bef92aab switch cpuEvalLimitController to use a quad-tree based patch access map :
- remove PatchMap from FarPatchTables

- add a new FarPatchMap quad-tree class (constructed from FarPatchTables)

- refactor the EvalLimitController to use the quad-tree search instead of a
  serial loop access

fixes #174
2013-06-13 14:01:23 -07:00
David G Yu
38c951a06c Fixed patch color override for uniform subdivision 2013-06-10 23:33:34 -07:00
David G Yu
06701a8855 Removed examples/evalTest from examples/CMakeLists 2013-06-10 17:26:58 -07:00
David G Yu
6c487c5bac Deleted examples/evalTest 2013-06-10 17:24:34 -07:00
David G Yu
29afdfc8b3 Fixed GLSL transform feedback initialization. 2013-06-10 16:56:32 -07:00
David G Yu
967fc4db72 Fixed glsl shader portability edgeDistance
Moved all edgeDistance declarations to client shader code.
2013-06-10 16:32:45 -07:00
David G Yu
1461deb308 Fixed glsl shader portability (input,output) 2013-06-10 16:31:30 -07:00
David G Yu
c185968809 Updated glsl code texelFetchBuffer -> texelFetch
This allows us to remove unnecessary directives
to require GL_EXT_gpu_shader4
2013-06-10 16:21:47 -07:00
manuelk
419b6b9716 - add a message to limitEval when trying to display face-varying UVs on shapes
that do not have that type of data

- fix some regression shapes that had "empty" uv values
  (including some minor topo surgery that luckily appears to not break
  regression baselines)
2013-06-07 17:53:23 -07:00
manuelk
cf1b2f1334 - fix a face-varying bug in shape_utils : now face-varying UVs are indexed correctly
coming out of our shape format

- set blue component of point-cloud to 0 in face-varying mode (save a few micro-secs)
2013-06-07 14:47:41 -07:00
manuelk
f5a7ad4cdb evalLimit example : make sure to reset the output buffer on creation - some of the prims may not
set all the point colors (if face-varying data is missing on the test shape for instance)
and we don't want random values creeping from unset memory allocations.
2013-06-07 10:38:10 -07:00
manuelk
c18cf5bff2 first pass at face-varying interpolation for CpuEvalLimit - still
a couple of kinks to be worked out...
2013-06-06 18:07:46 -07:00
manuelk
043369485c - adding varying data interpolation to the EvalLimit module
- minor refactoring of the LimitEvalContext to accomodate all the data buffers

- pushing some minor sub-patch functionality back to FarPatchParams

- extend example code with randomly generated varying vertex colors
2013-06-05 11:44:30 -07:00
Takahito Tejima
b0e8533ef4 Fix cmakefile and #ifdefs for opencl configuration. 2013-06-05 10:44:21 -07:00
Takahito Tejima
a6bf169344 Fix fvardata interpolation on adaptive patches. 2013-06-04 11:02:27 -07:00
manuelk
21b9fbbb95 Moving some member variables of OsdGlDrawContext from public to protected
and adding the requisite accessors

Note : all our example code goes through the same boiler-plate texture
binding code - we might want to move it as a member function of the DrawContext.
2013-05-31 17:11:16 -07:00
manuelk
f2b3419a4d bug fix in limitEval example : calculation for the required number of samples was incorrect
on geometry with non-quad faces. This should be fixed now.
2013-05-31 14:14:42 -07:00
manuelk
393362b589 Cleaning up the feature adaptive patch colors : all example code now shares the same function to provide the patch colors
Note : this function will probably eventually move down to osdutil or some similar canonical place
2013-05-22 16:26:02 -07:00
David G Yu
5632721a4b Assign locations for attribs and frag data 2013-05-22 12:36:21 -07:00
Takahito Tejima
87114f7428 Rename osd_util to osdutil.
Cleanup the batching classes so that DrawCollection() no longer caches
current batch and effect. Any kind of binding optimization will be
handled in client's delegate class.
Also remove InitializeVertexBuffer method and add some arguments to
constructor instead.
2013-05-21 17:20:22 -07:00
David G Yu
0f0d4d56ff Fixed ptexViewer xform feedback initialization 2013-05-20 12:21:13 -07:00
David G Yu
9aa83d9538 Fixed simpleCpu draw context construction. 2013-05-20 12:21:13 -07:00
David G Yu
784b6e4475 Fixed OS X build issues. 2013-05-17 15:53:36 -07:00
Takahito Tejima
a6dbb0adc4 example/paintTest can be built with GL 4.3 or later. 2013-05-17 13:59:06 -07:00
Takahito Tejima
e75d94e2ac Fix paintTest to follow API change 2013-05-17 13:40:39 -07:00
Takahito Tejima
aa76d9c645 Add constructor to FarPatchTables. Add enums to FarPatchTables::Type. 2013-05-17 12:49:57 -07:00
manuelk
c2cec239cd removing osd/patch.h (and cleaning up attending dependencies) 2013-05-17 09:06:40 -07:00
manuelk
19073abec8 fix glslTransformFeedback constructor for glBatchViewer 2013-05-16 17:48:06 -07:00
Takahito Tejima
6140f1ae81 DrawContext->IsAdaptive() is no longer needed in client code. 2013-05-16 17:10:17 -07:00
Takahito Tejima
da4fc9c653 Fix multiMeshFactory to splice uniform patches correctly.
(IP) refactor osdbatch
2013-05-16 16:55:53 -07:00
manuelk
6256010296 re-factoring the EvalLimit portion of the code (and other minor comment / typo fixes) 2013-05-16 14:21:11 -07:00
manuelk
ad3bacbbbb remove topology data from FarMesh and refactor uniform / adaptive
code paths using FarPatchTables for all serialized topological data.
2013-05-15 17:53:40 -07:00
Takahito Tejima
b16272d6a5 more msvc fixes. make dxViewer working. 2013-05-14 10:48:48 -07:00
Takahito Tejima
1a2b71d929 Refactor OsdGLDrawContext to be constructed from FarPatchTables, instead of FarMesh.
Removed reference to FarMesh from OsdUtilMeshBatch.
Added const qualifier to ComputeContext constructor.
2013-05-10 19:35:25 -07:00
Takahito Tejima
b7814266c9 Add OpenCL specialized batching class 2013-05-10 09:20:45 -07:00
Takahito Tejima
6ea485de47 fix compile error 2013-05-09 21:27:00 -07:00
Takahito Tejima
5e5fc97b0c fix glBatchViewer 2013-05-09 19:18:32 -07:00
Takahito Tejima
7b6630cf40 fix simpleCpu and ptexViewer to be compilable with new patch tables. 2013-05-09 13:48:00 -07:00
Takahito Tejima
3eaf0362bd split patch descriptor into two parts, far intrinsic properties and osd's.
more OsdGLDrawContext clean up.
2013-05-09 13:14:02 -07:00
Takahito Tejima
f592e90067 fix OsdGLDrawContext to follow far patchtables refactoring. 2013-05-09 09:23:01 -07:00
David G Yu
2a12b21ab2 Removed mutex implementation.
We added this to support earlier versions
of hbr, but it is no longer needed.
2013-05-07 11:27:14 -07:00