mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2025-01-03 05:31:12 +00:00
spelling phase 4 -- examples, tutorials, regression tests
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.
This commit is contained in:
parent
408f9902f0
commit
a42dab2b64
@ -123,8 +123,8 @@ findExtensionSupportedDevice(cl_device_id *clDevices,
|
|||||||
std::string extString(extensions);
|
std::string extString(extensions);
|
||||||
delete[] extensions;
|
delete[] extensions;
|
||||||
|
|
||||||
// parse string. This is bit deficient since the extentions
|
// parse string. This is a bit deficient since the extensions
|
||||||
// is space separated.
|
// string is space separated.
|
||||||
//
|
//
|
||||||
// The actual string would be "cl_khr_d3d11_sharing"
|
// The actual string would be "cl_khr_d3d11_sharing"
|
||||||
// or "cl_nv_d3d11_sharing"
|
// or "cl_nv_d3d11_sharing"
|
||||||
|
@ -32,10 +32,10 @@ public:
|
|||||||
CudaDeviceContext();
|
CudaDeviceContext();
|
||||||
~CudaDeviceContext();
|
~CudaDeviceContext();
|
||||||
|
|
||||||
/// Initialze cuda device from the current GL context
|
/// Initialize cuda device from the current GL context
|
||||||
bool Initialize();
|
bool Initialize();
|
||||||
|
|
||||||
/// Initialze cuda device from the ID3D11Device
|
/// Initialize cuda device from the ID3D11Device
|
||||||
bool Initialize(ID3D11Device *device);
|
bool Initialize(ID3D11Device *device);
|
||||||
|
|
||||||
/// Returns true if the cuda device has already been initialized
|
/// Returns true if the cuda device has already been initialized
|
||||||
|
@ -58,7 +58,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
D3D11PtexMipmapTexture();
|
D3D11PtexMipmapTexture();
|
||||||
|
|
||||||
int _width, // widht / height / depth of the 3D texel buffer
|
int _width, // width / height / depth of the 3D texel buffer
|
||||||
_height,
|
_height,
|
||||||
_depth;
|
_depth;
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ public:
|
|||||||
/// Returns the texels texture array.
|
/// Returns the texels texture array.
|
||||||
GLuint GetTexelsTexture() const { return _texels; }
|
GLuint GetTexelsTexture() const { return _texels; }
|
||||||
|
|
||||||
/// Returns the amount of allocated memory (in byte)
|
/// Returns the amount of allocated memory (in bytes)
|
||||||
size_t GetMemoryUsage() const { return _memoryUsage; }
|
size_t GetMemoryUsage() const { return _memoryUsage; }
|
||||||
|
|
||||||
~GLPtexMipmapTexture();
|
~GLPtexMipmapTexture();
|
||||||
@ -56,7 +56,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
GLPtexMipmapTexture();
|
GLPtexMipmapTexture();
|
||||||
|
|
||||||
GLsizei _width, // widht / height / depth of the 3D texel buffer
|
GLsizei _width, // width / height / depth of the 3D texel buffer
|
||||||
_height,
|
_height,
|
||||||
_depth;
|
_depth;
|
||||||
|
|
||||||
|
@ -260,9 +260,8 @@ GetShaderVersion(){
|
|||||||
return shader_version;
|
return shader_version;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Generates the version defintion needed by the glsl shaders based on the
|
// Generates the version definition needed by the glsl shaders based on the
|
||||||
* opengl string
|
// opengl string
|
||||||
*/
|
|
||||||
std::string GetShaderVersionInclude(){
|
std::string GetShaderVersionInclude(){
|
||||||
return "#version " + GetShaderVersion() + "\n";
|
return "#version " + GetShaderVersion() + "\n";
|
||||||
}
|
}
|
||||||
@ -295,4 +294,4 @@ bool GL_ARBComputeShaderOrGL_VERSION_4_3() {
|
|||||||
|
|
||||||
#undef IS_SUPPORTED
|
#undef IS_SUPPORTED
|
||||||
|
|
||||||
} // namesapce GLUtils
|
} // namespace GLUtils
|
||||||
|
@ -63,7 +63,7 @@ void WriteScreenshot(int width, int height);
|
|||||||
|
|
||||||
bool SupportsAdaptiveTessellation();
|
bool SupportsAdaptiveTessellation();
|
||||||
|
|
||||||
// Helper function that parses the open gl version string, retrieving the
|
// Helper function that parses the opengl version string, retrieving the
|
||||||
// major and minor version from it.
|
// major and minor version from it.
|
||||||
void GetMajorMinorVersion(int *major, int *minor);
|
void GetMajorMinorVersion(int *major, int *minor);
|
||||||
|
|
||||||
|
@ -65,10 +65,10 @@
|
|||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Templated funtions able to retrieve any attribute that
|
// Templated functions able to retrieve any attribute that
|
||||||
// can be retrieved via the overloaded MPlug::getValue()
|
// can be retrieved via the overloaded MPlug::getValue()
|
||||||
// methods. Any attributes that need MPlug::getData()
|
// methods. Any attributes that need MPlug::getData()
|
||||||
// Need to use non-templated functions below
|
// need to use non-templated functions below
|
||||||
//
|
//
|
||||||
template<class T> static int
|
template<class T> static int
|
||||||
findAttribute( MFnDependencyNode &depFn, const char *attr, T *val )
|
findAttribute( MFnDependencyNode &depFn, const char *attr, T *val )
|
||||||
|
@ -111,7 +111,7 @@ PtexMipmapTextureLoader::Block::guttering(PtexMipmapTextureLoader *loader,
|
|||||||
(everything else, including boundary)
|
(everything else, including boundary)
|
||||||
Since guttering pixels are placed on the border of each
|
Since guttering pixels are placed on the border of each
|
||||||
ptex faces, it's not possible to store more than 4 pixels
|
ptex faces, it's not possible to store more than 4 pixels
|
||||||
at a coner for a reasonable interpolation.
|
at a corner for a reasonable interpolation.
|
||||||
In this case, we need to average all corner pixels and
|
In this case, we need to average all corner pixels and
|
||||||
overwrite with an averaged value, so that every face
|
overwrite with an averaged value, so that every face
|
||||||
vertex picks the same value.
|
vertex picks the same value.
|
||||||
@ -452,7 +452,7 @@ PtexMipmapTextureLoader::PtexMipmapTextureLoader(PtexTexture *ptex,
|
|||||||
_pageWidth(0), _pageHeight(0), _texelBuffer(NULL), _layoutBuffer(NULL),
|
_pageWidth(0), _pageHeight(0), _texelBuffer(NULL), _layoutBuffer(NULL),
|
||||||
_memoryUsage(0)
|
_memoryUsage(0)
|
||||||
{
|
{
|
||||||
// byte per pixel
|
// bytes per pixel
|
||||||
_bpp = ptex->numChannels() * Ptex::DataSize(ptex->dataType());
|
_bpp = ptex->numChannels() * Ptex::DataSize(ptex->dataType());
|
||||||
|
|
||||||
int numFaces = ptex->numFaces();
|
int numFaces = ptex->numFaces();
|
||||||
@ -852,7 +852,7 @@ PtexMipmapTextureLoader::optimizePacking(int maxNumPages,
|
|||||||
h = std::max(h, (int)(*it)->height);
|
h = std::max(h, (int)(*it)->height);
|
||||||
}
|
}
|
||||||
|
|
||||||
// grow the pagesize to make sure the optimization will not exceed
|
// grow the page size to make sure the optimization will not exceed
|
||||||
// the maximum number of pages allowed
|
// the maximum number of pages allowed
|
||||||
int minPageSize = 512;
|
int minPageSize = 512;
|
||||||
int maxPageSize = 4096; // XXX:should be configurable.
|
int maxPageSize = 4096; // XXX:should be configurable.
|
||||||
|
@ -19,7 +19,7 @@ ABOUT:
|
|||||||
|
|
||||||
The PNG output is not optimal; it is 20-50% larger than the file
|
The PNG output is not optimal; it is 20-50% larger than the file
|
||||||
written by a decent optimizing implementation. This library is designed
|
written by a decent optimizing implementation. This library is designed
|
||||||
for source code compactness and simplicitly, not optimal image file size
|
for source code compactness and simplicity, not optimal image file size
|
||||||
or run-time performance.
|
or run-time performance.
|
||||||
|
|
||||||
USAGE:
|
USAGE:
|
||||||
|
@ -1712,7 +1712,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmd
|
|||||||
wcex.lpszClassName = szWindowClass;
|
wcex.lpszClassName = szWindowClass;
|
||||||
RegisterClass(&wcex);
|
RegisterClass(&wcex);
|
||||||
|
|
||||||
// crete window
|
// create window
|
||||||
RECT rect = { 0, 0, g_width, g_height };
|
RECT rect = { 0, 0, g_width, g_height };
|
||||||
AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, FALSE);
|
AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, FALSE);
|
||||||
|
|
||||||
|
@ -1532,7 +1532,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmd
|
|||||||
wcex.lpszClassName = szWindowClass;
|
wcex.lpszClassName = szWindowClass;
|
||||||
RegisterClass(&wcex);
|
RegisterClass(&wcex);
|
||||||
|
|
||||||
// crete window
|
// create window
|
||||||
RECT rect = { 0, 0, g_width, g_height };
|
RECT rect = { 0, 0, g_width, g_height };
|
||||||
AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, FALSE);
|
AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, FALSE);
|
||||||
|
|
||||||
|
@ -1385,7 +1385,7 @@ int main(int argc, char ** argv)
|
|||||||
}
|
}
|
||||||
glfwMakeContextCurrent(g_window);
|
glfwMakeContextCurrent(g_window);
|
||||||
|
|
||||||
// accommocate high DPI displays (e.g. mac retina displays)
|
// accommodate high DPI displays (e.g. mac retina displays)
|
||||||
glfwGetFramebufferSize(g_window, &g_width, &g_height);
|
glfwGetFramebufferSize(g_window, &g_width, &g_height);
|
||||||
glfwSetFramebufferSizeCallback(g_window, reshape);
|
glfwSetFramebufferSizeCallback(g_window, reshape);
|
||||||
|
|
||||||
@ -1406,7 +1406,7 @@ int main(int argc, char ** argv)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
#ifdef CORE_PROFILE
|
#ifdef CORE_PROFILE
|
||||||
// clear GL errors which was generated during glewInit()
|
// clear GL errors which were generated during glewInit()
|
||||||
glGetError();
|
glGetError();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -247,10 +247,10 @@ public:
|
|||||||
DEVICE_CONTEXT *deviceContext = NULL)
|
DEVICE_CONTEXT *deviceContext = NULL)
|
||||||
: _srcDesc( /*offset*/ 0, /*length*/ 3, /*stride*/ 3),
|
: _srcDesc( /*offset*/ 0, /*length*/ 3, /*stride*/ 3),
|
||||||
_srcVaryingDesc(/*offset*/ 0, /*length*/ 3, /*stride*/ 3),
|
_srcVaryingDesc(/*offset*/ 0, /*length*/ 3, /*stride*/ 3),
|
||||||
_vertexDesc( /*offset*/ 0, /*legnth*/ 3, /*stride*/ 6),
|
_vertexDesc( /*offset*/ 0, /*length*/ 3, /*stride*/ 6),
|
||||||
_varyingDesc( /*offset*/ 3, /*legnth*/ 3, /*stride*/ 6),
|
_varyingDesc( /*offset*/ 3, /*length*/ 3, /*stride*/ 6),
|
||||||
_duDesc( /*offset*/ 0, /*legnth*/ 3, /*stride*/ 6),
|
_duDesc( /*offset*/ 0, /*length*/ 3, /*stride*/ 6),
|
||||||
_dvDesc( /*offset*/ 3, /*legnth*/ 3, /*stride*/ 6),
|
_dvDesc( /*offset*/ 3, /*length*/ 3, /*stride*/ 6),
|
||||||
_deviceContext(deviceContext) {
|
_deviceContext(deviceContext) {
|
||||||
_srcData = SRC_VERTEX_BUFFER::Create(3, numTotalVerts, _deviceContext);
|
_srcData = SRC_VERTEX_BUFFER::Create(3, numTotalVerts, _deviceContext);
|
||||||
_srcVaryingData = SRC_VERTEX_BUFFER::Create(3, numTotalVerts, _deviceContext);
|
_srcVaryingData = SRC_VERTEX_BUFFER::Create(3, numTotalVerts, _deviceContext);
|
||||||
@ -346,7 +346,7 @@ public:
|
|||||||
|
|
||||||
EVALUATOR::EvalPatches(
|
EVALUATOR::EvalPatches(
|
||||||
_srcVaryingData, _srcVaryingDesc,
|
_srcVaryingData, _srcVaryingDesc,
|
||||||
// varyingdata is interleved in vertexData.
|
// varying data is interleaved in vertexData.
|
||||||
_vertexData, _varyingDesc,
|
_vertexData, _varyingDesc,
|
||||||
_patchCoords->GetNumVertices(),
|
_patchCoords->GetNumVertices(),
|
||||||
_patchCoords,
|
_patchCoords,
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
// particle is assigned a location on the subdivision surface limit that is
|
// particle is assigned a location on the subdivision surface limit that is
|
||||||
// composed of a unique ptex face index, with a local (s,t) parametric pair.
|
// composed of a unique ptex face index, with a local (s,t) parametric pair.
|
||||||
//
|
//
|
||||||
// The system also generates an array of parametric velocties (ds, dt) for each
|
// The system also generates an array of parametric velocities (ds, dt) for each
|
||||||
// particle. An Update() function then applies the velocities to the locations and
|
// particle. An Update() function then applies the velocities to the locations and
|
||||||
// moves the points along the parametric space.
|
// moves the points along the parametric space.
|
||||||
//
|
//
|
||||||
@ -49,7 +49,7 @@
|
|||||||
// bounces it, if the edge happens to be a boundary.
|
// bounces it, if the edge happens to be a boundary.
|
||||||
//
|
//
|
||||||
// Note: currently the adjacency code does not handle 'diagonal' crossings, nor
|
// Note: currently the adjacency code does not handle 'diagonal' crossings, nor
|
||||||
// crossings between quand and non-quad faces.
|
// crossings between quad and non-quad faces.
|
||||||
//
|
//
|
||||||
class STParticles {
|
class STParticles {
|
||||||
|
|
||||||
|
@ -737,7 +737,7 @@ display() {
|
|||||||
|
|
||||||
glEnable(GL_DEPTH_TEST);
|
glEnable(GL_DEPTH_TEST);
|
||||||
|
|
||||||
// make sure that the vertex buffer is interoped back as a GL resources.
|
// make sure that the vertex buffer is interoped back as a GL resource.
|
||||||
GLuint vbo = g_mesh->BindVertexBuffer();
|
GLuint vbo = g_mesh->BindVertexBuffer();
|
||||||
|
|
||||||
glBindVertexArray(g_vao);
|
glBindVertexArray(g_vao);
|
||||||
@ -1153,7 +1153,7 @@ int main(int argc, char ** argv) {
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
#ifdef CORE_PROFILE
|
#ifdef CORE_PROFILE
|
||||||
// clear GL errors which was generated during glewInit()
|
// clear GL errors which were generated during glewInit()
|
||||||
glGetError();
|
glGetError();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -648,7 +648,7 @@ display() {
|
|||||||
|
|
||||||
bindTextures(effect);
|
bindTextures(effect);
|
||||||
|
|
||||||
// make sure that the vertex buffer is interoped back as a GL resources.
|
// make sure that the vertex buffer is interoped back as a GL resource.
|
||||||
g_mesh->BindVertexBuffer();
|
g_mesh->BindVertexBuffer();
|
||||||
|
|
||||||
glBindVertexArray(g_vao);
|
glBindVertexArray(g_vao);
|
||||||
@ -694,7 +694,7 @@ display() {
|
|||||||
g_fpsTimer.Stop();
|
g_fpsTimer.Stop();
|
||||||
double fps = 1.0/g_fpsTimer.GetElapsed();
|
double fps = 1.0/g_fpsTimer.GetElapsed();
|
||||||
g_fpsTimer.Start();
|
g_fpsTimer.Start();
|
||||||
// Avereage fps over a defined number of time samples for
|
// Average fps over a defined number of time samples for
|
||||||
// easier reading in the HUD
|
// easier reading in the HUD
|
||||||
g_fpsTimeSamples[g_currentFpsTimeSample++] = float(fps);
|
g_fpsTimeSamples[g_currentFpsTimeSample++] = float(fps);
|
||||||
if (g_currentFpsTimeSample >= NUM_FPS_TIME_SAMPLES)
|
if (g_currentFpsTimeSample >= NUM_FPS_TIME_SAMPLES)
|
||||||
@ -776,7 +776,7 @@ drawStroke(int x, int y) {
|
|||||||
|
|
||||||
glBindBufferBase(GL_UNIFORM_BUFFER, g_tessellationBinding, g_tessellationUB);
|
glBindBufferBase(GL_UNIFORM_BUFFER, g_tessellationBinding, g_tessellationUB);
|
||||||
|
|
||||||
// make sure that the vertex buffer is interoped back as a GL resources.
|
// make sure that the vertex buffer is interoped back as a GL resource.
|
||||||
g_mesh->BindVertexBuffer();
|
g_mesh->BindVertexBuffer();
|
||||||
|
|
||||||
glBindVertexArray(g_vao);
|
glBindVertexArray(g_vao);
|
||||||
@ -1153,7 +1153,7 @@ int main(int argc, char ** argv) {
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
#ifdef CORE_PROFILE
|
#ifdef CORE_PROFILE
|
||||||
// clear GL errors which was generated during glewInit()
|
// clear GL errors which were generated during glewInit()
|
||||||
glGetError();
|
glGetError();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -1117,7 +1117,7 @@ updateConstantUniformBlock() {
|
|||||||
memcpy(g_modelViewProjection, constantData.ModelViewProjectionMatrix,
|
memcpy(g_modelViewProjection, constantData.ModelViewProjectionMatrix,
|
||||||
16*sizeof(float));
|
16*sizeof(float));
|
||||||
|
|
||||||
// lighs
|
// lights
|
||||||
Constant::Light light0 = { { 0.6f, 1.0f, 0.6f, 0.0f },
|
Constant::Light light0 = { { 0.6f, 1.0f, 0.6f, 0.0f },
|
||||||
{ 0.1f, 0.1f, 0.1f, 1.0f },
|
{ 0.1f, 0.1f, 0.1f, 1.0f },
|
||||||
{ 1.7f, 1.3f, 1.1f, 1.0f },
|
{ 1.7f, 1.3f, 1.1f, 1.0f },
|
||||||
@ -1401,7 +1401,7 @@ display() {
|
|||||||
if (g_hud.IsVisible()) {
|
if (g_hud.IsVisible()) {
|
||||||
double fps = 1.0/elapsed;
|
double fps = 1.0/elapsed;
|
||||||
|
|
||||||
// Avereage fps over a defined number of time samples for
|
// Average fps over a defined number of time samples for
|
||||||
// easier reading in the HUD
|
// easier reading in the HUD
|
||||||
g_fpsTimeSamples[g_currentFpsTimeSample++] = float(fps);
|
g_fpsTimeSamples[g_currentFpsTimeSample++] = float(fps);
|
||||||
if (g_currentFpsTimeSample >= NUM_FPS_TIME_SAMPLES)
|
if (g_currentFpsTimeSample >= NUM_FPS_TIME_SAMPLES)
|
||||||
@ -1695,9 +1695,9 @@ void usage(const char *program) {
|
|||||||
printf(" -e <specularEnvMap.hdr> : specular environment map for IBL\n");
|
printf(" -e <specularEnvMap.hdr> : specular environment map for IBL\n");
|
||||||
printf(" -s <shaderfile.glsl> : custom shader file\n");
|
printf(" -s <shaderfile.glsl> : custom shader file\n");
|
||||||
printf(" -y : Y-up model\n");
|
printf(" -y : Y-up model\n");
|
||||||
printf(" -m level : max mimmap level (default=10)\n");
|
printf(" -m level : max mipmap level (default=10)\n");
|
||||||
printf(" -x <ptex limit MB> : ptex target memory size\n");
|
printf(" -x <ptex limit MB> : ptex target memory size\n");
|
||||||
printf(" --disp <scale> : Displacment scale\n");
|
printf(" --disp <scale> : Displacement scale\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
@ -635,7 +635,7 @@ display() {
|
|||||||
|
|
||||||
glEnable(GL_DEPTH_TEST);
|
glEnable(GL_DEPTH_TEST);
|
||||||
|
|
||||||
// make sure that the vertex buffer is interoped back as a GL resources.
|
// make sure that the vertex buffer is interoped back as a GL resource.
|
||||||
g_scene->BindVertexBuffer();
|
g_scene->BindVertexBuffer();
|
||||||
|
|
||||||
glBindVertexArray(g_vao);
|
glBindVertexArray(g_vao);
|
||||||
@ -1193,7 +1193,7 @@ int main(int argc, char ** argv) {
|
|||||||
glfwMakeContextCurrent(g_window);
|
glfwMakeContextCurrent(g_window);
|
||||||
GLUtils::PrintGLVersion();
|
GLUtils::PrintGLVersion();
|
||||||
|
|
||||||
// accommocate high DPI displays (e.g. mac retina displays)
|
// accommodate high DPI displays (e.g. mac retina displays)
|
||||||
glfwGetFramebufferSize(g_window, &g_width, &g_height);
|
glfwGetFramebufferSize(g_window, &g_width, &g_height);
|
||||||
glfwSetFramebufferSizeCallback(g_window, reshape);
|
glfwSetFramebufferSizeCallback(g_window, reshape);
|
||||||
|
|
||||||
@ -1212,7 +1212,7 @@ int main(int argc, char ** argv) {
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
#ifdef CORE_PROFILE
|
#ifdef CORE_PROFILE
|
||||||
// clear GL errors which was generated during glewInit()
|
// clear GL errors which were generated during glewInit()
|
||||||
glGetError();
|
glGetError();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -169,7 +169,7 @@ SceneBase::createStencilTable(Shape const *shape, int level, bool varying,
|
|||||||
|
|
||||||
_stencilTableSize = createMeshRefiner(vertexStencils, varyingStencils,
|
_stencilTableSize = createMeshRefiner(vertexStencils, varyingStencils,
|
||||||
numControlVertices);
|
numControlVertices);
|
||||||
// note: refiner takes ownerships of vertexStencils/ varyingStencils, patchTable
|
// note: refiner takes ownership of vertexStencils, varyingStencils, patchTable
|
||||||
|
|
||||||
delete refiner;
|
delete refiner;
|
||||||
return numControlVertices + vertexStencils->GetNumStencils();
|
return numControlVertices + vertexStencils->GetNumStencils();
|
||||||
|
@ -1093,7 +1093,7 @@ int main(int argc, char **argv) {
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
#ifdef CORE_PROFILE
|
#ifdef CORE_PROFILE
|
||||||
// clear GL errors which was generated during glewInit()
|
// clear GL errors which were generated during glewInit()
|
||||||
glGetError();
|
glGetError();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -85,10 +85,10 @@ OpenSubdiv::Osd::GLLegacyGregoryPatchTable *g_legacyGregoryPatchTable = NULL;
|
|||||||
|
|
||||||
|
|
||||||
/* Function to get the correct shader file based on the opengl version.
|
/* Function to get the correct shader file based on the opengl version.
|
||||||
The implementation varies depending if glew is available or not. In case
|
The implementation varies depending if glew is available or not. In case it
|
||||||
is available the capabilities are queried during execution and the correct
|
is available the capabilities are queried during execution and the correct
|
||||||
source is returned. If glew in not available during compile time the version
|
source is returned. If glew is not available the version is determined at
|
||||||
is determined*/
|
compile time */
|
||||||
static const char *shaderSource(){
|
static const char *shaderSource(){
|
||||||
#if not defined(OSD_USES_GLEW)
|
#if not defined(OSD_USES_GLEW)
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ static const char *res =
|
|||||||
;
|
;
|
||||||
//Determine the shader file to use. Since some opengl implementations
|
//Determine the shader file to use. Since some opengl implementations
|
||||||
//define that an extension is available but not an implementation
|
//define that an extension is available but not an implementation
|
||||||
//for it you cannnot trust in the glew header definitions to know that is
|
//for it you cannot trust in the glew header definitions to know that is
|
||||||
//available, but you need to query it during runtime.
|
//available, but you need to query it during runtime.
|
||||||
if (GLUtils::SupportsAdaptiveTessellation())
|
if (GLUtils::SupportsAdaptiveTessellation())
|
||||||
res = gen;
|
res = gen;
|
||||||
@ -1078,7 +1078,7 @@ display() {
|
|||||||
inverseMatrix(g_transformData.ModelViewInverseMatrix,
|
inverseMatrix(g_transformData.ModelViewInverseMatrix,
|
||||||
g_transformData.ModelViewMatrix);
|
g_transformData.ModelViewMatrix);
|
||||||
|
|
||||||
// make sure that the vertex buffer is interoped back as a GL resources.
|
// make sure that the vertex buffer is interoped back as a GL resource.
|
||||||
GLuint vbo = g_mesh->BindVertexBuffer();
|
GLuint vbo = g_mesh->BindVertexBuffer();
|
||||||
|
|
||||||
// vertex texture update for legacy gregory drawing
|
// vertex texture update for legacy gregory drawing
|
||||||
@ -1697,7 +1697,7 @@ int main(int argc, char ** argv) {
|
|||||||
glfwMakeContextCurrent(g_window);
|
glfwMakeContextCurrent(g_window);
|
||||||
GLUtils::PrintGLVersion();
|
GLUtils::PrintGLVersion();
|
||||||
|
|
||||||
// accommocate high DPI displays (e.g. mac retina displays)
|
// accommodate high DPI displays (e.g. mac retina displays)
|
||||||
glfwGetFramebufferSize(g_window, &g_width, &g_height);
|
glfwGetFramebufferSize(g_window, &g_width, &g_height);
|
||||||
glfwSetFramebufferSizeCallback(g_window, reshape);
|
glfwSetFramebufferSizeCallback(g_window, reshape);
|
||||||
|
|
||||||
@ -1716,7 +1716,7 @@ int main(int argc, char ** argv) {
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
#ifdef CORE_PROFILE
|
#ifdef CORE_PROFILE
|
||||||
// clear GL errors which was generated during glewInit()
|
// clear GL errors which were generated during glewInit()
|
||||||
glGetError();
|
glGetError();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -371,7 +371,7 @@ gatherTopology( MFnMesh & inMeshFn,
|
|||||||
// Note : Only supports 1 channel of UVs and 1 channel of color
|
// Note : Only supports 1 channel of UVs and 1 channel of color
|
||||||
if (*hasUVs || *hasColors) {
|
if (*hasUVs || *hasColors) {
|
||||||
|
|
||||||
// Create 2 face-varying channel descriptor that will hold UVs and color
|
// Create 2 face-varying channel descriptors that will hold UVs and color
|
||||||
desc.numFVarChannels = 2;
|
desc.numFVarChannels = 2;
|
||||||
channels = new Descriptor::FVarChannel[desc.numFVarChannels];
|
channels = new Descriptor::FVarChannel[desc.numFVarChannels];
|
||||||
desc.fvarChannels = channels;
|
desc.fvarChannels = channels;
|
||||||
@ -750,7 +750,7 @@ convertToMayaMeshData(OpenSubdiv::Far::TopologyRefiner const & refiner,
|
|||||||
colorArray.set(colIt, c.r, c.g, c.b, c.a);
|
colorArray.set(colIt, c.r, c.g, c.b, c.a);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Currently, the plugin only supports one color sets
|
// Currently, the plugin only supports one color set
|
||||||
int colorSetIndex = 0;
|
int colorSetIndex = 0;
|
||||||
|
|
||||||
// Assign color buffer and map the ids for each face-vertex
|
// Assign color buffer and map the ids for each face-vertex
|
||||||
|
@ -147,7 +147,7 @@ global proc string[] mayaPolySmooth(string $meshes[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Clearnup the DAG from nodes created with mayaPolySmooth
|
// Cleanup the DAG from nodes created with mayaPolySmooth
|
||||||
//
|
//
|
||||||
global proc mayaPolySmoothCleanup() {
|
global proc mayaPolySmoothCleanup() {
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ namespace {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Copies vertex data from hmesh into hbrVertexData reordered to match
|
// Copies vertex data from hbrMesh into hbrVertexData reordered to match
|
||||||
// the given refiner and subdivision level. This is used for later easy
|
// the given refiner and subdivision level. This is used for later easy
|
||||||
// comparison between the two.
|
// comparison between the two.
|
||||||
template<class T>
|
template<class T>
|
||||||
|
@ -241,7 +241,7 @@ inline bool
|
|||||||
TopologyRefinerFactory<Shape>::assignFaceVaryingTopology(
|
TopologyRefinerFactory<Shape>::assignFaceVaryingTopology(
|
||||||
Far::TopologyRefiner & refiner, Shape const & shape) {
|
Far::TopologyRefiner & refiner, Shape const & shape) {
|
||||||
|
|
||||||
// UV layyout (we only parse 1 channel)
|
// UV layout (we only parse 1 channel)
|
||||||
if (not shape.faceuvs.empty()) {
|
if (not shape.faceuvs.empty()) {
|
||||||
|
|
||||||
int nfaces = getNumBaseFaces(refiner),
|
int nfaces = getNumBaseFaces(refiner),
|
||||||
|
@ -52,7 +52,7 @@ struct Shape {
|
|||||||
ns, // specular exponent
|
ns, // specular exponent
|
||||||
ni, // optical density (1.0=no refraction, glass=1.5)
|
ni, // optical density (1.0=no refraction, glass=1.5)
|
||||||
sharpness, // reflection sharpness
|
sharpness, // reflection sharpness
|
||||||
tf[3], // transimission filter
|
tf[3], // transmission filter
|
||||||
d; // dissolve factor (1.0 = opaque)
|
d; // dissolve factor (1.0 = opaque)
|
||||||
|
|
||||||
int illum;
|
int illum;
|
||||||
|
@ -29,7 +29,7 @@ _add_possibly_cuda_executable(hbr_regression
|
|||||||
$<TARGET_OBJECTS:regression_common_obj>
|
$<TARGET_OBJECTS:regression_common_obj>
|
||||||
)
|
)
|
||||||
|
|
||||||
# This is waht we "should" be using but we need to escape the backslash and cmake
|
# This is what we "should" be using but we need to escape the backslash and cmake
|
||||||
# regex doesn't allow that apparently
|
# regex doesn't allow that apparently
|
||||||
#file(TO_NATIVE_PATH "${PROJECT_SOURCE_DIR}/regression/hbr_regression/baseline/" HBR_BASELINE_DIR)
|
#file(TO_NATIVE_PATH "${PROJECT_SOURCE_DIR}/regression/hbr_regression/baseline/" HBR_BASELINE_DIR)
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Tutorial description:
|
// Tutorial description:
|
||||||
//
|
//
|
||||||
// This tutorial presents in a very succint way the requisite steps to
|
// This tutorial presents in a very succinct way the requisite steps to
|
||||||
// instantiate and refine a mesh with Far from simple topological data.
|
// instantiate and refine a mesh with Far from simple topological data.
|
||||||
//
|
//
|
||||||
|
|
||||||
@ -124,7 +124,7 @@ int main(int, char **) {
|
|||||||
|
|
||||||
int maxlevel = 2;
|
int maxlevel = 2;
|
||||||
|
|
||||||
// Uniformly refine the topolgy up to 'maxlevel'
|
// Uniformly refine the topology up to 'maxlevel'
|
||||||
refiner->RefineUniform(Far::TopologyRefiner::UniformOptions(maxlevel));
|
refiner->RefineUniform(Far::TopologyRefiner::UniformOptions(maxlevel));
|
||||||
|
|
||||||
|
|
||||||
|
@ -430,7 +430,7 @@ int main(int, char **) {
|
|||||||
|
|
||||||
int maxlevel = 5;
|
int maxlevel = 5;
|
||||||
|
|
||||||
// Uniformly refine the topolgy up to 'maxlevel'
|
// Uniformly refine the topology up to 'maxlevel'
|
||||||
refiner->RefineUniform(Far::TopologyRefiner::UniformOptions(maxlevel));
|
refiner->RefineUniform(Far::TopologyRefiner::UniformOptions(maxlevel));
|
||||||
|
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ getSdcOptions( OpenSubdiv::HbrMesh<T> const & mesh, OpenSubdiv::SdcOptions * opt
|
|||||||
// uniquely. To remedy the problem, the converter uses a std::map to connect
|
// uniquely. To remedy the problem, the converter uses a std::map to connect
|
||||||
// Hbr's half-edge pointers to unique indices.
|
// Hbr's half-edge pointers to unique indices.
|
||||||
//
|
//
|
||||||
// This remapping code is provided as an example of efficient implementaiton of
|
// This remapping code is provided as an example of efficient implementation of
|
||||||
// the translation from an arbitrary topo rep to Vtr.
|
// the translation from an arbitrary topo rep to Vtr.
|
||||||
//
|
//
|
||||||
// Even though Vtr is capable of re-generating edge and vertex relationships on
|
// Even though Vtr is capable of re-generating edge and vertex relationships on
|
||||||
@ -178,7 +178,7 @@ public:
|
|||||||
return (int)_edgeset.size();
|
return (int)_edgeset.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns a point to the Hbr halfege of index 'idx'
|
// Returns a pointer to the Hbr halfege of index 'idx'
|
||||||
OpenSubdiv::HbrHalfedge<T> const * GetEdge(int idx) const {
|
OpenSubdiv::HbrHalfedge<T> const * GetEdge(int idx) const {
|
||||||
return _edgeids[idx];
|
return _edgeids[idx];
|
||||||
}
|
}
|
||||||
|
@ -124,7 +124,7 @@ int main(int, char **) {
|
|||||||
|
|
||||||
Far::TopologyRefiner * refiner = createFarTopologyRefiner();
|
Far::TopologyRefiner * refiner = createFarTopologyRefiner();
|
||||||
|
|
||||||
// Uniformly refine the topolgy up to 'maxlevel'
|
// Uniformly refine the topology up to 'maxlevel'
|
||||||
refiner->RefineUniform(Far::TopologyRefiner::UniformOptions(maxlevel));
|
refiner->RefineUniform(Far::TopologyRefiner::UniformOptions(maxlevel));
|
||||||
|
|
||||||
// Allocate buffers for vertex primvar data.
|
// Allocate buffers for vertex primvar data.
|
||||||
@ -140,7 +140,7 @@ int main(int, char **) {
|
|||||||
int nTotalVerts = refiner->GetNumVerticesTotal();
|
int nTotalVerts = refiner->GetNumVerticesTotal();
|
||||||
int nTempVerts = nTotalVerts - nCoarseVerts - nFineVerts;
|
int nTempVerts = nTotalVerts - nCoarseVerts - nFineVerts;
|
||||||
|
|
||||||
// Allocate and intialize the primvar data for the original coarse vertices:
|
// Allocate and initialize the primvar data for the original coarse vertices:
|
||||||
std::vector<VertexPosition> coarsePosBuffer(nCoarseVerts);
|
std::vector<VertexPosition> coarsePosBuffer(nCoarseVerts);
|
||||||
std::vector<VertexColor> coarseClrBuffer(nCoarseVerts);
|
std::vector<VertexColor> coarseClrBuffer(nCoarseVerts);
|
||||||
|
|
||||||
|
@ -81,11 +81,11 @@ private:
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Face-varying container implementation.
|
// Face-varying container implementation.
|
||||||
//
|
//
|
||||||
// We are using a uv texture layout as a 'face-varying' primtiive variable
|
// We are using a uv texture layout as a 'face-varying' primitive variable
|
||||||
// attribute. Because face-varying data is specified 'per-face-per-vertex',
|
// attribute. Because face-varying data is specified 'per-face-per-vertex',
|
||||||
// we cannot use the same container that we use for 'vertex' or 'varying'
|
// we cannot use the same container that we use for 'vertex' or 'varying'
|
||||||
// data. We specify a new container, which only carries (u,v) coordinates.
|
// data. We specify a new container, which only carries (u,v) coordinates.
|
||||||
// Similarly to our 'Vertex' container, we add a minimaliztic interpolation
|
// Similarly to our 'Vertex' container, we add a minimalistic interpolation
|
||||||
// interface with a 'Clear()' and 'AddWithWeight()' methods.
|
// interface with a 'Clear()' and 'AddWithWeight()' methods.
|
||||||
//
|
//
|
||||||
struct FVarVertexUV {
|
struct FVarVertexUV {
|
||||||
@ -248,7 +248,7 @@ int main(int, char **) {
|
|||||||
Far::TopologyRefinerFactory<Descriptor>::Create(desc,
|
Far::TopologyRefinerFactory<Descriptor>::Create(desc,
|
||||||
Far::TopologyRefinerFactory<Descriptor>::Options(type, options));
|
Far::TopologyRefinerFactory<Descriptor>::Options(type, options));
|
||||||
|
|
||||||
// Uniformly refine the topolgy up to 'maxlevel'
|
// Uniformly refine the topology up to 'maxlevel'
|
||||||
// note: fullTopologyInLastLevel must be true to work with face-varying data
|
// note: fullTopologyInLastLevel must be true to work with face-varying data
|
||||||
{
|
{
|
||||||
Far::TopologyRefiner::UniformOptions refineOptions(maxlevel);
|
Far::TopologyRefiner::UniformOptions refineOptions(maxlevel);
|
||||||
|
@ -111,7 +111,7 @@ int main(int, char **) {
|
|||||||
Far::TopologyRefiner * refiner = createTopologyRefiner();
|
Far::TopologyRefiner * refiner = createTopologyRefiner();
|
||||||
|
|
||||||
|
|
||||||
// Uniformly refine the topolgy up to 'maxlevel'.
|
// Uniformly refine the topology up to 'maxlevel'.
|
||||||
int maxlevel = 3;
|
int maxlevel = 3;
|
||||||
refiner->RefineUniform(Far::TopologyRefiner::UniformOptions(maxlevel));
|
refiner->RefineUniform(Far::TopologyRefiner::UniformOptions(maxlevel));
|
||||||
|
|
||||||
|
@ -113,11 +113,11 @@ static Far::TopologyRefiner * createTopologyRefiner();
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
int main(int, char **) {
|
int main(int, char **) {
|
||||||
|
|
||||||
// Generate some FarTopologyRefiner (see far_tutorial_0 for details).
|
// Generate a FarTopologyRefiner (see far_tutorial_0 for details).
|
||||||
Far::TopologyRefiner * refiner = createTopologyRefiner();
|
Far::TopologyRefiner * refiner = createTopologyRefiner();
|
||||||
|
|
||||||
|
|
||||||
// Uniformly refine the topolgy up to 'maxlevel'.
|
// Uniformly refine the topology up to 'maxlevel'.
|
||||||
int maxlevel = 4;
|
int maxlevel = 4;
|
||||||
refiner->RefineUniform(Far::TopologyRefiner::UniformOptions(maxlevel));
|
refiner->RefineUniform(Far::TopologyRefiner::UniformOptions(maxlevel));
|
||||||
|
|
||||||
@ -159,7 +159,7 @@ int main(int, char **) {
|
|||||||
// Allocate varying primvar buffer (1 stencil for each vertex)
|
// Allocate varying primvar buffer (1 stencil for each vertex)
|
||||||
std::vector<Vertex> varyingBuffer(varyingStencils->GetNumStencils());
|
std::vector<Vertex> varyingBuffer(varyingStencils->GetNumStencils());
|
||||||
|
|
||||||
// Use the a per-vertex array of RGB colors as 'varying' primvar data
|
// Use per-vertex array of RGB colors as 'varying' primvar data
|
||||||
Vertex * varyingCVs = reinterpret_cast<Vertex *>(g_colors);
|
Vertex * varyingCVs = reinterpret_cast<Vertex *>(g_colors);
|
||||||
|
|
||||||
delete refiner;
|
delete refiner;
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
//
|
//
|
||||||
// This tutorial shows how to create and manipulate table of cascading stencils.
|
// This tutorial shows how to create and manipulate table of cascading stencils.
|
||||||
//
|
//
|
||||||
// We initalize a Far::TopologyRefiner initalized with a cube and apply uniform
|
// We initialize a Far::TopologyRefiner with a cube and apply uniform
|
||||||
// refinement. We then use a Far::StencilTableFactory to generate a stencil
|
// refinement. We then use a Far::StencilTableFactory to generate a stencil
|
||||||
// table. We set the factory Options to not factorize intermediate levels,
|
// table. We set the factory Options to not factorize intermediate levels,
|
||||||
// thus giving a table of "cascading" stencils.
|
// thus giving a table of "cascading" stencils.
|
||||||
@ -122,15 +122,15 @@ static Far::TopologyRefiner * createTopologyRefiner();
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
int main(int, char **) {
|
int main(int, char **) {
|
||||||
|
|
||||||
// Generate some FarTopologyRefiner (see far_tutorial_0 for details).
|
// Generate a FarTopologyRefiner (see far_tutorial_0 for details).
|
||||||
Far::TopologyRefiner * refiner = createTopologyRefiner();
|
Far::TopologyRefiner * refiner = createTopologyRefiner();
|
||||||
|
|
||||||
// Uniformly refine the topolgy up to 'maxlevel'.
|
// Uniformly refine the topology up to 'maxlevel'.
|
||||||
int maxlevel = 4;
|
int maxlevel = 4;
|
||||||
refiner->RefineUniform(Far::TopologyRefiner::UniformOptions(maxlevel));
|
refiner->RefineUniform(Far::TopologyRefiner::UniformOptions(maxlevel));
|
||||||
|
|
||||||
// Use the FarStencilTable factory to create cascading stencil table
|
// Use the FarStencilTable factory to create cascading stencil table
|
||||||
// note: we want stencils for the each refinement level
|
// note: we want stencils for each refinement level
|
||||||
// "cascade" mode is achieved by setting "factorizeIntermediateLevels"
|
// "cascade" mode is achieved by setting "factorizeIntermediateLevels"
|
||||||
// to false
|
// to false
|
||||||
Far::StencilTableFactory::Options options;
|
Far::StencilTableFactory::Options options;
|
||||||
@ -145,7 +145,7 @@ int main(int, char **) {
|
|||||||
|
|
||||||
Vertex * destVerts = &vertexBuffer[0];
|
Vertex * destVerts = &vertexBuffer[0];
|
||||||
|
|
||||||
int start = 0, end = 0; // stencils batches for each level of subdivision
|
int start = 0, end = 0; // stencil batches for each level of subdivision
|
||||||
for (int level=0; level<maxlevel; ++level) {
|
for (int level=0; level<maxlevel; ++level) {
|
||||||
|
|
||||||
int nverts = refiner->GetLevel(level+1).GetNumVertices();
|
int nverts = refiner->GetLevel(level+1).GetNumVertices();
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Tutorial description:
|
// Tutorial description:
|
||||||
//
|
//
|
||||||
// This tutorial presents in a very succint way the requisite steps to
|
// This tutorial presents in a very succinct way the requisite steps to
|
||||||
// instantiate an Hbr mesh from simple topological data.
|
// instantiate an Hbr mesh from simple topological data.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
// Tutorial description:
|
// Tutorial description:
|
||||||
//
|
//
|
||||||
// This tutorial shows how to safely create Hbr meshes from arbitrary topology.
|
// This tutorial shows how to safely create Hbr meshes from arbitrary topology.
|
||||||
// Because Hbr is a half-edge data structure, it cannot represeent non-manifold
|
// Because Hbr is a half-edge data structure, it cannot represent non-manifold
|
||||||
// topology. Ensuring that the geometry used is manifold is a requirement to use
|
// topology. Ensuring that the geometry used is manifold is a requirement to use
|
||||||
// Hbr safely. This tutorial presents some simple tests to detect inappropriate
|
// Hbr safely. This tutorial presents some simple tests to detect inappropriate
|
||||||
// topology.
|
// topology.
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
// Tutorial description:
|
// Tutorial description:
|
||||||
//
|
//
|
||||||
// This tutorial shows how to subdivide uniformly a simple Hbr mesh. We are
|
// This tutorial shows how to subdivide uniformly a simple Hbr mesh. We are
|
||||||
// building upon previous turtorials and assuming a fully instantiated mesh:
|
// building upon previous tutorials and assuming a fully instantiated mesh:
|
||||||
// we start with an HbrMesh pointer initialized from the same pyramid shape
|
// we start with an HbrMesh pointer initialized from the same pyramid shape
|
||||||
// used in hbr_tutorial_0.
|
// used in hbr_tutorial_0.
|
||||||
//
|
//
|
||||||
@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// For this tutorial, we have to flesh the Vertex class further. Note that now
|
// For this tutorial, we have to flesh out the Vertex class further. Note that now
|
||||||
// the copy constructor, Clear() and AddwithWeight() methods have been
|
// the copy constructor, Clear() and AddwithWeight() methods have been
|
||||||
// implemented to interpolate our float3 position data.
|
// implemented to interpolate our float3 position data.
|
||||||
//
|
//
|
||||||
@ -113,7 +113,7 @@ int main(int, char **) {
|
|||||||
|
|
||||||
// Total number of faces in the mesh, across all levels
|
// Total number of faces in the mesh, across all levels
|
||||||
//
|
//
|
||||||
// Mote: this function iterates over the list of faces and can be slow
|
// Note: this function iterates over the list of faces and can be slow
|
||||||
int nfaces = hmesh->GetNumFaces();
|
int nfaces = hmesh->GetNumFaces();
|
||||||
|
|
||||||
if (level==(maxlevel-1)) {
|
if (level==(maxlevel-1)) {
|
||||||
@ -126,7 +126,7 @@ int main(int, char **) {
|
|||||||
|
|
||||||
Hface * f = hmesh->GetFace(face);
|
Hface * f = hmesh->GetFace(face);
|
||||||
|
|
||||||
// Mote : hole tags would have to be dealt with here.
|
// Note: hole tags would have to be dealt with here.
|
||||||
f->Refine();
|
f->Refine();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ createTopologyRefiner(int maxlevel) {
|
|||||||
Far::TopologyRefinerFactory<Descriptor>::Create(desc,
|
Far::TopologyRefinerFactory<Descriptor>::Create(desc,
|
||||||
Far::TopologyRefinerFactory<Descriptor>::Options(type, options));
|
Far::TopologyRefinerFactory<Descriptor>::Options(type, options));
|
||||||
|
|
||||||
// Uniformly refine the topolgy up to 'maxlevel'
|
// Uniformly refine the topology up to 'maxlevel'
|
||||||
refiner->RefineUniform(Far::TopologyRefiner::UniformOptions(maxlevel));
|
refiner->RefineUniform(Far::TopologyRefiner::UniformOptions(maxlevel));
|
||||||
|
|
||||||
return refiner;
|
return refiner;
|
||||||
|
Loading…
Reference in New Issue
Block a user