Rewrote Gamestate to be a class instead of an interface; Added layers
This commit is contained in:
1 parent
2f4e0ebfac
commit
e35688373e
15 files changed
+155
-70
No files matched your search
@@ -46,13 +46,31 @@ namespace nf {
|
||||
wglMakeCurrent(m_hdc, m_hglrc);
|
||||
wglSwapIntervalEXT(0);
|
||||
Log("OpenGL version: " + std::string((char*)glGetString(GL_VERSION)));
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glDepthFunc(GL_LESS);
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
void Renderer::render(const Drawable& in) {
|
||||
//TODO: Check identity
|
||||
}
|
||||
|
||||
void Renderer::doFrame() {
|
||||
glViewport(0, 0, m_app->getConfig().width, m_app->getConfig().height);
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
for (Drawable* draw : m_lGame) {
|
||||
Drawable& curr = *draw;
|
||||
|
||||
}
|
||||
|
||||
for (Drawable* draw : m_lUI) {
|
||||
Drawable& curr = *draw;
|
||||
|
||||
}
|
||||
|
||||
SwapBuffers(m_hdc);
|
||||
|
||||
GLenum err = glGetError();
|
||||
|
||||
Reference in new issue
Block a user