Commit Graph

1334 Commits

Author SHA1 Message Date
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
David G Yu
8ffa2b6566 Release 3.5.0 2022-09-26 11:17:44 -07:00
David G Yu
287cb80619
Merge pull request #1242 from theblackunknown/cmake-config
Add CMake Config
2022-09-15 09:26:03 -07:00
David G Yu
76841aefa3 Removed 'centroid' qualifier from GLSL struct
This is not valid (See GLSLang Spec, Sec 4.3) and raises shader
compile time errors with some recent drivers.
2022-09-15 08:29:14 -07:00
David G Yu
3f054c7410 Updated cmake config export paths and target names
The cmake config export paths are now more consistent
with other vfx platform projects.

The target names are now more consistent with existing
opensubdiv static and dynamic library names.
2022-09-15 02:34:02 -07:00
David G Yu
28e511af12 Removed non-primary build artifacts from config
Downstream projects should not depend on these.
2022-09-14 17:15:23 -07:00
Barry Fowler
0e574f7204 Fix more internal GCC warnings with -Wconversion 2022-09-14 14:52:01 -07:00
David G Yu
cb1657be17 Implemented alternate Python 'stringify' tool
This simplifies build dependencies when cross-compiling
or when building multi-architecture binaries.

For backward compatibility with earlier releases, the compiled
C++ version of this tool is used when no Python interpreter is found.
2022-09-12 17:19:27 -07:00
David G Yu
141cd19673
Merge branch 'dev' into dev-no-framework-option 2022-09-02 18:10:23 -07:00
David G Yu
4a75c5577a
Merge pull request #1254 from barfowl/gcc_warnings_bitfields
Suppression of GCC warnings from -Wconversion with bitfields
2022-09-02 15:51:11 -07:00
Barry Fowler
887ee04572 Added more methods to Far::TopologyLevel:
- test if a vertex is a corner (one incident face)
    - test if valence of a vertex is regular
    - tests if a vertex is semi- or inf-sharp
    - tests if an edge is semi- or inf-sharp
2022-09-02 12:56:29 -07:00
David G Yu
4f5b15ca26
Merge pull request #1244 from diekev/dev-ogl-program-cache
OpenGL Compute Evaluator: cache active program
2022-08-30 14:40:18 -07:00
Barry Fowler
8b863a0009 Fix GCC warnings with -Wconversion and bitfields:
- apply bitmask in member initialization to suppress warning
    - add public Set...() with bitmask for assignment by users
    - replace any assignments with new public Set...() methods
2022-08-30 14:34:17 -07: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
Barry Fowler
810d7f671b Fix GCC warnings with current default flags:
- default flags include warnings enabled by -Wall and -Wextra
    - suppressed newer warnings in public headers and internal files
      (-Wclass-memaccess, -Wcast-function-type, -Wdeprecated-copy)
    - suppressed -Wunused-function from internal source files
2022-08-30 12:13:44 -07:00
Barry Fowler
647309a7d7 Improved mixed partial at Gregory patch corners:
- normalized the rational weights for pairs of interior points
    - fixed sign swap error in mixed partial of bilinear patches
    - applied changes to both far/patchBasis and osd/patchBasisCommon
2022-08-25 18:40:33 -07:00
David G Yu
7b8728a3f4
Merge branch 'dev' into dev-mac-subproject 2022-08-07 17:12:10 -07:00
Barry Fowler
a1c7be7c8e Addition of Bfr interface (1 of 4): opensubdiv/bfr
This set of commits includes the addition of a new evaluation interface
that treats a subdivision mesh more like a piecewise parametric surface
primitive.  The new interface was placed in namespace "Bfr" for "Base
Face Representation" as all concepts and classes relate to a single face
of the base mesh.
2022-08-02 20:38:17 -07:00
Kévin Dietrich
38fe09c701 OpenGL Compute Evaluator: cache active program
Client applications may keep track of the active shader program so as to
not unnecessarily bind and unbind the same shader consecutively as
switching shaders is costly.

The current behavior of the OpenGL compute evaluator is to set the
active shader to 0 (zero) after running its program(s) which might
interfere with the aforemoentioned client applications' behavior,
leading to bugs.

Instead of unsetting any previously set shader program, cache the
current program before using the evaluator program, and reset the active
program to the previous one when done.

