feat: replace triangle test by cube

This commit is contained in:
2026-02-15 20:10:17 +01:00
parent a674c391a8
commit ff7a82f646
13 changed files with 149 additions and 117 deletions

View File

@@ -5,6 +5,8 @@
#include "glm/ext/matrix_float4x4.hpp"
#include "glm/ext/vector_float3.hpp"
namespace core
{
class Camera
{
private:
@@ -63,5 +65,5 @@ class Camera
void setFov(float newFov);
void setPosition(const glm::vec3& newPosition);
};
} // namespace core
#endif

View File

@@ -29,6 +29,8 @@ class Shader
// Activates the shader program for rendering
// All subsequent draw calls will use this program
void use() const;
GLuint getId() const { return id; }
};
} // namespace core

View File

@@ -1,14 +1,14 @@
#ifndef CUBE_HPP
#define CUBE_HPP
// #ifndef CUBE_HPP
// #define CUBE_HPP
#include "glm/ext/vector_float3.hpp"
#include "shape.hpp"
// #include "glm/ext/vector_float3.hpp"
// #include "shape.hpp"
class Cube : public Shape
{
public:
Cube(Camera &camera, glm::vec3 pos, const char *texture);
void render(int width, int height) override;
};
// class Cube : public Shape
// {
// public:
// Cube(Camera &camera, glm::vec3 pos, const char *texture);
// void render(int width, int height) override;
// };
#endif
// #endif