* fixes
This commit is contained in:
parent
56b9ef8093
commit
648d7999c8
4 changed files with 13 additions and 7 deletions
|
@ -12,7 +12,7 @@ set(GAME_SRC
|
|||
game_window.cpp
|
||||
renderer_simple.cpp
|
||||
renderer_shader.cpp
|
||||
session.hpp
|
||||
session.cpp
|
||||
|
||||
util.cpp
|
||||
game.cpp
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
class GameWindow : public endofthejedi::GLWindow {
|
||||
private:
|
||||
Game m_game;
|
||||
Game* m_game;
|
||||
endofthejedi::RendererSimple m_renderer;
|
||||
|
||||
protected:
|
||||
|
@ -36,12 +36,14 @@ class GameWindow : public endofthejedi::GLWindow {
|
|||
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
m_renderer.render(m_game.state());
|
||||
m_renderer.render(m_game->state());
|
||||
}
|
||||
|
||||
void resize() override { glViewport(0, 0, getwidth(), getheight()); }
|
||||
|
||||
public:
|
||||
GameWindow(unsigned int width, unsigned int height)
|
||||
: endofthejedi::GLWindow(width, height) {}
|
||||
GameWindow(unsigned int width, unsigned int height, Game *ptr)
|
||||
: endofthejedi::GLWindow(width, height) {
|
||||
m_game = ptr;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#define ASIO_STANDALONE
|
||||
|
||||
#include <iostream>
|
||||
#include <getopt.h>
|
||||
#include <asio.hpp>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#define ASIO_STANDALONE
|
||||
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
|
Loading…
Reference in a new issue