In Blender, this lead to some rendering artifacts. See https://
developer.blender.org/D15064 for more details on it.
2022-06-26 18:08:38 +02:00
MACHIZAUD Andréa
04ff84bc35 Expose preprocessor definition about enabled features 2022-05-09 22:04:42 +02:00
MACHIZAUD Andréa
ee4d4e9f60 Add CMake Config 2022-05-09 09:41:23 +02: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
Thomas Thomassen
beb095d7e3 Add option to not generate frameworks under macOS. Ref #1236 2021-10-20 20:35:40 +02:00
Thomas Thomassen
3fdcb02cd3 Use PROJECT_SOURCE_DIR instead of CMAKE_SOURCE_DIR. 2021-10-06 23:21:22 +02:00
Caroline Lachanski
ff76e0f2dc Release 3.4.4 2021-02-05 17:24:39 -08:00
David G Yu
bb0b366cb7 Fixed macOS static framework
Assigned the postfix "_static" to the static framework
and also fixed header installation. This makes the static
framework usable and also fixes build errors when using
recent versions of CMake. Also fixes build errors that
can occur when building with multiple threads.
2021-02-03 10:08:08 -08:00
David G Yu
62ddd17bcb
Merge pull request #1208 from barfowl/far_unrefine_maxlevel_bug
Fixed Far::TopologyRefiner::GetMaxLevel() after call to Unrefine()
2021-01-26 14:41:40 -08:00
David G Yu
0d117082fd
Merge pull request #1207 from barfowl/far_stencil_precision_bug
Fixed bug in double precision template for Far::StencilTableFactory
2021-01-26 14:32:57 -08:00
Barry Fowler
03c19c7194 Fixed Far::TopologyRefiner::GetMaxLevel() after call to Unrefine():
- reset _maxLevel member to 0 in Unrefine()
2020-10-24 17:21:18 -07:00
Barry Fowler
75e31d88d6 Fixed bug in double precision template for Far::StencilTableFactory:
- added missing template parameter with use of Far::PrimvarRefiner
2020-10-24 17:20:38 -07:00
Barry Fowler
c1dd0bdfca Fixed bug in sparse refinement where face-varying topology differs:
- do not select face if incomplete, i.e. not descended from specified face
2020-10-24 17:19:08 -07:00
David G Yu
82ab1b9f54 Release 3.4.3 2020-04-01 23:04:53 -07:00
David G Yu
e7dfecc3bf Additional fixes for dynamic and static linking
Updated to link the GL loader objects directly
along with the osd GPU objects for both static
and dynamic libraries.
2020-04-01 21:54:21 -07:00
David G Yu
0ca74b2e8e Release 3.4.2 2020-04-01 17:21:33 -07:00
David G Yu
b93725be26 Fixed static library linking on Windows
Changed the glLoader library to an object library
instead of a static library to improve generating
opensubdiv static libraries.
2020-04-01 12:13:36 -07:00
David G Yu
e6963dac5a Release 3.4.1 RC1 2020-03-23 18:23:51 -07:00
David G Yu
cb596ffb8a Added option to control building shared libraries
This adds support for the standard global option
  BUILD_SHARED_LIBS
to select whether to build shared libraries.

Note that building shared DLL libraries is still
not yet supported on Windows.
2020-03-09 17:50:49 -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
f3f28995a5 Enabled internal GL API loader as GLEW alternative
At build time, the preprocessor symbols: OSD_USES_GLEW or
OSD_USES_INTERNAL_GLAPILOADER determine the GL API loader
that will be used by the OSD library.
2020-03-06 11:37:55 -08:00
Pol
e7ef20dacd
Merge pull request #1183 from davidgyu/dev_internal_glloader_prep
Prepare to replace GLEW with internal GL API Loader
2020-03-03 20:50:05 -05: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
6dde62d48f Fixed strict-aliasing warnings
Minor update to the implementation of a few internal tagging
methods in Vtr to avoid violating strict-aliasing rules.
Specifically, switched to using std::memcpy instead of
reinterpret_cast to implement type punning.
2020-02-28 16:28:33 -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
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
8b065abb90 Formatted the modified source file to adhere to 80-column standard 2020-01-13 18:07:23 -08:00
barry
eed095ae15 Updated documentation related to boundary interpolation case "none":
- updated user documentation describing the enum
    - updated the Doxygen comments in sdc/options.h
2020-01-10 14:26:51 -08:00
barry
5a0e16e65d Revised tagging of boundary faces as holes if explicitly sharpened:
- tag faces containing vertices with an unsharpened incident boundary edge
2020-01-10 14:14:22 -08: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
1b556809c3 Merge remote-tracking branch 'origin/dev' into rc/v3_4_0 2019-06-24 20:19:28 -07:00
David G Yu
5c8cdf9121 Fixed regression in MTLComputeEvaluator
Fixed the initialization of patchArray and patchParam
in the implementation of the MTLComputeEvaluator::EvalPatches()
compute kernel.
2019-06-24 16:47:56 -07:00