glewinit()与glewExperimental = GL_TRUE失败;

时间:2015-08-27 19:15:47

标签: c++ opengl glew

我使用这段代码:

#include <glew.h>
#include <freeglut.h>

#include <iostream>


void DisplayManager::createWindow(int argv, char** argc) {
    glutInit(&argv, argc);

    std::cout << "GLEW Version : " << GLEW_VERSION << std::endl;
    glewExperimental = TRUE;
    if (glewInit() != GLEW_OK) {
        std::cout << "glewInit failed, aborting." << std::endl;
    }

    glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA);

    glutInitWindowPosition(windowX, windowY);
    glutInitWindowSize(width, height);
    glutCreateWindow(title);

    glutDisplayFunc(displayFunktion);

    glClearColor(1.0f, 0.0f, 1.0f, 1.0f);
    std::cout << "created Window" << std::endl;
}

控制台输出为:

GLEW版本:1

glewInit失败,中止。

创建了窗口

据我所知,我已经正确安装了glew,过剩也很好。

0 个答案:

没有答案