Commit Graph

727 Commits

Author SHA1 Message Date
David G Yu
dbb75b650c Find TBB using TBB's CMake config
Updated the CMake build to locate TBB using TBB's CMake config
and deleted the local cmake/FindTBB.cmake module.

While the source code remains compatible with earlier versions of
TBB, updated the minimum TBB version from 4.4 to 2018 since that
is the earliest TBB release to include a CMake config.  This is
the version of TBB specified for the CY2019 VFX Reference Platform.

Tested on Windows, Linux, and macOS using TBB 2018 Update 6,
TBB 2020 Update 3, and oneTBB 2021.10.0
2023-09-11 13:02:25 -07:00
Barry Fowler
dbb23be83d
Merge pull request #1297 from davidgyu/dev_cxx_version
Updated C++ standard to C++14
2023-07-06 14:56:14 -07:00
David G Yu
98351a9dc1 Updated C++ standard to C++14
The OpenSubdiv public interface currently requires only C++11 but we
choose this version since C++14 has been the default since GCC 6,
Clang 6, and Visual Studio 2017 (for the most part) and C++14 has been
the default for OpenSubdiv on macOS when support for Metal is enabled.

This setting is guarded so that it can be overridden by the caller when
running CMake.

Fixes #1276
2023-06-30 15:42:23 -07:00
Thomas Thomassen
ad007c076a Corrections to allow for LLVM Clang builds on Windows. 2022-11-29 20:18:33 +01:00
David G Yu
a7490a5e8e
Merge pull request #1257 from Danielmelody/release
fix opengl loader include error when build with opengl and examples
2022-09-08 10:24:56 -07:00
Daniel
4f5834de30 fix opengl loader include error when build with opengl and examples 2022-09-04 01:04:48 +08:00
Barry Fowler
57847e625c Fix GCC warnings with -Wshadow and -Wconversion:
- suppressed -Wshadow in libraries, tutorials and regressions
    - suppressed -Wconversion when casts to simple POD type required
2022-08-30 12:56:59 -07:00
David G Yu
a91707bae8 Fixed subobject initialization warnings
Fixed a few code sites where subobject initializers were missing braces.
2021-10-20 14:55:59 -07:00
David G Yu
cc60e9eda3 Removed obsolete references to hbr from farViewer 2021-02-03 10:22:09 -08:00
David G Yu
82988d04ad Updated EXT to ARB for GL direct_state_access
The ARB_direct_state_access API is more consistent with
the 4.5 and 4.6 core API and is also more widely supported.
2020-03-06 11:37:55 -08:00
David G Yu
28f2574bc5 Moved GLEW dependencies to glLoader wrapper
This introduces an internal glLoader library which allows
most of the implementation to be agnostic about the
implementation of the GL loading library.  Specifically,
this removes references to the GLEW headers and libraries
from the rest of the source code and build system.
2020-03-03 17:10:30 -08:00
David G Yu
b738fa1225 Removed a couple build advisory messages
This simplifies the build by restricting build
configuration commentary messages to the top-level
CMakeLists.txt instead of in leaf directories.
2020-03-03 15:03:41 -08:00
David G Yu
b77beb0b33 Fixed a typo in examples/common/glHud.cpp 2020-02-24 11:52:15 -08:00
Barry Fowler
916a139a06
Merge pull request #1179 from davidgyu/dev_ptexviewer_updates
Updates to GL and DX PtexViewers
2020-02-12 17:26:17 -08:00
David G Yu
afc48004dd Fixed glPtexViewer crash with animObj
The result container was being reserved but not resized.
2020-02-12 16:23:26 -08:00
David G Yu
47c8622025 Updated dxPtexViewer to use common facilities
- regression/arg_utils
- common/objAnim
2020-02-12 16:22:00 -08:00
David G Yu
e0c14ddbef Fixed examples link dependency on GLFW
Split the examples/common objects into graphics API dependent object
libraries (following the pattern used for cemmon Ptex dependencies)
so that DX11 and Metal examples are no longer forced to link with GLFW.
2020-02-12 14:25:14 -08:00
George ElKoura
69af58f7aa
Merge pull request #1174 from davidgyu/dev_ptex_dependency_fix
Fixed Ptex link dependencies
2020-01-15 18:10:12 -08:00
George ElKoura
8c86d81c2a
Merge pull request #1172 from davidgyu/dev_warnings_fix
Fixed warnings in examples and regression/common
2020-01-15 16:11:04 -08:00
David G Yu
552ebf1376 Fixed Ptex link dependencies
Removed the link dependency from libosd to
the Ptex library since Ptex is used only by the
examples. Updated examples/common to separate
the common Ptex sources from the other common
sources so that they are used only by the Ptex
examples.
2020-01-15 14:47:18 -08:00
David G Yu
f3ede96017 Fixed warnings in examples and regression/common 2020-01-15 12:52:17 -08:00
barry
b80a414361 Updated examples with new shapes for boundary interpolation "none":
- added catmark_edgenone and loop_triangle_edgenone to shape lists
2020-01-14 14:27:51 -08:00
barry
4a9ad51ee1 Fixed forward reference warning triggering errors with MSVC 2019-12-14 12:40:00 -08:00
barry
936aff0b8a Moved ArgOptions from examples/common to regression/common:
- updated CMakeLists to account for the moved files
    - updated references to argOptions.h in all examples
    - added method to ArgOptions to populate vector<ShapeDesc>
    - minor changes to ViewerArgUtils to use forward references
