Initial Commit
This commit is contained in:
58
src/render/render.h
Normal file
58
src/render/render.h
Normal 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
|
||||
Reference in New Issue
Block a user