Commit Graph

378 Commits

Author SHA1 Message Date
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
David G Yu
e4afec5388 Disabled paintTest on OS X 2013-05-06 23:59:58 -07:00
David G Yu
93476a368d Fixed a few OS X build errors. 2013-05-06 23:59:58 -07:00
manuelk
9860e1921f clean up some function prototypes 2013-05-06 10:36:18 -07:00
manuelk
643b664067 the limitEval example appears to be building properly... adding it to the collection 2013-04-24 10:40:32 -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
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
fd0af2dbb6 minor fixes to the GLFW motion callback to fix MSVC++ build errors.
fixes #149
2013-04-18 19:15:30 -07:00
manuelk
57808e4abe fix the function prototype for the motion callbacks in our example viewers
fixes #149
2013-04-08 10:37:36 -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
David G Yu
036ec2e189 Updated DX11 viewer to use std::string shapes. 2013-03-19 15:38:44 -07:00
Takahito Tejima
d026aca006 use std::string instead of char* for regression shapes definition,
to avoid MSVC's literal length limitation on some big shapes.
2013-03-19 14:43:21 -07:00
David G Yu
7cffcedbc3 Fixed ptexViewer to register for windowClose 2013-03-19 14:31:44 -07:00
manuelk
54856181a9 fix simpleCpu example :
- assign default widht / height to the window
- fix reshape callback
- downgrade GL profile hint to 3.3
2013-03-18 16:55:41 -07:00
manuelk
2ec61446db use sqrtf and expf to prevent auto-casts to double
fixes #139
2013-03-18 16:29:35 -07:00
David G Yu
6f6a6aeab3 Fixed VS2010 compile errors. 2013-03-18 11:57:55 -07:00
David G Yu
f399ff2a10 Fixed VS2010 compile errors.
Also, disabled DEPTH_TEST for framebuffer blits.
2013-03-18 11:56:09 -07:00
Manuel Kraemer
a4c43b0522 fix some GLFW 3.0 issues - since we are still in beta, the API is changing a bit
- the closeWindowFun callback changed prototype (now returns void)
- keyboard functions now require the window handle (and pass it to the callback)
2013-03-16 18:44:53 -07:00
Takahito Tejima
9ec95572bb Add some features into ptexViewer: animation speed, displacement scale, bloom filter, etc 2013-03-15 18:03:22 -07:00
Takahito Tejima
f745aa2807 add paint test example 2013-03-15 12:39:44 -07:00
Takahito Tejima
b3a6d43ee3 fix simpleCpu to be compilable with the latest API 2013-03-08 09:05:07 -08:00
Takahito Tejima
291debd4a9 change access permissions on files 2013-03-08 08:57:42 -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
8db3e5ab41 fix updating coarse vertices for cpu/omp kernels.
Closes #133
2013-03-05 09:49:07 -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
df95968142 hdr_reader: Fix a few compiler warnings 2013-02-25 22:36:28 -05:00
opensubdiv
dfaf8ee76e Fixed merge error. 2013-02-22 16:25:33 -08:00
manuelk
acfd8e366b - similar API changes for Maya 2014 in mayaPtexViewer
- more file permission fixes

fixes #131
2013-02-22 12:58:09 -08:00
manuelk
c3fba1708c - fix function calls incompatible w/ Maya 2014
- change permissions on cudaUtil.cpp, OpenSubdivShader.cpp

fixes #131
2013-02-22 12:31:19 -08:00
manuelk
afc7b9b9a8 - only add detected libs to the maya dependency list
- remove MAYA_tbb_LIBRARY from MayaViewer & MayaPtexViewer examples

fixes #130
2013-02-22 11:38:46 -08: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
a1040e80d4 - fix glViewer / simpleCPU example code to work w/ GLFW 3.0
- remove testEval from build for now (breaks linux build)

fixes #117
2013-02-19 10:14:56 -08:00
Jeremy Cowles
1befe72c9f glViewer: exit when the window is closed 2013-02-16 13:26:46 -08:00
Jeremy Cowles
3f96f9872a Removed last remnants of glut from simpleCpu comments 2013-02-16 13:15:29 -08:00
jcowles
eb1652bc26 Fixed core profile setup in simpleCpu for linux 2013-02-16 13:10:00 -08:00
Jeremy Cowles
70502cceab Disabled string drawing from simpleCpu 2013-02-16 12:19:04 -08:00
Jeremy Cowles
cd8405a47a Added stdio.h for printf in simpleCpu/main.cpp 2013-02-16 12:05:15 -08:00
Jeremy Cowles
e9b29cda95 Updated simpleCpu to use GLFW for all platforms 2013-02-16 12:03:21 -08:00
Jeremy Cowles
5a7e33a792 Renamed mainGlut.cpp to mainGlfw.cpp in simpleCpu 2013-02-16 11:28:25 -08:00
Dirk Van Gelder
f7181d2f9d Get evalTest and simpleCpu to build again, changing glut references to glfw. 2013-02-15 18:32:10 -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
Philip Rideout
13dfc733f2 typo in the Python readme 2013-02-11 16:24:27 -08:00
Andrew Wong
ccbfea69b1 common/hud: fix a conversion warning
warning C4242: 'argument' : conversion from 'int' to 'char', possible loss of data
2013-02-10 00:04:31 -05:00
manuelk
ef408fc67c - remove the now obsolete glutViewer (replaced by glViewer)
- remove some glut-era callbacks in glViewer / ptexViewer
- fix OSX includes in osd_regression

fixes #117
2013-02-08 14:06:44 -08:00
Philip Rideout
05558699d7 remove unused variable 2013-02-07 17:00:32 -08:00
Philip Rideout
293034d39c move screenshot of demo to doc folder 2013-02-07 16:57:22 -08:00
Manuel Kraemer
ca1e294c70 Merge pull request #116 from prideout/master
Python Bindings for Grandma

This is probably not the final word on python bindings... but it gives us a place to start.

Note : tested only in linux environments so far
2013-02-07 16:40:12 -08:00
Philip Rideout
ad040466a0 fix typos in README 2013-02-07 11:41:48 -08:00
Philip Rideout
604c35ac4f incorp feedback from mkraemer: remove the license file, move the demo to examples/python, change the min Python version to 2.6 2013-02-07 11:37:00 -08: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
manuelk
45b38e5c6b fixes a problem on Linux where apparently there is no "primary" monitor returned (NULL)
fixes #113
2013-02-05 18:01:30 -08:00
Manuel Kraemer
91fddab7ef add some logic to enable full-screen mode with GLFW 3.0
confirmed working on Windows - needs checking on other
platforms / versions of GLFW

fixes #113
2013-02-05 16:28:20 -08:00
manuelk
e1f6486ce4 removing more #ifdef's related to adaptive tessellation ability
fixes #111
2013-02-05 15:25:46 -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
Manuel Kraemer
2b12ffc447 build fixes :
- remove ptexViewer from the build on OSX (doesnt work)
- remove maya plugins from the build on OSX (until we have a compatible version available)

glViewer fixes :
- fix incorrect GLFW version check in #ifdefs (now done in cmake)
- fix default program GL version (downgraded to 1.5 where necessary)
- remove non core-profile GL calls (triggering errors)

this should allow OSX 10.7 builds to produce a functional, if restricted, glViewer.

fixes #111
2013-02-04 18:37:25 -08:00
Dirk Van Gelder
eed2d98a39 Merge of in-progress Eval API test code to the mainline. Not much
here yet.
2013-02-04 09:35:43 -08:00
Aras Pranckevicius
89a75f03fe glViewer: set sync off on all platforms 2013-02-04 11:59:53 +02:00
Aras Pranckevicius
7b77a08281 glViewer: don't generate GL errors with invalid UBO indices (happens on OSX since tessellation is not supported) 2013-02-04 09:11:10 +02:00
Aras Pranckevicius
9c9f00ef18 glViewer: line widths larger than 1.0 are deprecated in core GL (generates a GL error) 2013-02-04 09:10:27 +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
manuelk
7a39b0ad7c - add cmake logic to parse package versions and include the correct headers
- add #ifdefs to work around the different versions of glfw
- add cmake logic to parse other packages versions and set minimum requirements
- fix X11 dependencies for static builds of glfw

- general Find.cmake cleanup

fixes #101
2013-01-31 15:34:35 -08:00
manuelk
a6bd013988 change access permissions on files 2013-01-31 15:29:45 -08:00
manuelk
1ba1f048e6 bail out of Rebuild call if the VBO / VAO have not been allocated yet.
fixes #100
2013-01-31 15:27:31 -08:00
manuelk
18e5ab5296 bail out of Rebuild call if the VBO / VAO have not been allocated yet.
fixes #100
2013-01-31 15:24:38 -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
f22c717e1c Merge branch 'master' of github.com:PixarAnimationStudios/OpenSubdiv 2013-01-24 14:17:25 -08:00
manuelk
48ba78d848 fixing a int->float warning for MSVC 2013-01-24 14:16:45 -08:00
Manuel Kraemer
4bbc42fd52 Merge branch 'master' of github.com:PixarAnimationStudios/OpenSubdiv 2013-01-24 14:09:30 -08:00
Manuel Kraemer
371c95ccef add the license banner to mayaViewer.cpp
fixes #96
2013-01-24 14:08:53 -08:00
manuelk
c912a284a8 Merge branch 'master' of github.com:PixarAnimationStudios/OpenSubdiv 2013-01-24 13:45:41 -08:00
manuelk
468198e4a8 more cleanup :
- consolidate cmake compile flags
- turn on -Wall
- suppress hidden overloaded function warning when using Clang
  (part of it is bug, part of it will require code refactoring
  on our end)
- add support for Maya 2013.5 for windows in cmake module
- clean up some glew includes which break builds with MSVC Express
  & Windows SDK
- move the bitmap for font_image into a compiled object
- remove some unused variables and other minor warnings

Note : this is a checkpoint, there are still a few more warnings to clean up...

fixes #96
2013-01-24 13:40:43 -08:00
Takahito Tejima
516da70e0d Replace deprecated GL api usage from gl_hud. It also supports OpenGLES. 2013-01-24 09:29:35 -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
a2840260d7 Merge branch 'master' of github.com:PixarAnimationStudios/OpenSubdiv 2013-01-18 16:43:06 -08:00
manuelk
97f4c5a7c1 fix linking problems for maya viewer plugins (PLATFORM_LIBRARIES was being reset accidentally) 2013-01-18 16:42:22 -08:00
David G Yu
f3e155a96c Fixed include of cstdio for examples cudaInit.h 2013-01-18 16:03:17 -08:00
manuelk
d529460486 add correct conditional build of cuda modules in maya plugins
fixes #95
2013-01-18 14:49:25 -08:00
Manuel Kraemer
0bd9f0f916 fixes some OSX build issues :
- cmake should now be better at finding Maya installations on OSX automatically
- various dependency fixes for Maya plugins
- first pass at some code fixes to build Maya plugins on OSX

this not the final word on this : just like glutViewer, we will need a "_compat" version of these plugins

fixes #95
2013-01-18 14:25:02 -08:00
manuelk
2baa3c82c1 removing some crusty tabs & other minor formatting 2013-01-10 11:14:41 -08:00
David G Yu
50ddf242d6 Fixed simpleCPU example to run on OS X 2013-01-04 18:18:38 -08:00
David G Yu
950fa35180 Exposed DirectCompute by default in the DX11Viewer 2012-12-17 09:50:21 -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
7ca59fab69 Fixed default display modes in example viewers
Now the GL and DX11 viewers display surface+wire by default and display the correct keep-alive animation status.
2012-12-13 10:23:33 -08:00
manuelk
6a8f58b65e fix CMake dependencies for shader string in mainApple.mm
fix missing includes

fixes #81
2012-12-12 12:28:26 -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
c89b4db270 Update simpleCpu example to compile under OSX after refactoring 2012-11-11 23:18:48 -08:00
U-octave\dyu
4168e5788d Fixed a couple build issues with Visual Studio 2010 2012-10-09 10:56:31 -07:00
jcowles
732cb10fe0 Fix header issues after merging recent revisions 2012-10-09 10:07:57 -07:00
jcowles
11d2800aef Clean up simpleCpu code a bit 2012-10-09 09:28:27 -07:00
jcowles
a287869e9c Merge branch 'master' of https://github.com/PixarAnimationStudios/OpenSubdiv 2012-10-08 16:05:08 -07:00
jcowles
b3214f09eb Added simpleCpu example with markdown commentary 2012-10-08 16:04:53 -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
Takahito Tejima
88cba89055 Fix broken drawing for loop geometry in glutViewer 2012-09-13 09:39:41 -07:00
Takahito Tejima
c070674b35 Added OpenMayaUI lib 2012-08-27 09:28:22 -07:00
Takahito Tejima
b87e9bd265 Added new maya plugin example which uses MPxShaderOverride to display osdmesh. 2012-08-23 13:09:54 -07:00
Takahito Tejima
27779c8718 fix crash bug of mayaViewer with edgeCreases 2012-08-23 12:05:04 -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
manuelk
783eed920a Remove IlmBase dependencies for now as we are not using any of the features.
Leaving cmake/FindIlmBase.cmake in case we need the API in the future.

Closes #36
2012-08-10 16:40:22 -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
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
d654a587e2 Fixed double-to-float and int-to-float conversions raising warnings in VS2010 2012-06-26 02:01:35 -07:00
U-octave\dyu
7464046595 Added GLEW to the include directories and link libraries for the glutViewer. 2012-06-26 01:57:58 -07:00
Takahito Tejima
ec30d8cf03 release vertexbuffer on exit viewer
Closes #28
2012-06-21 10:05:39 -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
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
manuelk
6d545f8c46 Adding a drawnormals fucntion that captures the VBO after compute
in order to isnpect the interpolation of vertex data.

Misc code fixes / cleanup

Closes #25.
2012-06-20 16:16:15 -07:00
Takahito Tejima
38ba53404e cutGetMaxGflopsDeviceId seems failing only with 5.0dev driver.
so enabled this function and will work with cuda 4.2 sdk
2012-06-20 09:31:22 -07:00