move utils to include. utils implimentations should be headers
This commit is contained in:
39
include/utils/Renderer/RendererOpenGL/RendererOpenGL.h
Normal file
39
include/utils/Renderer/RendererOpenGL/RendererOpenGL.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#ifdef RENDERER_OPENGL
|
||||
#undef RENDERER_OPENGL
|
||||
|
||||
#include "pch.hpp"
|
||||
|
||||
#define GLEW_STATIC
|
||||
#include <GL/glew.h>
|
||||
|
||||
|
||||
namespace Archimedes {
|
||||
|
||||
class RendererOpenGL {
|
||||
|
||||
public:
|
||||
typedef void renderCmd();
|
||||
|
||||
RendererOpenGL() {};
|
||||
~RendererOpenGL() {};
|
||||
|
||||
void init() { glewInit(); };
|
||||
|
||||
void render(std::list<renderCmd*> cmdList, int& w, int& h) {
|
||||
|
||||
glViewport(0, 0, w, h);
|
||||
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
for(auto* f : cmdList)
|
||||
f();
|
||||
cmdList.clear();
|
||||
}
|
||||
};
|
||||
|
||||
typedef RendererOpenGL RendererImpl;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user