From b019bcca81f8dd4a003e21b2af8afffe16ef3a70 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 29 Jan 2012 14:27:28 +0100 Subject: Fixed windows issues. --- application.cpp | 8 ++++---- shader.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/application.cpp b/application.cpp index 97a014f..dc43e7e 100644 --- a/application.cpp +++ b/application.cpp @@ -9,10 +9,6 @@ extern const sf::Input* input_backend; sf::RenderWindow *renderwindow; Application::Application() { - #ifdef WIN32 - win32_gl_init(); - #endif - please_quit = false; } @@ -30,6 +26,10 @@ void Application::init_window(unsigned int w, unsigned int h, bool fs, const std window = renderwindow; create_window(w, h, fs, title); + #ifdef WIN32 + win32_gl_init(); + #endif + input_backend = &window->GetInput(); window_title = title; diff --git a/shader.cpp b/shader.cpp index a0509ff..0ce3afc 100644 --- a/shader.cpp +++ b/shader.cpp @@ -13,7 +13,7 @@ static void gl_check_error(const char *msg) { } void GLBaseShader::shader_source(const char *filename) { - std::ifstream inf(filename, std::ios_base::in); + std::ifstream inf(filename, std::ios_base::in | std::ios_base::binary); if(!inf.is_open()) { throw(std::runtime_error((boost::format("Failed to load shader from file %s") % filename).str())); } -- cgit v1.2.3