mirror of
https://github.com/Linloir/SceneEditor.git
synced 2025-12-17 15:38:11 +08:00
30 lines
773 B
C++
30 lines
773 B
C++
#pragma once
|
|
|
|
#include <vector>
|
|
|
|
#include "vertex.h"
|
|
#include "texture.h"
|
|
#include "vao.h"
|
|
|
|
class Mesh {
|
|
private:
|
|
std::vector<Vertex> _vertices;
|
|
std::vector<unsigned int> _indices;
|
|
std::vector<Texture> _textures;
|
|
|
|
VertexArrayObject _vao;
|
|
|
|
public:
|
|
Mesh(std::vector<Vertex> vertices, std::vector<unsigned int> indices, std::vector<Texture> textures);
|
|
Mesh(std::vector<Vertex> vertices, std::vector<Texture> textures);
|
|
|
|
public:
|
|
inline std::vector<Vertex> vertices() const { return _vertices; }
|
|
inline std::vector<unsigned int> indices() const { return _indices; }
|
|
inline std::vector<Texture> textures() const { return _textures; }
|
|
|
|
inline VertexArrayObject vao() const { return _vao; }
|
|
|
|
public:
|
|
void render(ShaderProgram shader);
|
|
}; |