Initial Commit

This commit is contained in:
2026-02-12 11:46:06 +03:00
commit b044c8d1a5
3973 changed files with 1599881 additions and 0 deletions

58
src/render/render.h Normal file
View File

@@ -0,0 +1,58 @@
#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 Shutdown();
void RenderScene();
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);
private:
glm::mat4 m_ViewMatrix;
glm::mat4 m_ProjectionMatrix;
SDL_Window* m_pWindow;
SDL_GLContext m_pGLContext;
GPUBuffer* m_pStretchedPicVBuf;
std::string m_sceneFilename;
std::string m_sceneName;
Model* m_sceneModel;
bool m_bUsingVAO;
};
extern Render* g_pRender;
// TEMP
extern glm::vec3 g_viewOrigin;
extern glm::vec3 g_viewOrient;
#endif // !RENDER_H