mirror of
https://github.com/guilhermewerner/opengl
synced 2025-06-16 13:24:19 +00:00
Setup GLEW
This commit is contained in:
@ -1,5 +1,8 @@
|
||||
#include <GL/glew.h>
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
int main()
|
||||
{
|
||||
GLFWwindow *window;
|
||||
@ -19,6 +22,13 @@ int main()
|
||||
/* Make the window's context current */
|
||||
glfwMakeContextCurrent(window);
|
||||
|
||||
if (glewInit() != GLEW_OK)
|
||||
{
|
||||
std::cout << "Error!" << std::endl;
|
||||
}
|
||||
|
||||
std::cout << glGetString(GL_VERSION) << std::endl;
|
||||
|
||||
/* Loop until the user closes the window */
|
||||
while (!glfwWindowShouldClose(window))
|
||||
{
|
||||
|
Reference in New Issue
Block a user