cmake find_path function searchs system directories first when PATHS is used.
using HINTS instead forces the search to start in the suggested locations, which
ensures that the correct headers are used.
fixes#265
minor code cleanups:
- change Descriptor::iterator to use a static vector instead of overly complicated logic
- change the private factory PatchType struct for better readability
- variable name changes
On platforms with multiple devices (e.g. OS X Mavericks
with both Intel and Discrete GPU CL devices) we must
create the context and command queue with the correct
device in order to share resources with GL.
This follows existing patterns (more or less), but
there are certainly opportunities to move more of this
sort of logic into macros defined at the top level.
The example code now uses the new glfw*FramebufferSize methods
to determine the size of the windows's framebuffer for rendering
and glfw*WindowSize method for user interaction
Fixes#263
Prevent boundaryEdgeNeighbors[2] from being overrun when an interior
vertex has more than 2 boundary neighbor vertices. The fix is applied
to the GLSL / HLSL and CPU implementations.
Note: this appears to fix long-standing problems with Gregory patches,
but i am not entirely convinced that this fixes the general case.
fixes#259
- renders off-screen a higher resolution version of the current view
- saves the render to image files (screenshot.x.png)
- modified the background color to have alpha set to 0 (screenshots can be composited)
Because our plugin sets UVs with individual face-varying vertices,
Maya interprets the buffer as discontinuous everywhere. Adding a
node in the graph that merges UVs along non-boundary edges resolves
this problem (until the plugin outputs the UV vertex indices in
an aggregated manner).
Also:
- Add a _numVertices member to cpuSmoothNormalContext (for memory reset function)
- Fix memory reset function in cpuSmoothNormalContext (was performing redundant memsets)
- Add a resetMemory boolean to cpuSmoothNormalContext to make reset step optional (default is off)
- added a _stringify function to top CMakeLists
- switched all stringification tasks to use the macro
- all suffixes are now .gen.h instead of .inc (to help cmake track dependencies)
Further leverage cmake object libraries to share object files for CPU
and GPU OSD libraries, avoiding duplicate complation for dynamic/static
build passes.
CMake restricts object library inputs to header and source files, so the
.inc files were renamed to .gen.h (which seems like a better name
anyway) to make CMake happy.
Also updated the .gitignore file to ignore .gen.h files.
Conflicts:
opensubdiv/osd/CMakeLists.txt
- set OBJECT targets for osd cpu & gpu libs, and use the obj target for
static and dynamic linking
- add a new examples_common_obj OBJECT target
- replace direct source dependencies to obj target in all examples CMakeLists
This change makes it possible to not re-compile the same source files
multiple times when they are used in multiple targets. Thanks to jcowles
for uncovering the CMake functionality.
Note: it seems that multi-process build is working again (gmake -j <x>)
An object library allows other build targets to use the object files
from this library.
The change introduces osd_static_cpu_obj which is consumed by
osd_static_cpu.
This will be useful for emscripten integration where we cant use the
compiled library, rather it will use the object files, targeting
osd_static_cpu_obj.
Do feature adaptive refinement, then use the cpuEvalLimit API to evaluate
grids of points on faces.
Test harness is tessellateObjFile which has a -blender option to trigger
the gridding tessellation code.