fix not creating a vertex buffer on the GPU if a graphics device object is passed

This commit is contained in:
Gered 2013-04-03 12:29:05 -04:00
parent 45579fdf7f
commit 52d9989224

View file

@ -63,6 +63,9 @@ bool VertexBuffer::Initialize(GraphicsDevice *graphicsDevice, const VERTEX_ATTRI
Resize(numVertices);
if (graphicsDevice != NULL)
CreateOnGpu();
return true;
}
@ -98,6 +101,9 @@ bool VertexBuffer::Initialize(GraphicsDevice *graphicsDevice, const VertexBuffer
{
Resize(source->GetNumElements());
Copy(source, 0);
if (graphicsDevice != NULL)
CreateOnGpu();
}
SAFE_DELETE_ARRAY(attribs);