sent from android

This commit is contained in:
2025-07-30 13:14:22 +01:00
parent 15aa9d54ea
commit a03c7c85b8
25 changed files with 2243 additions and 203 deletions

45
include/geometry.hpp Normal file
View 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