40ae94788e
- C++ std headers first, then third-party, then local - Apply consistently in cbt/ and scenes/
37 lines
672 B
C++
37 lines
672 B
C++
#pragma once
|
|
|
|
#include <chrono>
|
|
|
|
#include "glm/glm.hpp"
|
|
|
|
#include "cbt/scene.hpp"
|
|
#include "cbt/opengl/buffer.hpp"
|
|
#include "cbt/opengl/shader.hpp"
|
|
#include "cbt/opengl/vao.hpp"
|
|
|
|
namespace cbt::scenes {
|
|
|
|
class cube final : public scene {
|
|
public:
|
|
cube();
|
|
auto init() -> bool override;
|
|
auto update(float delta_time) -> void override;
|
|
auto render() -> void override;
|
|
|
|
private:
|
|
opengl::shader m_prog;
|
|
opengl::buffer m_vbo;
|
|
opengl::vao m_vao;
|
|
|
|
GLint m_loc_proj = -1;
|
|
GLint m_loc_view = -1;
|
|
GLint m_loc_model = -1;
|
|
|
|
std::chrono::steady_clock::time_point m_start;
|
|
|
|
auto build_mesh() -> void;
|
|
auto build_shader() -> bool;
|
|
};
|
|
|
|
}
|