mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
fix volatile buffer
change debugdraw to use volatile fix volatile buffer wraparound
This commit is contained in:
parent
d45c3794a5
commit
267986a289
2 changed files with 8 additions and 8 deletions
|
|
@ -245,7 +245,7 @@ void duDebugDrawTorque::end()
|
|||
box.maxExtents.set(-F32_MAX, -F32_MAX, -F32_MAX);
|
||||
|
||||
GFXVertexBufferHandle<GFXVertexPCT> buffer;
|
||||
buffer.set(GFX, batchVerts, GFXBufferTypeStatic);
|
||||
buffer.set(GFX, batchVerts, GFXBufferTypeVolatile);
|
||||
GFXVertexPCT* verts = buffer.lock();
|
||||
|
||||
for (U32 i = 0; i < linesThisBatch * vertsPerLine; ++i)
|
||||
|
|
@ -258,7 +258,7 @@ void duDebugDrawTorque::end()
|
|||
|
||||
// --- Build index buffer
|
||||
GFXPrimitiveBufferHandle pb;
|
||||
pb.set(GFX, linesThisBatch * 2, linesThisBatch, GFXBufferTypeStatic);
|
||||
pb.set(GFX, linesThisBatch * 2, linesThisBatch, GFXBufferTypeVolatile);
|
||||
U16* indices = nullptr;
|
||||
pb.lock(&indices);
|
||||
|
||||
|
|
@ -303,7 +303,7 @@ void duDebugDrawTorque::end()
|
|||
box.maxExtents.set(-F32_MAX, -F32_MAX, -F32_MAX);
|
||||
|
||||
GFXVertexBufferHandle<GFXVertexPCT> buffer;
|
||||
buffer.set(GFX, batchVerts, GFXBufferTypeStatic);
|
||||
buffer.set(GFX, batchVerts, GFXBufferTypeVolatile);
|
||||
GFXVertexPCT* verts = buffer.lock();
|
||||
|
||||
for (U32 i = 0; i < trisThisBatch * vertsPerTri; ++i)
|
||||
|
|
@ -317,7 +317,7 @@ void duDebugDrawTorque::end()
|
|||
|
||||
// --- Build index buffer
|
||||
GFXPrimitiveBufferHandle pb;
|
||||
pb.set(GFX, trisThisBatch*3, trisThisBatch, GFXBufferTypeStatic);
|
||||
pb.set(GFX, trisThisBatch*3, trisThisBatch, GFXBufferTypeVolatile);
|
||||
U16* indices = nullptr;
|
||||
pb.lock(&indices);
|
||||
|
||||
|
|
@ -363,7 +363,7 @@ void duDebugDrawTorque::end()
|
|||
box.maxExtents.set(-F32_MAX, -F32_MAX, -F32_MAX);
|
||||
|
||||
GFXVertexBufferHandle<GFXVertexPCT> buffer;
|
||||
buffer.set(GFX, batchVerts, GFXBufferTypeStatic);
|
||||
buffer.set(GFX, batchVerts, GFXBufferTypeVolatile);
|
||||
GFXVertexPCT* verts = buffer.lock();
|
||||
|
||||
U32 outIdx = 0;
|
||||
|
|
@ -383,7 +383,7 @@ void duDebugDrawTorque::end()
|
|||
buffer.unlock();
|
||||
|
||||
GFXPrimitiveBufferHandle pb;
|
||||
pb.set(GFX, batchIndices, quadsThisBatch*2, GFXBufferTypeStatic);
|
||||
pb.set(GFX, batchIndices, quadsThisBatch*2, GFXBufferTypeVolatile);
|
||||
U16* indices = nullptr;
|
||||
pb.lock(&indices);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue