sent from android
This commit is contained in:
45
include/geometry.hpp
Normal file
45
include/geometry.hpp
Normal file
@@ -0,0 +1,45 @@
|
||||
#ifndef GEOMETRY_HPP
|
||||
#define GEOMETRY_HPP
|
||||
|
||||
// Includes
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/matrix_transform.hpp>
|
||||
#include <glm/gtc/type_ptr.hpp>
|
||||
#include "graphics.hpp"
|
||||
|
||||
// Object class
|
||||
class Object {
|
||||
public:
|
||||
Object(
|
||||
float *vertices, unsigned int vertex_size,
|
||||
unsigned int *indices, unsigned int index_size,
|
||||
float *normals = nullptr, unsigned int normal_size = 0,
|
||||
float *texcoords = nullptr, unsigned int texcoord_size = 0
|
||||
);
|
||||
~Object();
|
||||
void draw();
|
||||
|
||||
private:
|
||||
unsigned int VAO, VBO, EBO, NBO, TBO; // Vertex Array Object, Vertex Buffer Object, Element Buffer Object, Normal Buffer Object, Texture Buffer Object
|
||||
unsigned int vertex_count;
|
||||
unsigned int index_count;
|
||||
};
|
||||
|
||||
class UntexturedObject {
|
||||
public:
|
||||
UntexturedObject(
|
||||
float *vertices, unsigned int vertex_size,
|
||||
unsigned int *indices, unsigned int index_size,
|
||||
float *normals = nullptr, unsigned int normal_size = 0,
|
||||
float *texcoords = nullptr, unsigned int texcoord_size = 0
|
||||
);
|
||||
~UntexturedObject();
|
||||
void draw();
|
||||
|
||||
private:
|
||||
unsigned int VAO, VBO, EBO, NBO, TBO; // Vertex Array Object, Vertex Buffer Object, Element Buffer Object, Normal Buffer Object, Texture Buffer Object
|
||||
unsigned int vertex_count;
|
||||
unsigned int index_count;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user