Commit Graph

160 Commits

Author SHA1 Message Date
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
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
b77beb0b33 Fixed a typo in examples/common/glHud.cpp 2020-02-24 11:52:15 -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
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
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
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
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
barry
329fd509a1 Updated GL examples for common command line arguments:
- updated all examples/gl* to make use of common/argOptions.h
    - implemented -yup where user-supplied geometry is imported
    - updated glPtexViewer to use ObjAnim class for animated geometry
2019-04-24 19:39:18 -07:00
barry
b7470bb26f Moved definition of struct ShapeDesc into same header file as Shape:
- added definition to regression/common/shape_utils.h
    - removed examples/common/shapeDesc.h and all references to it
    - removed local definitions of ShapeDesc from examples, regressions, etc.
    - overloaded Shape::parseObj() with ShapeDesc
    - updated examples to use Shape::parseObj(ShapeDesc const&);
    - removed axis argument to Shape::ParseObj() and ObjAnim::Create()
2019-04-23 12:05:14 -07:00
barry
48a557abeb Replaced -axis with -yup in common args and examples:
- replaced -axis with -yup in examples/common/argOptions
    - updated clients of ArgOptions: glViewer, glFVarViewer, dxViewer
    - updated documentation for common arguments and usage of examples
2019-04-16 18:59:24 -07:00
George ElKoura
091c84650c Fix build with gcc by including the headers we need 2019-04-09 13:30:35 -07:00
George ElKoura
61f5ceabde Factored viewer args parsing for into common place
Started refactoring how we parse arguments for sample viewer
applications into a common place.  This will make it easier
to keep args consistent between applications.
2019-04-08 17:59:46 -07:00
George ElKoura
f64b87de28 Fix up incorrect include path 2019-03-09 22:52:42 -08:00
barry
5c2191f89c Added more common utilities to support Shapes with non-Catmark schemes:
- added conversions Shape and Sdc scheme types
    - extended ObjAnim to take a scheme type on construction
    - updated far/tutorial_9 to make use of new functionality
2018-10-19 13:05:23 -07:00
barry
c424594625 Major step towards consistent use of include paths in source files:
- changed the main OPENSUBDIV_INCLUDE_DIR to exclude ./opensubdiv
    - updated CMakeLists.txt files in non-examples to use only this path
    - updated CMakeLists.txt files in examples to append ./opensubdiv to path
    - updated source in regression/common to use #include <opensubdiv/...>
    - updated source in examples/common to use #include <opensubdiv/...>
    - deferred source in examples to be updated on a case-by-case basis
2018-10-09 10:51:31 -07:00
George ElKoura
4383d2b5ac Several improvements to CI building and testing
- Added support for OSX CI builds and tests
- Cleaned up build scripts and moved to $ROOT/build_scripts
- On Linux: moved to trusty distro
- On Linux: enabled OpenMP, TBB and PTex build options
- On Linux: install and setup xvfb with newer mesa drivers to run our GL tests
- On Linux: enable GL tests
2017-06-30 12:52:01 -07:00
Michael Harris
30cd2df37c Added Metal support 2017-04-19 16:49:53 -07:00
Mike Erwin
bd3113e7e3 spelling phase 4 -- examples, tutorials, regression tests
Read all comments and made corrections to files that aren't part of
OpenSubdiv itself but are packaged with it.

Commandline output of glPtexViewer is affected. Otherwise no functional
changes.
2017-01-24 22:48:48 -08:00
David G Yu
b49d40100d Fixed compile warnings in ptex examples on macOS 2016-09-06 23:24:46 -07:00
David G Yu
8babf1e12b Removed mayaPolySmooth example
Also removed the remaining Maya dependencies. These
were most useful during the early days of OpenSubdiv.
Now OpenSubdiv has been integrated directly into Maya
and these examples serve little purpose.
2016-09-06 17:08:05 -07:00
David G. Yu
1ba1e07ad1 iso-646 fix for ptex / examples / tutorials 2016-06-25 14:27:53 -07:00
David G. Yu
3e3695652f iso-646 fix for CUDA / CL / TBB 2016-06-25 14:23:55 -07:00
David G Yu
3d08e0ac27 Merge pull request #810 from thomthom/dev-iso646-fix-dx
iso-646 fix for DirectX project
2016-06-25 13:55:54 -07:00
Thomas Thomassen
b1e1ff31b4 Clean up DX, example and tutorials. 2016-06-25 10:30:50 +02:00
Thomas Thomassen
72610a3043 Glean up GLEW and GLFW. 2016-06-25 10:29:59 +02:00
Thomas Thomassen
aa0599b4bc Merge branch 'dev'
Conflicts:
	opensubdiv/far/patchTableFactory.cpp
2016-06-24 23:30:44 +02:00
David G Yu
90e8b58145 Merge pull request #804 from c64kernal/dev_cmake
Use cmake's folder feature on platforms that support it.
2016-06-23 12:56:01 -07:00
George ElKoura
923d60ca74 Use cmake's folder feature on platforms that support it.
We now make use of folders where they are supported.  In particular, on Visual Studio, this produces much nicer solutions to navigate.
2016-06-09 17:04:26 -07:00
George ElKoura
bd4ee29144 Fixed two issues with HUD sliders.
- Capping was broken (thanks to fakebits for pointing it out).  Fixes #801.
- Slides where min != 0 were also broken.
2016-05-01 13:43:21 -07:00
David G Yu
76137e5cc1 Merge pull request #788 from manuelk/dev
Improved Ptex configuration and DX compatibility
2016-03-29 12:20:59 -07:00
Takahito Tejima
7cb13ee4a8 fix ptex lookup shaders to clamp the patchcoord
with MSAA enabled, patchcoord could overrun the guttering pixels.
2016-03-10 12:39:41 -08:00
manuelk
84d0e02fa2 dxPtexViewer code example updates:
- update GUI to match more closely glPtexViewer
- added pipeline stats query for number of triangles tesselated
- matched CPU / GPU compute timers
- added obj animation
- fixed near / far clip planes
2016-02-24 11:38:14 -08:00
Thomas Thomassen
c422a79031 Rename and, or and not to &&, || and ! to address compilers that don't support them out of the box without extra headers. 2016-02-21 15:47:11 +01:00
manuelk
4926fd2c3e Ptex fixes:
- fix build compiling & linking to accomodate recent code churn in Ptex
- fix FindPTex.cmake module to correctly extract version number
- fix dxPtexViewer & glPtexViewer source to compile with new Ptex namespace changes
- add alpha channel padding function to ptexMipmapLoader as a workaround to the absence of 3-channel DXGI formats
- mirror ptex memory limit function from glPtexViewer to dxPtexViewer
2016-02-19 16:58:56 -08:00
Takahito Tejima
f5810bac97 Fix windows build 2015-09-30 11:20:03 -07:00
Mike Erwin
585858c1e4 use WIN32_LEAN_AND_MEAN properly
Misspelled W32_LEAN_AND_MEAN in osd/opengl.h had no effect on windows.h.

Also added to example code wherever windows.h is included.
2015-08-07 17:45:41 -04:00
David G Yu
e897a1c0e5 Merge pull request #702 from daz3d/cmake_error_on_no_gpu
Fixes cmake projects for non-gpu use case
2015-08-04 08:00:58 -07:00
Takahito Tejima
3825319149 example viewer hud: disable depth test 2015-07-30 15:53:33 -07:00
Christopher Jones
87dc09e769 Fix cmake projects to not require GLFW when NO_OPENGL provided and not build gpu lib if not needed. 2015-07-15 23:55:14 -06:00