opensubdiv_device_context_cuda.h
opensubdiv_device_context_opencl.h
opensubdiv_intern.h
- opensubdiv_partitioned.h
)
if(WITH_SUBSURF_WERROR)
#include <opensubdiv/far/stencilTable.h>
#include "opensubdiv_intern.h"
-#include "opensubdiv_partitioned.h"
#include "MEM_guardedalloc.h"
using OpenSubdiv::Far::StencilTable;
using OpenSubdiv::Osd::GLPatchTable;
-using OpenSubdiv::Osd::PartitionedMesh;
+using OpenSubdiv::Osd::Mesh;
/* CPU backend */
using OpenSubdiv::Osd::CpuGLVertexBuffer;
using OpenSubdiv::Osd::CpuEvaluator;
-typedef PartitionedMesh<CpuGLVertexBuffer,
- StencilTable,
- CpuEvaluator,
- GLPatchTable> OsdCpuMesh;
+typedef Mesh<CpuGLVertexBuffer,
+ StencilTable,
+ CpuEvaluator,
+ GLPatchTable> OsdCpuMesh;
#ifdef OPENSUBDIV_HAS_OPENMP
using OpenSubdiv::Osd::OmpEvaluator;
-typedef PartitionedMesh<CpuGLVertexBuffer,
- StencilTable,
- OmpEvaluator,
- GLPatchTable> OsdOmpMesh;
+typedef Mesh<CpuGLVertexBuffer,
+ StencilTable,
+ OmpEvaluator,
+ GLPatchTable> OsdOmpMesh;
#endif /* OPENSUBDIV_HAS_OPENMP */
#ifdef OPENSUBDIV_HAS_OPENCL
using OpenSubdiv::Osd::CLGLVertexBuffer;
using OpenSubdiv::Osd::CLStencilTable;
/* TODO(sergey): Use CLDeviceCOntext similar to OSD examples? */
-typedef PartitionedMesh<CLGLVertexBuffer,
- CLStencilTable,
- CLEvaluator,
- GLPatchTable,
- CLDeviceContext> OsdCLMesh;
+typedef Mesh<CLGLVertexBuffer,
+ CLStencilTable,
+ CLEvaluator,
+ GLPatchTable,
+ CLDeviceContext> OsdCLMesh;
static CLDeviceContext g_clDeviceContext;
#endif /* OPENSUBDIV_HAS_OPENCL */
using OpenSubdiv::Osd::CudaEvaluator;
using OpenSubdiv::Osd::CudaGLVertexBuffer;
using OpenSubdiv::Osd::CudaStencilTable;
-typedef PartitionedMesh<CudaGLVertexBuffer,
- CudaStencilTable,
- CudaEvaluator,
- GLPatchTable> OsdCudaMesh;
+typedef Mesh<CudaGLVertexBuffer,
+ CudaStencilTable,
+ CudaEvaluator,
+ GLPatchTable> OsdCudaMesh;
static CudaDeviceContext g_cudaDeviceContext;
#endif /* OPENSUBDIV_HAS_CUDA */
using OpenSubdiv::Osd::GLXFBEvaluator;
using OpenSubdiv::Osd::GLStencilTableTBO;
using OpenSubdiv::Osd::GLVertexBuffer;
-typedef PartitionedMesh<GLVertexBuffer,
- GLStencilTableTBO,
- GLXFBEvaluator,
- GLPatchTable> OsdGLSLTransformFeedbackMesh;
+typedef Mesh<GLVertexBuffer,
+ GLStencilTableTBO,
+ GLXFBEvaluator,
+ GLPatchTable> OsdGLSLTransformFeedbackMesh;
#endif /* OPENSUBDIV_HAS_GLSL_TRANSFORM_FEEDBACK */
#ifdef OPENSUBDIV_HAS_GLSL_COMPUTE
using OpenSubdiv::Osd::GLComputeEvaluator;
using OpenSubdiv::Osd::GLStencilTableSSBO;
using OpenSubdiv::Osd::GLVertexBuffer;
-typedef PartitionedMesh<GLVertexBuffer,
- GLStencilTableSSBO,
- GLComputeEvaluator,
- GLPatchTable> OsdGLSLComputeMesh;
+typedef Mesh<GLVertexBuffer,
+ GLStencilTableSSBO,
+ GLComputeEvaluator,
+ GLPatchTable> OsdGLSLComputeMesh;
#endif
struct OpenSubdiv_GLMesh *openSubdiv_createOsdGLMeshFromTopologyRefiner(
void openSubdiv_osdGLMeshDisplayPrepare(int use_osd_glsl,
int active_uv_index);
-/* Draw patches which corresponds to a given partition. */
+/* Draw specified patches. */
void openSubdiv_osdGLMeshDisplay(OpenSubdiv_GLMesh *gl_mesh,
int fill_quads,
int start_patch,
#include <opensubdiv/osd/cpuGLVertexBuffer.h>
#include <opensubdiv/osd/cpuEvaluator.h>
-#include "opensubdiv_partitioned.h"
-
//using OpenSubdiv::FarPatchTables;
using OpenSubdiv::Osd::GLMeshInterface;
-//sing OpenSubdiv::PartitionedGLMeshInterface;
extern "C" char datatoc_gpu_shader_opensubd_display_glsl[];
return program;
}
-void bindProgram(PartitionedGLMeshInterface * /*mesh*/,
+void bindProgram(GLMeshInterface * /*mesh*/,
int program)
{
glUseProgram(program);
}
}
-static GLuint preapre_patchDraw(PartitionedGLMeshInterface *mesh,
+static GLuint preapre_patchDraw(GLMeshInterface *mesh,
bool fill_quads)
{
GLint program = 0;
}
}
-static void draw_partition_patches_range(PartitionedGLMeshInterface *mesh,
+static void draw_partition_patches_range(GLMeshInterface *mesh,
GLuint program,
int start_patch,
int num_patches)
}
}
-static void draw_all_patches(PartitionedGLMeshInterface *mesh,
+static void draw_all_patches(GLMeshInterface *mesh,
GLuint program)
{
const OpenSubdiv::Osd::PatchArrayVector& patches =
int start_patch,
int num_patches)
{
- PartitionedGLMeshInterface *mesh =
- (PartitionedGLMeshInterface *)(gl_mesh->descriptor);
+ GLMeshInterface *mesh =
+ (GLMeshInterface *)(gl_mesh->descriptor);
/* Make sure all global invariants are initialized. */
openSubdiv_osdGLDisplayInit();
+++ /dev/null
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2013 Blender Foundation.
- * All rights reserved.
- *
- * Contributor(s): Sergey Sharybin
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#ifndef __OPENSUBDIV_PATITIONED_H__
-#define __OPENSUBDIV_PATITIONED_H__
-
-#include <opensubdiv/osd/glMesh.h>
-#include <opensubdiv/osd/cpuEvaluator.h>
-#include <opensubdiv/osd/glVertexBuffer.h>
-
-namespace OpenSubdiv {
-namespace OPENSUBDIV_VERSION {
-namespace Osd {
-
-/* TODO(sergey): Re-implement partitioning. */
-
-#if 0
-template <class PATCH_TABLE>
-class PartitionedMeshInterface : public MeshInterface<PATCH_TABLE> {
- typedef PATCH_TABLE PatchTable;
- typedef typename PatchTable::VertexBufferBinding VertexBufferBinding;
-
-public:
-};
-
-typedef PartitionedMeshInterface<GLPatchTable> PartitionedGLMeshInterface;
-
-#endif
-
-#if 0
-template <typename VERTEX_BUFFER,
- typename STENCIL_TABLE,
- typename EVALUATOR,
- typename PATCH_TABLE,
- typename DEVICE_CONTEXT = void>
-class PartitionedMesh : public Mesh<VERTEX_BUFFER,
- STENCIL_TABLE,
- EVALUATOR,
- PATCH_TABLE,
- DEVICE_CONTEXT>
-{
-};
-#endif
-
-#define PartitionedGLMeshInterface GLMeshInterface
-#define PartitionedMesh Mesh
-
-} /* namespace Osd */
-} /* namespace OPENSUBDIV_VERSION */
-
-using namespace OPENSUBDIV_VERSION;
-
-} /* namespace OpenSubdiv */
-
-#endif /* __OPENSUBDIV_PATITIONED_H__ */