fix not creating a vertex buffer on the GPU if a graphics device object is passed
This commit is contained in:
parent
45579fdf7f
commit
52d9989224
|
@ -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);
|
||||
|
|
Reference in a new issue