16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 02:29:17 +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

@@ -2,6 +2,7 @@
#include "gl/vao.h"
#include "gl/shader.h"
#include "gl/buffer.h"
#include <memory>
// sky gradient based on "A practical analytic model for daylight"
@@ -48,9 +49,6 @@ private:
std::vector<std::uint16_t> m_indices;
// std::vector<float3> m_normals;
std::vector<glm::vec3> m_colours;
GLuint m_vertexbuffer{ (GLuint)-1 };
GLuint m_indexbuffer{ (GLuint)-1 };
GLuint m_coloursbuffer{ (GLuint)-1 };
static float m_distributionluminance[ 5 ][ 2 ];
static float m_distributionxcomp[ 5 ][ 2 ];
@@ -65,6 +63,9 @@ private:
float PerezFunctionO1( float Perezcoeffs[ 5 ], const float Thetasun, const float Zenithval );
float PerezFunctionO2( float Perezcoeffs[ 5 ], const float Icostheta, const float Gamma, const float Cosgamma2, const float Zenithval );
std::unique_ptr<gl::program> m_shader;
std::unique_ptr<gl::vao> m_vao;
std::optional<gl::buffer> m_vertexbuffer;
std::optional<gl::buffer> m_indexbuffer;
std::optional<gl::buffer> m_coloursbuffer;
std::optional<gl::program> m_shader;
std::optional<gl::vao> m_vao;
};