Palm-Studios / sh3redux

SILENT HILL 3 Engine Remake in OpenGL and C++
GNU General Public License v3.0
164 stars 15 forks source link

Major Simplification of OpenGL structures #143

Closed Quaker762 closed 5 years ago

Quaker762 commented 5 years ago

Major refactor of OpenGL VAO and VBO structures. The new API is much easier to use and has been simplified. Drawing now involves just having a VAO and setting the VBOs as attributes for the shader.

We currently store the data passed to the GPU in system RAM, effectively doubling our storage requirements. This is mostly to aid in using a debugger like GDB instead of needing to use something like CodeXL. This could be disabled with a compiler preprocessor macro.

glvertexbuffer could probably be a template class, however at the present moment there is not need, because we simply need to upload the data to the GPU, and there is no real emphasis on modifying it on the CPU side.