|
From: Lasse Kärkkäi. <tr...@us...> - 2011-02-24 02:48:29
|
Author: Lasse Kärkkäinen <tronic+ndrm at trn.iki.fi> Date: Thu Feb 24 03:42:34 2011 +0100 Fix shader compilation settings etc. --- game/video_driver.cc | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/game/video_driver.cc b/game/video_driver.cc index b47ffb0..79d5e80 100644 --- a/game/video_driver.cc +++ b/game/video_driver.cc @@ -90,7 +90,7 @@ Window::Window(unsigned int width, unsigned int height, bool fs): m_windowW(widt .bind() .setUniformMatrix("colorMatrix", glmath::Matrix()); shader("surface") - .setDefines("#define ENABLE_TEXTURING 1\n#define ENABLE_VERTEX_COLOR\n") + .setDefines("#define ENABLE_TEXTURING 1\n") .compileFile(getThemePath("shaders/core.vert")) .compileFile(getThemePath("shaders/core.frag")) .link() @@ -107,17 +107,17 @@ Window::Window(unsigned int width, unsigned int height, bool fs): m_windowW(widt .setDefines("#define ENABLE_LIGHTING\n") .compileFile(getThemePath("shaders/core.vert")) .compileFile(getThemePath("shaders/core.frag")) - .link(); + .link() + .bind() + .setUniformMatrix("colorMatrix", glmath::Matrix()); shader("dancenote") .setDefines("#define ENABLE_TEXTURING 2\n#define ENABLE_VERTEX_COLOR\n") .compileFile(getThemePath("shaders/dancenote.vert")) .compileFile(getThemePath("shaders/core.frag")) - .link(); - double vx = 0.5f * (screen->w - s_width); - double vy = 0.5f * (screen->h - s_height); - double vw = s_width, vh = s_height; - glViewport(vx, vy, vw, vh); // Drawable area of the window (excluding black bars) - view(0); + .link() + .bind() + .setUniformMatrix("colorMatrix", glmath::Matrix()); + view(0); // For loading screens } Window::~Window() { } |