RHI: Fix view type signatures in CommandList abstraction
- Unified RHICommandList interface to use RHIResourceView* for all view types - Fixed OpenGLCommandList override signatures (SetVertexBuffers, SetIndexBuffer, etc.) - Fixed D3D12CommandList by removing duplicate SetVertexBuffer methods - Updated OpenGLCommandList.cpp to match new signatures - Build and all 845 tests pass
This commit is contained in:
@@ -609,17 +609,6 @@ void OpenGLCommandList::SetPipelineState(RHIPipelineState* pipelineState) {
|
||||
}
|
||||
}
|
||||
|
||||
void OpenGLCommandList::SetVertexBuffer(uint32_t slot, RHIResourceView* buffer, uint64_t offset) {
|
||||
if (!buffer) return;
|
||||
OpenGLResourceView* view = static_cast<OpenGLResourceView*>(buffer);
|
||||
if (!view->IsValid()) return;
|
||||
|
||||
GLuint glBuffer = view->GetBuffer();
|
||||
glBindBuffer(GL_ARRAY_BUFFER, glBuffer);
|
||||
glVertexAttribPointer(slot, 4, GL_FLOAT, GL_FALSE, 0, reinterpret_cast<void*>(static_cast<uintptr_t>(offset)));
|
||||
glEnableVertexAttribArray(slot);
|
||||
}
|
||||
|
||||
void OpenGLCommandList::SetVertexBuffers(uint32_t startSlot, uint32_t count, RHIResourceView** buffers, const uint64_t* offsets, const uint32_t* strides) {
|
||||
for (uint32_t i = 0; i < count; i++) {
|
||||
if (!buffers[i]) continue;
|
||||
|
||||
Reference in New Issue
Block a user