Skip to content

Commit

Permalink
Revert edits to W3DBufferManager::Allocate_Slot_Storage
Browse files Browse the repository at this point in the history
  • Loading branch information
xezon committed Feb 10, 2024
1 parent a059620 commit e97d744
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/platform/w3dengine/client/shadow/w3dbuffermanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,18 +329,17 @@ W3DBufferManager::W3DVertexBufferSlot *W3DBufferManager::Allocate_Slot_Storage(V

W3DVertexBuffer *buf = m_W3DVertexBuffers[fvf_type];

// #TODO investigate
// TODO investigate
// We allocate count for vertex buffer but size and start index is set by the original size
// As it stands this doesn't seem to make any sense.
// A 4 byte alignment on the buffer would be understandable but this...
// As it stands this doesn't seem to make any sense, i'd understand a 4 byte alignement on the buffer but this...
int vb_size = std::max(8192, size);

buf->m_DX8VertexBuffer =
new DX8VertexBufferClass(Get_DX8_Format(fvf_type), vb_size, DX8VertexBufferClass::USAGE_DEFAULT, 0);
buf->m_format = fvf_type;
buf->m_startFreeIndex = size;
buf->m_size = vb_size;
// #BUGFIX Original didn't clear this
// BUGFIX Original didn't clear this
buf->m_renderTaskList = nullptr;

W3DVertexBufferSlot *slot = &m_W3DVertexBufferEmptySlots[m_numEmptyVertexSlotsAllocated++];
Expand Down

0 comments on commit e97d744

Please sign in to comment.