55 lines
1.1 KiB
C++
55 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "../Rendering/FBO.h"
|
|
#include <glm/glm.hpp>
|
|
#include <memory>
|
|
#include "Rendering/Shader.h" //
|
|
#include "Components/CameraComponent.h"
|
|
#include "Components/GameObject.h"
|
|
#include "Engine/InputManager.h"
|
|
|
|
class RenderWindow
|
|
{
|
|
public:
|
|
void Show(bool *GameRunning, double deltaTime);
|
|
|
|
private:
|
|
void InitGLResources();
|
|
void RenderSceneToFBO(bool *GameRunning);
|
|
|
|
std::shared_ptr<CameraComponent> m_ActiveCamera;
|
|
|
|
// Offscreen render target
|
|
FBO m_FBO;
|
|
|
|
// Keep track if we've initialized
|
|
bool m_Initialized = false;
|
|
|
|
// GL objects for the cube
|
|
unsigned int m_VAO = 0;
|
|
unsigned int m_VBO = 0;
|
|
unsigned int m_EBO = 0;
|
|
|
|
// Spin
|
|
float m_RotationAngle = 0.f;
|
|
int m_LastWidth = 0;
|
|
int m_LastHeight = 0;
|
|
|
|
// The loaded texture
|
|
unsigned int m_TextureID = 0;
|
|
|
|
// The loaded shader program (via AssetManager)
|
|
Shader* m_ShaderPtr = nullptr;
|
|
Shader* m_LineShaderPtr = nullptr;
|
|
|
|
GameObject m_EditorCamera;
|
|
};
|
|
|
|
|
|
struct Ray
|
|
{
|
|
glm::vec3 origin;
|
|
glm::vec3 direction; // Should be normalized
|
|
};
|
|
|