当我尝试使用glCreateShader创建着色器并运行我的程序时,我刚制作的窗口变为白色并给出了一个错误:
在OpenGl.exe中0x03D312F0(atioglxx.dll)抛出异常:0xC0000005:访问冲突读取位置0x73553A43.
有谁知道,为什么会这样?这是我的代码
#include <GL/glew.h>
#include <GLFW\glfw3.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
float speed = 0.005;
float edge = 3.0;
float move = 0.0;
float zamik = 0.1;
GLFWwindow *window;
// initialize GLFW
if (!glfwInit())
{
return -1;
}
// create a window mode and its OpenGl context
window = glfwCreateWindow(640, 480, "Window", NULL, NULL);
if (!window)
{
glfwTerminate();
return -1;
}
//make the windows contex current
glfwMakeContextCurrent(window);
glewInit();
GLenum err = glewInit();
if (GLEW_OK != …Run Code Online (Sandbox Code Playgroud) opengl ×1