Change window size to 1920x1080

This commit is contained in:
s473577 2024-02-07 13:34:39 +01:00
parent 203110adf5
commit 7543350dfd
2 changed files with 14 additions and 5 deletions

View File

@ -27,9 +27,17 @@
#include "../ParticleSystem.h" #include "../ParticleSystem.h"
#include "Camera.h" #include "Camera.h"
#ifndef EX_9_1_HPP
#define EX_9_1_HPP
extern int WIDTH;
extern int HEIGHT;
#endif
const unsigned int SHADOW_WIDTH = 1024, SHADOW_HEIGHT = 1024; const unsigned int SHADOW_WIDTH = 1024, SHADOW_HEIGHT = 1024;
int WIDTH = 500, HEIGHT = 500; //int WIDTH = 1920, HEIGHT = 1080;
namespace models { namespace models {
Core::RenderContext marbleBustContext; Core::RenderContext marbleBustContext;
Core::RenderContext spaceshipContext; Core::RenderContext spaceshipContext;

View File

@ -8,10 +8,11 @@
#include "ex_9_1.hpp" #include "ex_9_1.hpp"
int WIDTH = 1920, HEIGHT = 1080;
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
// inicjalizacja glfw // inicjalizacja glfw
glfwInit(); glfwInit();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
@ -23,7 +24,7 @@ int main(int argc, char** argv)
#endif #endif
// tworzenie okna za pomoca glfw // tworzenie okna za pomoca glfw
GLFWwindow* window = glfwCreateWindow(500, 500, "FirstWindow", NULL, NULL); GLFWwindow* window = glfwCreateWindow(WIDTH, HEIGHT, "FirstWindow", NULL, NULL);
if (window == NULL) if (window == NULL)
{ {
std::cout << "Failed to create GLFW window" << std::endl; std::cout << "Failed to create GLFW window" << std::endl;
@ -34,7 +35,7 @@ int main(int argc, char** argv)
// ladowanie OpenGL za pomoca glew // ladowanie OpenGL za pomoca glew
glewInit(); glewInit();
glViewport(0, 0, 500, 500); glViewport(0, 0, WIDTH, HEIGHT);
init(window); init(window);