Commit Graph

1661 Commits

Author SHA1 Message Date
David G Yu
4bf1ef722c Merge pull request #564 from takahito-tejima/singlecrease
Fix screen-space tessellation on single crease patch.
2015-05-30 23:58:39 -07:00
Jeremy Cowles
6b7f76010a Merge pull request #567 from c64kernal/dev_f
Fix GL context init for Linux and Windows.
2015-05-30 23:32:09 -07:00
Takahito Tejima
6a1a99b36c Merge pull request #566 from c64kernal/dev_osd
Fix out of bounds memory access in CPU stencil eval.
2015-05-30 23:25:20 -07:00
George ElKoura
fb096fdfed Move OPEN_GL_FORWARD_COMPAT setting
Move OPEN_GL_FORWARD_COMPAT setting inside CORE_POFILE guard.
2015-05-30 23:24:44 -07:00
George ElKoura
e3b20b5418 Fix GL context init for Linux and Windows.
Move the core profile specification into the OSX only section.
2015-05-30 23:16:27 -07:00
George ElKoura
a63d477f4d Merge pull request #565 from jcowles/dev-cleanup
Only specify an OpenGL version hint on OSX
2015-05-30 23:01:10 -07:00
George ElKoura
cb5044c462 Fix out of bounds mem access in CPU stencil eval.
When the stencil table contains no stencils, bail out
on the EvalStencil before indexing into the stencil table.
2015-05-30 22:55:43 -07:00
Jeremy Cowles
3b64c80f7f Only specify an OpenGL version hint on OSX
It appears the behavior of the version hint is operating system
(and perhaps driver) specific. On OSX the version hint is a
minimum version, but on Linux you get exactly the version
requested.

The GLFW FAQ seems to suggest that any driver not supporting
ARB_compatibility may need the hint.

s
2015-05-30 22:52:52 -07:00
Takahito Tejima
2102b4f6b2 Fix screen-space tessellation on single crease patch.
- Rename OsdPerPatchVertexBSpline to OsdPerPatchVertexBezier
- Split OsdGetTessLevels into 3 functions,
  OsdGetTessLevelUniform, OsdGetTessLevelAdaptiveRefinedPoints,
  OsdGetTessLevelAdaptiveLimitPoints.
- Add a regression test shape : catmark_single_crease
2015-05-30 22:41:24 -07:00
Takahito Tejima
4eb6d55d19 Merge pull request #563 from c64kernal/dev_far
Remove mention of vtr from tests and examples.
2015-05-30 22:41:05 -07:00
George ElKoura
5a51f31104 Remove mention of vtr from tests and examples.
- Renamed common/vtr_utils to common/far_utils.
- Renamed all mentions of Vtr in the sources of tests and examples.
2015-05-30 22:10:07 -07:00
Takahito Tejima
ccb8488411 Merge pull request #562 from c64kernal/dev_fix
Fixed build breakage in mayaPolySmooth.
2015-05-30 16:44:51 -07:00
George ElKoura
fbfc657d03 Fixed build breakage in mayaPolySmooth.
Make sure to maintain constness to fix the build break for gcc.
2015-05-30 16:16:35 -07:00
Takahito Tejima
997d6035b9 Merge pull request #558 from davidgyu/fvarFix
Fixed a couple of problems with FVar handling
2015-05-30 12:00:32 -07:00
Takahito Tejima
310b96ae24 Merge pull request #561 from davidgyu/buildfix
Removed a vim swp file accidentally checked in
2015-05-30 11:52:42 -07:00
David G Yu
c49cc09966 Removed a vim swp file accidentally checked in 2015-05-30 11:39:51 -07:00
Jeremy Cowles
de69c5100c Merge pull request #556 from barfowl/primvar_interpolate
Removed multi-level interpolation methods of Far::PrimvarRefiner
2015-05-30 10:26:33 -07:00
Takahito Tejima
ccb583eba0 Merge pull request #559 from davidgyu/shadingRefactor
Re-organized patch tessellation shader code
2015-05-30 09:42:29 -07:00
Takahito Tejima
7ef20319c7 Merge pull request #560 from c64kernal/dev_win
Fix build breakage due to recent examples/common refactor.
2015-05-30 09:26:41 -07:00
George ElKoura
8dc8bcdace Fix build breakage due to recent examples/common refactor.
- Make sure to declare usage of the include files if GLFW is found
- When GLFW is found and is compiled into examples/common, we need to
  unfortunately link it into dxViewer.  Hopefully we can refactor common
  so that this won't be necessary in the future.
2015-05-30 02:34:29 -07:00
George ElKoura
aef673f8fa Merge pull request #557 from jcowles/dev-cleanup
OpenGL init without errors, example cleanup
2015-05-30 01:14:18 -07:00
David G Yu
cd782e3728 Fixed a couple of problems with the FVar handling
This fixes a couple of minor regressions with linear FVar
display in the glViewer and glFVarViewer.
2015-05-29 23:58:40 -07:00
David G. Yu
c245407854 Re-organized patch tessellation shader code
This change refactors the GLSL and HLSL patch shader code so that
most of the work is implemented within a library of common functions
and the remaining shader snippets just manage plumbing.

There is more to do here:
  - varying and face-varying data can be managed entirely by the client
  - similarly, displacement can be implemented in client code
  - there's still quite a bit of residual boiler-plate code needed
    in each shader stage that we should be able to wrap up in a more
    convenient form.
2015-05-29 23:00:19 -07:00
Jeremy Cowles
261dc17f1b OpenGL init without errors, example cleanup
The GLFW context version hint is a minimum version, not maximum version so
requesting 4.4 and then falling back to lower versions doesn't make sense.

This change sets the minimum version to 3.2 and attempts to standardize this
across all example apps.

Also print the maximum supported GL version along with the context version
at startup.
2015-05-29 22:37:12 -07:00
barfowl
5b854c8534 Removed multi-level interpolation methods of Far::PrimvarRefiner
- removed all of the multi-level Interpolate...() methods taking T*, U*
    - made all single-level methods consistent wrt usage of T&, U&
    - replaced usage in regressions, tutorials and examples
    - additional minor improvements to far/tutorials
2015-05-29 22:21:50 -07:00
Takahito Tejima
8be0f300e3 Merge pull request #553 from jcowles/dev-compile
Fix compile issue for ICC
2015-05-29 21:28:26 -07:00
jcowles
98dbe6b6d6 Fix compile issue for ICC
Template parameters to local types is only allowed in C++11, instead move the
local type out to an anonymous namespace.
2015-05-29 16:29:21 -07:00
Takahito Tejima
b4d1d09ab9 Merge pull request #552 from jcowles/dev-fix
Fix GLEW for Core profile, minor cleanup
2015-05-29 16:16:16 -07:00
jcowles
214f86a7c0 Fix GLEW for Core profile, minor cleanup
We will need to find a solution for Ignacio's older setup, but this at least
fixes the other fallout.

 * Use glewIsSupported instead of glewGetExtension
 * Convert tabs to spaces
 * Remove GLEW static caching (they only get called once)
2015-05-29 15:56:36 -07:00
David G Yu
a48cab654e Merge pull request #549 from takahito-tejima/farapi
Far: hide endcap factories from public interface
2015-05-29 13:42:16 -07:00
Takahito Tejima
4e807a776d Add Far::PatchTable::ComputeLocalPointValues() to compute endcap patch points.
To encapsulate endcap functions from public API, add methods to
tell the number of patch points needed (GetNumLocalPoints()) and
to compute those patch points as a result of change of basis from
the refined vertices (ComputeLocalPointValues()).

ComputeLocalPointValues takes contiguous source data of all levels
including level0 control vertices.
2015-05-29 12:41:22 -07:00
Takahito Tejima
7e82df37b2 Far: make internal header files private.
- fixing CMakeLists to install only public headers.
- remove unnecessary includes from examples.
2015-05-29 12:41:21 -07:00
Takahito Tejima
a81497b8db Merge pull request #548 from barfowl/add_varying
Removed primvar interpolation dependency on varying interface
2015-05-29 12:40:22 -07:00
David G Yu
e17b6ee277 Merge pull request #547 from takahito-tejima/osdapi
osdlayer: rename Osd::VertexBufferDescriptor to Osd::BufferDescriptor.
2015-05-29 10:55:10 -07:00
barfowl
42245f4b20 Removed primvar interpolation dependency on varying interface:
- removed AddVaryingWithWeight from Far::PrimvarRefiner interpolation
    - removed Far::StencilBuilder dependencies on varying
    - updated Far::StencilTableFactory use of StencilBuilder constructor
    - updated far/tutorial_2 to use vertex colors vs varying (for now)
