Commit Graph

4 Commits

Author SHA1 Message Date
David G. Yu
552331f6d9 Added a common patchBasis implementation for Osd
This is used to compute patch basis weights for
the Osd::*Evaluator classes that are unable to
use the C++ implementation from far/patchBasis.h,
e.g. the GLSL, HLSL, OpenCL, and CUDA kernels.

Instead of duplicating this code for each different
kernel language, we share a single implementation
which is minimally adapted to accommodate specific
language restrictions and syntax.

This implementation can also be used by client
shader code executed while drawing, e.g. to
compute patch basis weights for evaluating varying
and face-varying patches.
2016-09-29 09:53:40 -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
Takahito Tejima
4a4322983f Osd drawing API refactoring.
Remove DrawRegistry from osd layer and put a simple shader caching
utility into examples/common. osd layer only provides patch shader
snippet and let client configure and compile the code. Clients also
maintain the lifetime of shader object, which is preferable for the
actual application integration.

update all examples to use the new scheme.
2015-05-13 17:35:46 -07:00