diff options
author | unknown <Atle@Gungnir.(none)> | 2012-01-29 14:27:28 +0100 |
---|---|---|
committer | unknown <Atle@Gungnir.(none)> | 2012-01-29 14:27:28 +0100 |
commit | b019bcca81f8dd4a003e21b2af8afffe16ef3a70 (patch) | |
tree | 967c79bc693b4b78cd9a35c9a33f3147b18e695c | |
parent | eb53653dfcbbe325cee93368dd6585d68e41f43a (diff) |
Fixed windows issues.sfml
-rw-r--r-- | application.cpp | 8 | ||||
-rw-r--r-- | 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; @@ -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())); } |