Hi guys, noob question, I wanted to try and follow this tutorial https://learnopengl.com/Getting-started/Hello-Window, I've followed all the previous steps and I got this:
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <iostream>
int main()
{
glfwInit();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_VERSION_MINOR, 3);
//glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
GLFWwindow* window = glfwCreateWindow(800, 600, "LearnOpenGL", NULL, NULL);
if (window == NULL)
{
std::cout << "Failed to create window" << std::endl;
glfwTerminate();
}
return 0;
}
Which succesfully creates the window, but as soon as I uncomment the line
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
the build still succed, but the window creation fails (window variable is NULL)...
I followed all the steps so I am scratching my head on what could be wrong...help ^_^'