mirror of
https://github.com/guezoloic/LearnOpenGL.git
synced 2026-03-28 18:03:44 +00:00
feat: replace triangle test by cube
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
22
inc/cube.hpp
22
inc/cube.hpp
@@ -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
|
||||
Reference in New Issue
Block a user