```
#include "application.hpp"
#include <GLFW/glfw3.h>
#include <memory>

Application::Application() : window(nullptr), width(800), 
    height(600), title("App") {}

bool Application::init() {
    if (!glfwInit()) {
        fprintf(stderr, "Failed to init GLFW!\n");
        return false;
    }
    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
    glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);

    window = glfwCreateWindow(width, height, title, NULL, NULL);
    if (!window) {
        fprintf(stderr, "Failed to create window!\n");
        return false;
    }

    glfwMakeContextCurrent(window);

    glEnable(GL_DEPTH_TEST);
    glViewport(0, 0, width, height);

    if (glewInit() != GLEW_OK) {
        fprintf(stderr, "Failed to init GLEW!\n");

    }

    scene = std::make_unique<Scene>(window);

    return true;
}

void Application::run() {
    timeBuf1 = glfwGetTime();
    while (!glfwWindowShouldClose(window)) {
        glClearColor(0.1f, 0.1f, 0.1f, 1.0f);
        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
        
        timeBuf2 = glfwGetTime();
        deltaTime = timeBuf2 - timeBuf1;
        timeBuf1 = timeBuf2;
        // printf("%f\n", 1/deltaTime);

        scene->updateCamera(deltaTime);
        scene->updateObjects(deltaTime);
        scene->drawObjects();

        glfwSwapBuffers(window);
        glfwPollEvents();
    }
}
```
```
#include "scene.hpp"
#include <memory>

Scene::Scene(GLFWwindow* window) : shader("../shaders/shader.vs", "../shaders/shader.fs", nullptr), camera(window, glm::vec3(0.0f, 1.0f, 5.0f), glm::vec3(0.0f, 0.0f, 0.0f)), cube(cubeVertices, cubeIndices) {}

void Scene::updateCamera(float deltaTime) {
    camera.update(deltaTime);
}

void Scene::updateObjects(float deltaTime) {}

void Scene::drawObjects() {
    shader.use();

    glm::mat4 projection = camera.getProjectionMatrix();
    glm::mat4 view = camera.getViewMatrix();
    glm::mat4 model = glm::mat4(1.0f);
    glm::mat4 result = projection * view * model;

    shader.setMat4("gWorld", result);
    cube.draw();
}

//    void updateCamera(float deltaTime);
//    void updateObjects(float deltaTime);
//    void rawObjects();
```
```
#pragma once

#include <memory>
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include "object.hpp"
#include "shader.hpp"
#include "camera.hpp"

class Scene {
private:
    GLFWwindow* window;

    Shader shader;
    Camera camera;

    std::vector<Vertex> cubeVertices = {
        {{-0.5f, -0.5f, -0.5f}, {0.5f, 0.5f, 0.5f}}, // 0
        {{ 0.5f, -0.5f, -0.5f}, {0, 1, 0}}, // 1
        {{ 0.5f,  0.5f, -0.5f}, {0, 0, 1}}, // 2
        {{-0.5f,  0.5f, -0.5f}, {1, 1, 0}}, // 3
        {{-0.5f, -0.5f,  0.5f}, {1, 0, 1}}, // 4
        {{ 0.5f, -0.5f,  0.5f}, {0, 1, 1}}, // 5
        {{ 0.5f,  0.5f,  0.5f}, {1, 1, 1}}, // 6
        {{-0.5f,  0.5f,  0.5f}, {0, 0, 0}}, // 7
    };
    std::vector<unsigned int> cubeIndices = {
        // back
        0, 1, 2, 2, 3, 0,
        // front
        4, 5, 6, 6, 7, 4,
        // left
        0, 3, 7, 7, 4, 0,
        // right
        1, 5, 6, 6, 2, 1,
        // bottom
        0, 1, 5, 5, 4, 0,
        // top
        3, 2, 6, 6, 7, 3
    };
    Object cube;

public:
    Scene(GLFWwindow* window);
    void updateCamera(float deltaTime);
    void updateObjects(float deltaTime);
    void drawObjects();
};
```
why i dont see the cube