16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-09-01 19:49:19 +02:00

gl buffers refactoring

This commit is contained in:
milek7
2019-02-18 19:23:48 +01:00
parent 89cf20a251
commit 6d60fb28ea
7 changed files with 80 additions and 80 deletions

View File

@@ -12,6 +12,7 @@ http://mozilla.org/MPL/2.0/.
#include <vector>
#include "ResourceManager.h"
#include "gl/vao.h"
#include "gl/buffer.h"
namespace gfx {
@@ -188,8 +189,8 @@ private:
delete_buffer();
// members:
GLuint m_buffer { 0 }; // id of the buffer holding data on the opengl end
std::unique_ptr<gl::vao> m_vao;
std::optional<gl::buffer> m_buffer; // buffer data on the opengl end
std::optional<gl::vao> m_vao;
std::size_t m_buffercapacity{ 0 }; // total capacity of the last established buffer
chunkrecord_sequence m_chunkrecords; // helper data for all stored geometry chunks, in matching order