BindVertexbuffer

stride 的意思是 inputstream.layout 的大小

比如 description是 pos uv normal

stride 就是一组pos uv normal的大小

ns  里面

nvn::BufferAddress StartAdress = m_CurrentVertexBuffer[i]->GetAddress(m_CurrentVertexBufferOffset[i]);//m_CurrentVertexBuffer[i]+m_CurrentVertexBufferOffset[i]
size_t BufferSize = m_CurrentVertexBuffer[i]->GetSize() - m_CurrentVertexBufferOffset[i] * sizeof(uint8_t); //@@cz:
m_Commandbuffer->BindVertexBuffer(i , StartAdress, BufferSize);
m_CurrentVertexStreamState[i].SetStride(m_CurrentVertexBufferStrides[i]);//i is slot num

BindVertexBuffer的参数 比dx多了个buffer size是不是可以绑一小块 不用像这样绑这么大 上文绑的是 offset之后所有的

时间: 2024-10-10 14:24:48

BindVertexbuffer的相关文章