Change window size to 1920x1080

This commit is contained in:
s473577 2024-02-07 13:34:39 +01:00
parent 1f70717502
commit 6f85812a35
2 changed files with 14 additions and 5 deletions

View File

@ -27,9 +27,17 @@
#include "../ParticleSystem.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;
int WIDTH = 500, HEIGHT = 500;
//int WIDTH = 1920, HEIGHT = 1080;
namespace models {
Core::RenderContext marbleBustContext;
Core::RenderContext spaceshipContext;

View File

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