fix: change renderer to class
This commit is contained in:
@@ -23,12 +23,13 @@
|
||||
namespace TowerGui{
|
||||
|
||||
static GLFWwindow* window;
|
||||
static std::unique_ptr<td::client::Client> client = std::make_unique<td::client::Client>();
|
||||
static std::unique_ptr<td::client::Client> client;
|
||||
static std::thread* serverThread;
|
||||
static td::render::Renderer* renderer;
|
||||
|
||||
bool serverShouldStop = false;
|
||||
|
||||
void init(GLFWwindow* glfw_window){
|
||||
void init(GLFWwindow* glfw_window, td::render::Renderer* render){
|
||||
window = glfw_window;
|
||||
IMGUI_CHECKVERSION();
|
||||
ImGui::CreateContext();
|
||||
@@ -39,6 +40,8 @@ void init(GLFWwindow* glfw_window){
|
||||
ImFontConfig c;
|
||||
c.SizePixels = 25;
|
||||
ImGui::GetIO().Fonts->AddFontDefault(&c);
|
||||
renderer = render;
|
||||
client = std::make_unique<td::client::Client>(render);
|
||||
}
|
||||
|
||||
void beginFrame(){
|
||||
@@ -62,7 +65,7 @@ void renderFPSCounter(){
|
||||
}
|
||||
static bool isometric = true;
|
||||
if (ImGui::Checkbox("Vue Isometrique ?", &isometric)){
|
||||
td::render::Renderer::setIsometricView(isometric);
|
||||
renderer->setIsometricView(isometric);
|
||||
}
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user