Files
pke/src/render/render.h
2026-03-05 04:31:17 +03:00

58 lines
1006 B
C++

#ifndef RENDER_H
#define RENDER_H
#include "gl_shared.h"
#include "render_shared.h"
#include <string>
class GPUBuffer;
class Model;
class Render
{
public:
Render();
~Render();
void Init(SDL_Window* pWindow);
void InitGLExtensions();
void Shutdown();
void RenderScene();
void RenderStats();
void Present(bool vsync = false);
void ResetStates();
void SetViewMatrix(const glm::mat4& matView);
void SetProjectionMatrix(const glm::mat4& matProjection);
inline const glm::mat4& GetViewMatrix() { return m_viewMatrix; }
inline const glm::mat4& GetProjectionMatrix() { return m_projectionMatrix; }
void LoadSceneXML(const char* filename);
SDL_GLContext GetGLContext() { return m_pGLContext; }
private:
glm::mat4 m_viewMatrix;
glm::mat4 m_projectionMatrix;
SDL_Window* m_pWindow;
SDL_GLContext m_pGLContext;
GPUBuffer* m_pStretchedPicVBuf;
bool m_usingVAO;
};
extern Render* g_render;
// TEMP
extern glm::vec3 g_viewOrigin;
extern glm::vec3 g_viewOrient;
#endif // !RENDER_H