#define GLEW_STATIC
#define GLEW_STATIC
#define GLEW_STATIC
#define GLEW_STATIC
#define GLEW_STATIC
#include < GL/glew.h>
#include < GLFW/glfw3.h>
#include
# pragma comment (lib, “glew32. Lib”)
int main() {
glfwInit();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
// Open GLFW Window
GLFWwindow* window = glfwCreateWindow(800, 600, "My OpenGL Game", NULL, NULL);
if (window == NULL)
{
printf("open window failed");
glfwTerminate();
return -1;
}
glfwMakeContextCurrent(window);
// Init GLEW
GLboolean glewExperimental = true;
if (glewInit() != GLEW_OK)
{
printf("init GLEW failed");
glfwTerminate();
return -1;
}
glViewport(0, 0, 800, 600);
while (!glfwWindowShouldClose(window))
{
glfwSwapBuffers(window);
glfwPollEvents();
}
glfwTerminate();
return 0;
}
Glew32.dll
1
1
1
1
1
1
br>
> You need to enter the C disk with admin privileges, then put a copy of glew32.dll into C:\Windows\SysWOW64, the problem is fixed, the window appears
Read More:
- Configuration of OpenGL development environment under Windows environment, win10 + vs2019 + glfw + glad
- Vs2015 OpenGL environment configuration
- Vs2013 + glfw + glew configure OpenGL development environment
- Simple configuration of glfw + glad in vs2015 OpenGL development environment
- Vs configuration of OpenGL development environment: configuration of glfw library and glad Library
- Beginners of OpenGL (1): preparation
- Vs2015 configuring OpenGL (glfw, glew)
- Configuring glfw library and glad Library in opengl-vs2015
- Configure OpenGL development environment (glfw3 + glad) once and for all with visual studio
- (64 bit) OpenGL configuration + vs2017 + glew + glfw
- 1 vs20152017 + OpenGL to configure and draw a white rectangle
- How to use higher version of OpenGL SDK in windows?
- Drawing a cube with OpenGL
- Problems encountered in vs2015 configuration using OpenGL environment
- How to use high version OpenGL under Windows
- OpenGL configuration file, as well as unable to parse the file solution
- Xcode configuring OpenGL
- Vs2017 installing OpenGL
- Clion MinGW super fast configuration OpenGL development environment
- The simplest course of configuring OpenGL in vs2015