【发布时间】:2016-07-26 05:17:55
【问题描述】:
我想使用带有 C++ OpenGL 包装库 oglplus 的 OpenGL 创建 C++ 程序,但我无法让使用 oglplus 的程序运行,因为当我声明某些 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::缓冲区
关于如何解决这个问题有什么建议吗?
【问题讨论】:
标签: c++ opengl exception graphics oglplus