Fixing loading not getting correctly scaled in fullscreen.

This commit is contained in:
Faerbit 2015-03-15 22:11:26 +01:00
parent 9fced79888
commit 0ae43db53e
2 changed files with 10 additions and 7 deletions

View File

@ -626,6 +626,7 @@ void Graphics::updateLights() {
void Graphics::resize(glm::uvec2 windowSize) {
this->windowSize = windowSize;
if (gameStart) {
for (unsigned int i = 0; i<depth_directionalMaps.size(); i++) {
depth_directionalMaps.at(i)->resize(glm::vec2(windowSize.x, windowSize.y));
}
@ -634,6 +635,7 @@ void Graphics::resize(glm::uvec2 windowSize) {
flamePostShader->setUniform("windowSizeX", int(windowSize.x));
flamePostShader->setUniform("windowSizeY", int(windowSize.y));
bindTextureUnits();
}
}
glm::mat4 Graphics::buildViewMatrix(Level* level) {

View File

@ -122,6 +122,7 @@ bool createWindow()
glfwWindowHint(GLFW_GREEN_BITS, mode->greenBits);
glfwWindowHint(GLFW_BLUE_BITS, mode->blueBits);
glfwWindowHint(GLFW_REFRESH_RATE, mode->refreshRate);
app.getGraphics()->resize(glm::uvec2(mode->width, mode->height));
window = glfwCreateWindow(mode->width, mode->height, "Saxum", glfwGetPrimaryMonitor(), NULL);
if (!window) {