以下是我的记录错误的函数:
void check_error(const char* st)
{
GLenum err(glGetError());
while (err != GL_NO_ERROR)
{
cerr << "OpenGL error: " << err << " "<<st<<endl;
err = glGetError();
}
cerr << "?\n";
}
这被称为:
int _tmain(int argc, char* argv[])
{
check_error("start");
...
}
这段代码在其他地方没有被调用。
它会导致一个无限循环,并产生如下错误:OpenGL error 1282 start
。
以下是我的包含文件:
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/opencv.hpp>
#include <stdio.h>
#include <stdlib.h>
#include <fstream>
#include <gl/glew.h>
#include <gl/glut.h>
#include <GL/glfw3.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
Visual studio 2013
GL_INVALID_OPERATION
(0x502 = 1282)。 - Brett Hale