2015-05-29 10:48:19 -07:00
Takahito Tejima
f9523f916f osdlayer: rename Osd::VertexBufferDescriptor to Osd::BufferDescriptor.
A mechanical substitution of VertexBufferDescriptor with BufferDescriptor.
Also removing unused files from osd.
2015-05-29 09:21:14 -07:00
George ElKoura
7942b02d99 Merge pull request #546 from barfowl/refiner_factory
Moved protected TopologyRefiner modifiers to its Factory class
2015-05-28 23:08:10 -07:00
barfowl
ff490cc131 Moved protected TopologyRefiner modifiers to its Factory class:
- added TopologyRefiner base level modifiers to TopologyRefinerFactoryBase
    - removed old modifiers from TopologyRefiner (unused by anything else)
    - updated existing Factory<MESH> definitions to use new methods
2015-05-28 22:39:45 -07:00
Jeremy Cowles
176e392c5c Merge pull request #544 from takahito-tejima/dev
Fix CMakeLists: make project-relative include path overridable
2015-05-28 19:55:54 -07:00
Jeremy Cowles
cff7147afb Merge pull request #545 from barfowl/far_types
Added more public constants to <far/types.h>
2015-05-28 19:44:33 -07:00
barfowl
506900e59f Added more public constants to <far/types.h>
- added constants for Vtr::INDEX_INVALID and VALENCE_LIMIT
    - added inline equivalent to Vtr::IndexIsValid()
2015-05-28 17:55:34 -07:00
Takahito Tejima
89dcea57c2 Fix CMakeLists: make project-relative include path overridable
All examples, regression tests and tutorials directly looked into
opensubdiv source directory to grab the header files. This is somewhat
convenient during development but they can mistakenly access private
header files.

With this change, when OPENSUBDIV_INCLUDE_DIR is given to cmake,
it will be used as an include search path to build examples etc.
Otherwise it follows the same behavior as before.

Also replaces include references to the files in regression dir
to be relative, and cleanups some copy-paste patterns.
2015-05-28 17:32:33 -07:00
David G Yu
c65995b834 Merge pull request #541 from barfowl/mask_interface
Moved Vtr::MaskInterface into Far::PrimvarRefiner
2015-05-28 13:50:30 -07:00
David G Yu
41bfae3156 Merge pull request #543 from takahito-tejima/mac
Mac build and shader compiler error fix.
2015-05-28 12:11:10 -07:00
Takahito Tejima
9cfdb6c5c1 Mac build and shader compiler error fix. 2015-05-28 10:27:23 -07:00
David G Yu
7d51c1d2e9 Merge pull request #539 from takahito-tejima/osdapi
Add GPU stencil/patch derivative kernels
2015-05-28 10:04:26 -07:00
Jeremy Cowles
30fb3260ec Merge pull request #540 from barfowl/boundary_none
Fixed refinement when using BoundaryInterpolation mode "None"
2015-05-27 21:02:55 -07:00
barfowl
6ce3292576 Moved Vtr::MaskInterface into Far::PrimvarRefiner:
- updated PrimvarRefiner to make use of now-local Mask class
    - renamed vtr/maskInterfaces.h to vtr/componentInterfaces.h
    - updated usage of renamed header file and CMakeLists.txt
2015-05-27 20:44:06 -07:00
barfowl
9cd082fde1 Tag faces as holes when using BoundaryInterpolation setting of "none" 2015-05-27 19:42:27 -07:00
Takahito Tejima
9dcbaee147 Add GPU stencil/patch derivative kernels
implements cuda, CL, GLXFB and GLCompute kernels of derivative
evaluation for both limit stencils and patches.
2015-05-27 17:23:36 -07:00