evalLimit example : make sure to reset the output buffer on creation - some of the prims may not

set all the point colors (if face-varying data is missing on the test shape for instance)
and we don't want random values creeping from unset memory allocations.
This commit is contained in:
manuelk 2013-06-07 10:38:10 -07:00
parent c18cf5bff2
commit f5a7ad4cdb

View File

@ -547,12 +547,15 @@ createOsdMesh( const std::string &shape, int level, Scheme scheme=kCatmark ) {
delete g_Q;
g_Q = OsdCpuGLVertexBuffer::Create(6,nsamples);
memset( g_Q->BindCpuBuffer(), 0, nsamples*6*sizeof(float));
delete g_dQu;
g_dQu = OsdCpuGLVertexBuffer::Create(6,nsamples);
memset( g_dQu->BindCpuBuffer(), 0, nsamples*6*sizeof(float));
delete g_dQv;
g_dQv = OsdCpuGLVertexBuffer::Create(6,nsamples);
memset( g_dQv->BindCpuBuffer(), 0, nsamples*6*sizeof(float));
updateGeom();