Commit Graph

1346 Commits

Author SHA1 Message Date
David G Yu
67aa6e4c88 Marked deprecated Osd::*Evaluator::SetNumThreads()
The existing implementation in Osd::TbbEvaluator has never been implemented
correctly and that implementation is incompatible with the oneTBB API.

These methods are now marked deprecated in the two places where defined
in Osd::TbbEvaluator and Osd::OmpEvaluator, but for consistency we preserve
the existing implementation when building with older versions of tbb.

We've already removed all use of these methods from the tests and examples.
2023-08-25 20:10:09 -07:00
David G Yu
6c1a309cfc Release 3.5.1 2023-07-20 11:58:39 -07:00
Barry Fowler
81941e996c
Merge pull request #1309 from davidgyu/dev_apple_framework_fix
Fixed Apple framework object dependencies
2023-07-06 15:02:04 -07:00
Barry Fowler
9d34513203
Merge pull request #1308 from davidgyu/dev_osd_real_cast
Fixed OSD_REAL_CAST of some float constants
2023-07-06 14:57:11 -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
c34d7927b3 Fixed Apple framework object dependencies
Updated target object dependencies for Apple static and dynamic frameworks
to use TARGET_EXISTS for osd_gpu_obj to allow correct linking when no
OSD_GPU targets are enabled. We'll likely revisit these targets further
for future releases of OpenSubdiv.

Fixes #1224
Fixes #1236
2023-06-30 15:46:22 -07:00
David G Yu
5db3b63faa Fixed OSD_REAL_CAST of some float constants
This avoids compile errors with some GLSL compilers.

Fixes #1285
2023-06-30 15:45:45 -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
David G Yu
4576083cd0 Fixed interface includes for cmake config
Added target include directories for the library targets
so that interface include directories are published with
the OpenSubdiv cmake config.

Also, removed a cmake version test which is no longer needed.

Fixes #1278
2023-06-21 12:01:50 -07:00
Barry Fowler
51eb6a041c Fix bug in Bfr::SurfaceFactory with valence-2 interior vertex:
- fixed IrregularPatchBuilder to correctly assign boundary sharpness
    - modified test shape creating creased val-2 interior face on boundary
2023-03-14 19:02:04 -07:00
David G Yu
578b1fb9d2
Merge pull request #1290 from thomthom/dev-mismatched-bound-warning
Correct warning: "with mismatched bound [-Warray-parameter]" in level.cpp
2023-03-09 17:37:33 -08:00
Thomas Thomassen
c92351a6fa Correct warning: "with mismatched bound [-Warray-parameter]" in level.cpp 2022-11-29 22:10:44 +01:00
Cory Kramer
ca6f0feecf Avoid referring to std::vector<T> members when T is incomplete.
This is not legal according to the C++ standard, and causes build errors when using --std=c++20
2022-09-27 10:15:30 -04: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