mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-24 12:30:17 +00:00
- fix function calls incompatible w/ Maya 2014
- change permissions on cudaUtil.cpp, OpenSubdivShader.cpp fixes #131
This commit is contained in:
parent
afc7b9b9a8
commit
c3fba1708c
0
examples/mayaViewer/OpenSubdivShader.cpp
Executable file → Normal file
0
examples/mayaViewer/OpenSubdivShader.cpp
Executable file → Normal file
22
examples/mayaViewer/OpenSubdivShaderOverride.cpp
Executable file → Normal file
22
examples/mayaViewer/OpenSubdivShaderOverride.cpp
Executable file → Normal file
@ -371,11 +371,19 @@ public:
|
||||
OsdBufferGenerator() {}
|
||||
virtual ~OsdBufferGenerator() {}
|
||||
|
||||
#if MAYA_API_VERSION >= 201400
|
||||
virtual bool getSourceIndexing(
|
||||
const MObject &object,
|
||||
MHWRender::MComponentDataIndexing &sourceIndexing) const
|
||||
{
|
||||
MFnMesh mesh(object);
|
||||
#else
|
||||
virtual bool getSourceIndexing(
|
||||
const MDagPath &dagPath,
|
||||
MHWRender::MComponentDataIndexing &sourceIndexing) const
|
||||
{
|
||||
MFnMesh mesh(dagPath.node());
|
||||
#endif
|
||||
|
||||
MIntArray vertexCount, vertexList;
|
||||
mesh.getVertices(vertexCount, vertexList);
|
||||
@ -389,28 +397,34 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
#if MAYA_API_VERSION >= 201400
|
||||
virtual bool getSourceStreams(const MObject &object,
|
||||
MStringArray &) const
|
||||
#else
|
||||
virtual bool getSourceStreams(const MDagPath &dagPath,
|
||||
MStringArray &) const
|
||||
#endif
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#if MAYA_API_VERSION >= 201350
|
||||
#if MAYA_API_VERSION >= 201400
|
||||
virtual void createVertexStream(
|
||||
const MDagPath &dagPath,
|
||||
const MObject &object,
|
||||
MVertexBuffer &vertexBuffer,
|
||||
const MComponentDataIndexing &targetIndexing,
|
||||
const MComponentDataIndexing &,
|
||||
const MVertexBufferArray &) const
|
||||
{
|
||||
#else
|
||||
MFnMesh meshFn(object);
|
||||
#elif MAYA_API_VERSION >= 201350
|
||||
virtual void createVertexStream(
|
||||
const MDagPath &dagPath, MVertexBuffer &vertexBuffer,
|
||||
const MComponentDataIndexing &targetIndexing) const
|
||||
{
|
||||
MFnMesh meshFn(dagPath);
|
||||
#endif
|
||||
|
||||
MFnMesh meshFn(dagPath);
|
||||
int nVertices = meshFn.numVertices();
|
||||
MFloatPointArray points;
|
||||
meshFn.getPoints(points);
|
||||
|
0
examples/mayaViewer/cudaUtil.cpp
Executable file → Normal file
0
examples/mayaViewer/cudaUtil.cpp
Executable file → Normal file
Loading…
Reference in New Issue
Block a user