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.
- 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()
- 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
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.
Far no longer supports this method, so the existing functions were pure noise.
Hbr, however still requires it, so there are still a couple instances of it in
the hbr tutorial files.
This change restores the use of 4-bits in Far::PatchParam to
encode the refinement level of a patch. This restores one bit
that was stolen to allow for more general encoding of boundary
edge and transition edge masks. In order to accommodate all
of the bits that are required, the transition edge mask bits
are now stored along with the faceId bits.
Also, accessors are now exposed directly as members of Far::PatchParam
and the internal bitfield class is no longer directly exposed.
Previously, farViewer had an incomplete implementation of this which executed
invalid GL commands. Now, farViewer uses the common control mesh display for
consistency with other example viewers.
stb - potential use of uninitialized variable (this may have been safe)
farViewer - unused variable
patchTableFactory - _channelIndices potentially used uninitialized
FVarLevel - valueIndexInFace0 potentially used used uninitialized (was safe)
We'll restore this code and finish it up for the next release.
For now, removing this code restores parity with the 3.0 beta,
i.e. face-varying patches are always all bilinear.
There's a lot of good foundational work here to eventually support
smooth interpolation of face-varying patches. Unfortunately, this
is not quite ready to release. Therefore, we've decided to defer this
feature until a later release.
This change hides this code behind the FAR_FVAR_SMOOTH_PATCH macro.
Now the channel specifier is the last parameter in a method's
parameter list with a default of 0. This is consistent with the
topological face-varying queries and also simplifies the common
case of just a single face-varying channel.
- the framebuffer class in examples/common is unstable in certain drivers.
removing offscreen rendering for now.
- move screenshot function to GLUtils.
- fix vertex attrib binding bug (not showing control mesh on osx)
The GLFW context version hint is a minimum version, not maximum version so
requesting 4.4 and then falling back to lower versions doesn't make sense.
This change sets the minimum version to 3.2 and attempts to standardize this
across all example apps.
Also print the maximum supported GL version along with the context version
at startup.
- removed all of the multi-level Interpolate...() methods taking T*, U*
- made all single-level methods consistent wrt usage of T&, U&
- replaced usage in regressions, tutorials and examples
- additional minor improvements to far/tutorials
To encapsulate endcap functions from public API, add methods to
tell the number of patch points needed (GetNumLocalPoints()) and
to compute those patch points as a result of change of basis from
the refined vertices (ComputeLocalPointValues()).
ComputeLocalPointValues takes contiguous source data of all levels
including level0 control vertices.
All examples, regression tests and tutorials directly looked into
opensubdiv source directory to grab the header files. This is somewhat
convenient during development but they can mistakenly access private
header files.
With this change, when OPENSUBDIV_INCLUDE_DIR is given to cmake,
it will be used as an include search path to build examples etc.
Otherwise it follows the same behavior as before.
Also replaces include references to the files in regression dir
to be relative, and cleanups some copy-paste patterns.
- created new class Far::PrimvarRefiner with interpolation methods
- removed interpolation and limit methods from Far::TopologyRefiner
- replaced internal usage in Far::StencilTableFactory
- replaced usage in regressions, tutorials and examples
- replaced Evaluate() with EvaluateBasis() in far/tutorial_6
- commented out use of EvaluateFaceVarying() in examples/farViewer
- face-varying patches are work in progress
The code in farViewer that was used to draw the Hbr representation
of meshes is now gone. This code was mostly used as a way to compare
against the Vtr implementation. However, we don't want this to serve
as an example for others as the Hbr code is not meant to be instructive
otherwise.
As a preparation for retiring DrawContext, move SupportsAdaptiveTessellation
method to examples/common/glUtils, which is renamed and namespaced
from gl_common.{cpp,h} to be consistent to other files.
Same renamings applied to other example files.