我想创建C++程序使用OpenGL与C++ OpenGL包装库oglplus,但我不能让程序使用oglplus运行,因为当我声明某些oglplus对象oglplus :: MissingFunction异常总是抛出。声明重要的oglplus对象抛出异常oglplus :: MissingFunction
我的操作系统是archlinux。
我的程序编译但不运行。例如:
#include <cassert>
#include <iostream>
#include <GL/glew.h>
#include <GL/glut.h>
#include <oglplus/all.hpp>
int main()
{
oglplus::VertexShader vs;
return 0;
}
该程序编译,但是当我运行它时,抛出异常oglplus :: MissingFunction。
由于我的程序编译,我相信这意味着我有必要的软件包安装并链接正确的库。我只是不明白为什么抛出异常。异常的描述说明它被抛出的意味着某些用于调用OpenGL函数的指针是未初始化的。
到目前为止,我已经观察到oglplus ::当我宣布的类型的对象MissingFunction被抛出:
- oglplus :: VertexShader
- oglplus :: FragmentShader
- oglplus ::项目
- oglplus ::程序
- oglplus :: VertexArray
- oglplus :: Buffer
有关如何解决此问题的任何建议?