need to think about VAOs
parent
ee053255ae
commit
76bd471b9b
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* <Short Description>
|
||||
* Copyright (C) 2023 Brett Terpstra
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef BLT_WITH_GRAPHICS_MODEL_H
|
||||
#define BLT_WITH_GRAPHICS_MODEL_H
|
||||
|
||||
#include <blt/math/vectors.h>
|
||||
#include <vector>
|
||||
#include <blt/gfx/gl_includes.h>
|
||||
|
||||
namespace blt::gfx
|
||||
{
|
||||
class model_data
|
||||
{
|
||||
public:
|
||||
private:
|
||||
std::vector<blt::vec3f> vertices;
|
||||
std::vector<blt::vec2f> uvs;
|
||||
std::vector<blt::vec3f> normals;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif //BLT_WITH_GRAPHICS_MODEL_H
|
|
@ -34,7 +34,7 @@ namespace blt::gfx
|
|||
size_t size_;
|
||||
GLuint location_;
|
||||
public:
|
||||
uniform_buffer(size_t size, GLuint location = 0);
|
||||
explicit uniform_buffer(size_t size, GLuint location = 0);
|
||||
uniform_buffer(void* data, size_t size, GLuint location = 0);
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* <Short Description>
|
||||
* Copyright (C) 2023 Brett Terpstra
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <blt/gfx/model.h>
|
||||
|
||||
blt::gfx::vertex_array::vertex_array()
|
||||
{
|
||||
glGenVertexArrays(1, &vaoID);
|
||||
}
|
Loading…
Reference in New Issue