2019-12-14 12:06:55 -08:00
David G Yu
7684148b4e
Merge pull request #1159 from c64kernal/dev_cmake
Prefix OpenSubdiv CMake macros
2019-08-19 18:23:22 -07:00
barry
d62d66fcb0 Fixed Microsoft Visual Studio warnings in examples 2019-08-19 14:58:33 -07:00
George ElKoura
92341f7c1e Prefix OpenSubdiv CMake macros
This fixes issue #1157 by adding "osd" as a prefix to public macros.
2019-08-17 16:44:30 -07:00
David G Yu
2c569ad661 Fixed mtlViewer for iOS
-Fixed the iOS ViewController to set the correct irregular
 patch approximation mode.
-Fixed the setting of fractionalSpacing to be separate from
 screenspace tessellation.
-Fixed the configuration of the internal stage-in setting
 on embedded builds.
2019-06-24 17:12:00 -07:00
David G Yu
4160a248da Removed accidentally committed .swp file 2019-06-21 10:52:46 -07:00
David G Yu
daf4c6f489 Fixed uninitialized var warning 2019-06-21 10:51:26 -07:00
David G Yu
7dbcee64e6 Fixed int to bool conversion warning 2019-06-21 10:50:50 -07:00
barry
6ab31b9061 Improved examples/glPaintTest with slider to modify brush size:
- changed default brush size from 500 to 100 pixels
    - added slider to HUD to modify brush size interactively
2019-06-20 21:07:47 -07:00
David G Yu
64d366a145 Updated OpenSubdiv logo in examples HUD
Reorganized the character cells used for UI
elements and removed elements that were not
being used in order to provide more space
for the logo image and logo text.

Updated to the new OpenSubdiv logo and updated
the HUD drawing code used to display the logo
character cells.
2019-06-20 13:56:44 -07:00
Barry Fowler
fdd08b96f1
Merge pull request #1132 from davidgyu/mtl_ptexviewer_fix
Metal PtexViewer fixes and improvements
2019-06-18 19:22:09 -07:00
Barry Fowler
7e229cf095
Merge pull request #1131 from davidgyu/mtl_viewer_options
Thanks, David
2019-06-18 16:23:47 -07:00
Barry Fowler
c49a0c2e44
Merge pull request #1130 from davidgyu/mtl_viewer_tess_fix
Thanks, David
2019-06-18 16:23:31 -07:00
David G Yu
78113981e6 Updated mtlPtexViewer to match mtlViewer
These changes update the mtlPtexViewer implementation
to match recent changes to the mtlViewer including:
- improved shader organization
- correct screenspace tessellation
- support for common command line arguments and fit to frame
2019-06-18 15:32:07 -07:00
David G Yu
b4ace6791b Fixed mtlPtexMipmapTexture 3-component textures
Fixed the example mtlPtexMipmapTexture loader to support
the padAlpha option used when loading 3-component textures.
2019-06-18 15:30:43 -07:00
David G Yu
7794010e8f Removed unused shape list from mtlPtexViewer 2019-06-18 15:30:05 -07:00
David G Yu
dc22a0cb1d Updated mtlViewer command line arguments
Updated the mtlViewer to make use of common/argOptions.h
like the other viewers and also implemented a "fit to frame"
hotkey. Both changes help improve manual testing.
2019-06-18 14:27:33 -07:00
David G Yu
cdbeac560f Fixed mtlViewer transition patch tessellation
Patches with transition edges were not being tessellated
correctly when drawing multiple patch types, e.g. with
Gregory or Legacy Gregory approximation at irregular features,
because the per-patch tess factors buffer was not being
offset correctly for the draw command for each patch type.

