ferx/engine/rendering/Renderer.h

59 lines
1.1 KiB
C
Raw Permalink Normal View History

#pragma once
#define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h>
#include <iostream>
#include "VertexArray.h"
#include "VertexBuffer.h"
#include "IndexBuffer.h"
#include "FrameBuffer.h"
#include "Window.h"
2024-08-28 12:38:19 +00:00
#include "Input.h"
2024-11-22 00:37:06 +00:00
#include "Scene.h"
#include "Shader.h"
#include "Texture.h"
#include "Camera.h"
2024-11-22 00:37:06 +00:00
#include "Cube.h"
struct RendererData
{
VertexArray* m_VAO;
VertexBuffer* m_VBO;
IndexBuffer* m_IBO;
FrameBuffer* m_FBO;
2024-11-22 00:37:06 +00:00
Scene* m_Scene;
Shader* m_Shader;
2024-11-22 00:37:06 +00:00
Camera* m_Camera;
Cube* m_Cube;
glm::vec3* m_ClearColor;
};
class Renderer
{
public:
Renderer();
~Renderer();
static void Init();
static void Render();
static void Shutdown();
2024-11-22 00:37:06 +00:00
static RendererData& GetData();
private:
static RendererData s_Data;
2024-11-22 00:37:06 +00:00
static void SetVariables();
static void LoadShaders();
static void SetupBuffers();
static void SetCallbacks();
static void ProcessInput(GLFWwindow* window);
2024-11-22 00:37:06 +00:00
static float s_DeltaTime;
static float s_LastFrame;
2024-11-22 00:37:06 +00:00
static bool s_FirstMouse;
static float s_LastX;
static float s_LastY;
};