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
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.
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.
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.
- 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
-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.
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.
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
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.
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.
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.
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.
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.
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
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.