summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--application.cpp8
-rw-r--r--shader.cpp2
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()));
}