codeonwort / pathosengine

OpenGL Rendering Engine for Study
MIT License
20 stars 0 forks source link

Implement buffer pool for dynamic suballocation (v0.6.10) #53

Closed codeonwort closed 7 months ago

codeonwort commented 7 months ago
  1. Implement Buffer class that generalizes every buffer usage.

    • Create a big GL buffer and suballocate as requested. Deallocation is supported, therefore it implements dynamic allocation mechanism.
    • Replace ShaderStorageBuffer class with Buffer.
    • Create 3 global buffer pools for position, varying, and index data in the RenderDevice class.
  2. Refactor MeshGeometry class.

    • every MeshGeometry instance now need to specify its vertex layout on initialization.
    • Reduce the number of VAOs created.
    • Support 16-bit index buffer.
    • Suballocate vertex/index buffer from global buffer pools. The number of VBOs in World_RC1 on exit has decreased from 719 to 10.