![]() ![]() A list of all the possible options and its corresponding values can be found at GLFW's window handling documentation. The second argument is an integer that sets the value of our option. The first argument of glfwWindowHint tells us what option we want to configure, where we can select the option from a large enum of possible options prefixed with GLFW_. In the main function we first initialize GLFW with glfwInit, after which we can configure GLFW using glfwWindowHint. glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE) GlfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE) ![]() GlfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3) GlfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3) Next, we create the main function where we will instantiate the GLFW window: The include file for GLAD includes the required OpenGL headers behind the scenes (like GL/gl.h) so be sure to include GLAD before other header files that require OpenGL (like GLFW). cpp file and add the following includes to the top of your newly created file.īe sure to include GLAD before GLFW. Let's see if we can get GLFW up and running. Hello Window Getting-started/Hello-Window ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |