Commit Graph

19 Commits

Author SHA1 Message Date
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
de29bc897f Fix Far::PatchDescriptor::IsAdaptive() for legacy Gregory patches:
- determine based on patch type ID rather than control point count
2019-02-04 11:04:26 -08:00
barry
a0e72d80c3 Changed Gregory triangle from cubic/quartic hyrid to full quartic:
- changed Far::PatchDescriptor size for GREGORY_TRIANGLE to 18
    - modified Far::LoopPatchBuilder to construct full quartic Gregory patch
    - fixed Far::LoopPatchBuilder bug related to face points near boundaries
    - updated Far patch basis evaluation for Gregory and Bezier triangles
    - updated Osd patch basis evaluation to match Far
    - updated Osd GLSL patch size for Gregory triangle to 18
    - modified Osd GLSL Gregory triangle eval and tess settings for quartic
2019-01-24 12:56:09 -08:00
barry
9206ab0f21 Updated Far::PatchDescriptor methods involving "adaptive" patch types:
- modified IsAdaptive() method to better identify non-linear types
    - updated comments to better reflect current use of patches
2018-11-13 18:36:28 -08:00
barry
e96bf355e0 Added low-level support in Far for triangular patches:
- fixed missing PatchDescriptor functionality for Loop triangle
    - add new PatchDescriptor::Type for Gregory triangle
    - extended PatchParam boundary mask from 4 to 5 bits (!)
    - added new PatchParam methods for parameterization of triangles
    - extended PatchMap to support triangular patches
    - added basis evaluation for triangular patch types
2018-09-27 20:09:59 -07:00
David G. Yu
df0cd7ac2f Removed bitfield size from Far::PatchDescriptor
This was an obsolete relic from when PatchDescriptor
was more than a single enum value, but it can cause
problems when sharing patch descriptor values between
devices.

Also, marked the GetNumFVarControlVertices() method as
deprecated.
2016-09-29 09:44:11 -07: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
David G Yu
7aa6ef8113 Fixed comments and one cut-n-paste typo in Far. 2015-05-20 17:43:13 -07:00
jcowles
392e5e8bed Remove #pragma once
While this may be worth revisiting, we should first quantify the benefits and
identify the compilers that support it. Ultimately, we may never use pragma
once in favor of strictly using standard C++.
2015-05-20 09:59:18 -07:00
jcowles
9d32712ec4 Prefix header guards and add pragma once. 2015-05-19 11:22:37 -07:00
David G Yu
fb009f41b2 Removed BOUNDARY and CORNER patch types
These are now redundant since all bspline patches are encoded in
the patch tables consistently using 16 point indices with boundary
and corner edges indicated in the boundary mask of the patch params.
2015-05-13 11:31:02 -07:00
Takahito Tejima
43aa2500c4 Refactor far factories.
This change moves all gregory patch generation from Far::PatchTablesFactory
so that we can construct patch tables without stencil tables as well as client
can chose any end patch strategies (we have 3 options for now: legacy 2.x style
gregory patch, gregory basis patch and experimental regular patch approximation).

Also Far::EndCapGregoryBasisPatchFactory provides index mapping from patch index
to vtr face index, which can be used for single gregory patch evaluation on top
of refined points, without involving heavier stencil tables generation.
2015-04-20 18:59:07 -07:00
Takahito Tejima
c58e63c8d5 Refactor single crease patch to be in unfined shader. 2015-04-17 16:26:57 -07:00
David G Yu
010a31efc4 Checkpoint changes to unify adaptive patch drawing. 2015-04-17 07:42:53 -07:00
manuelk
d0a624f373 Add "smooth UVs" to Far
- extend Far::PatchTables data structures & interfaces to store requisite
  information for channels of face-varying bi-cubic patches
- implement gather function in Far::PatchTablesFactory to populate face-varying
  channels with adaptive patches
- extend accessor interface in Vtr::Level
- propagate code fall-out throughout OpenSubdiv code base, examples & tutorials
- extend vtrViewer code to visualize tessellated bi-cubic face-varying patches
2015-02-26 13:57:47 -08:00
manuelk
b1933194aa Fix data race on static global variable in Far::PatchDescriptor
- statically initialize valid patch descriptor tables
- return a Vtr::Array instead of std::vector
- fix dependencies in Far::PatchTables

fixes #394
2015-02-11 14:25:44 -08:00
barfowl
9bb98a94fd Renaming of a few Sdc types and constants:
- renamed Sdc::Type to SchemeType and TypeTraits to SchemeTypeTraits
    - renamed TYPE_ prefix to SCHEME_
    - updated all usage within core library
    - updated all usage in examples, tutorials, etc.
2015-01-06 17:40:11 -08:00
barfowl
6115eb9c4d Moved <sdc/type.h> to <sdc/types.h> 2015-01-06 14:26:20 -08:00
manuelk
b27b55e4a8 Refactor Far::PatchTables
- split Far::PatchDescriptor into its own class (mirrors Far::PatchParam)
- hide PatchArray as a private internal structure
- add public accessors patterned after Far::TopologyRefiner (returning Vtr::Arrays)
- propagate new API to all dependent code

note: some direct table accessors have not been removed *yet* - see code for details
2014-11-25 12:41:19 -08:00