Fixed this to be consistent with other patch drawing by
recording and applying offsets when binding this buffer
for each patch type, and making sure that attributes for
the tess factors buffer are bound when drawing Legacy Gregory
patch types.
2019-06-18 13:36:49 -07:00
David G Yu
58a71672a7 Update glFVarViewer option defaults
Enabled smooth corner, inf sharp and single crease patch
options by default.
2019-06-18 10:28:54 -07:00
George ElKoura
3c4081aac3
Merge pull request #1126 from davidgyu/examples_shaders
Minor improvements to examples for Loop
2019-06-17 21:11:02 -07:00
David G Yu
ed3fa312e5 Removed obsolete LOOP define from example shaders
Removed the use of the LOOP preprocessor symbol from
the remaining example shader code. The shader code is now
configured according to the types of the resulting patches
without depending on the subdivision scheme of the mesh
topology.
2019-06-17 17:59:15 -07:00
David G Yu
9fe1284ae3 improved glViewer shaders for Loop
Removed the use of the LOOP preprocessor symbol from
the glFVarViewer shaders code. The shader code is now
configured according to the types of the resulting patches
without depending on the subdivision scheme of the mesh
topology.

Improved the implementation of face-varying interpolation
similar to the glFVarViewer. Now the face-varying patch
type is obtained from the face-varying patch array
descriptor instead of being hard-coded by subdivison scheme.
2019-06-17 17:59:15 -07:00
David G Yu
5d33f7c28e Improved glFVarViewer shaders for Loop
Removed the use of the LOOP preprocessor symbol from
the glFVarViewer shaders code. The shader code is now
configured according to the types of the resulting patches
without depending on the subdivision scheme of the mesh
topology.

This allows the implementation of face-varying interpolation
to be improved and simplifies both the shader code and
application code.

Also, fixed a couple of incorrect buffer/texture bindings
that were raising GL errors.
2019-06-17 17:59:15 -07:00
David G Yu
d8abffc976 Updated more example viewer shape lists
Updated the shape lists in the glEvalLimit, glImaging,
and glStencilViewer examples to match recent updates
to the other example viewers.
2019-06-17 17:36:48 -07:00
David G Yu
62195753a9 Updated default options for examples
Changed several default options in the example viewers to the
preferred settings for improved shape fidelity and to improve
consistency between the different viewers:
 - enabled smooth corner, and inf sharp patch options by default
 - disabled screenspace tess and fractional tess by default
 - changed the default approximation to Gregory in the mtlViewer
2019-06-17 17:33:40 -07:00
David G Yu
973b7fe7a5 Fixed glViewer triangle normal calculation
The normal computed for primitive triangles had a flipped
orientation in the glViewer, This caused linear approximating
patches to be shaded incorrectly for adaptively refined Loop
meshes, and similarly triangles resulting from uniformly refined
Loop meshes.
2019-06-17 16:56:10 -07:00
barry
4a198ace66 Added new Loop tetrahedron shape to main example viewers:
- added to the main geometry viewers: glViewer, dxViewer, mtlViewer
    - added to glFVarViewer for viewing face-varying UVs
2019-06-14 15:24:00 -07:00