OGLplus 0.45.0 发布,此版本更新内容如下:
- 更新了之前版本引入绑定 API 的 GL 对象
- Context::Direct(object) 函数提供对象的 direct-state-access
- 添加了 ExposeGLName 函数
- 添加了新的 NV_shader_buffer_load 和 NV_texture_barrier 封装器
- 更新了封装器的 EXT_direct_state_access 和 ARB_robustness
- SortNWMap 图像生成器可以编码一个双调的排序网格
- 更新构建系统
- 更新文档
- 添加了新示例
OGLplus (oglplus) 是一个仅包含头文件的 C++ 语言库,用于实现一个瘦面向对象的 OpenGL 门面操作接口,提供了自动资源和对象管理的封装,让在 C++ 中使用 OpenGL 更加简单和安全。

示例代码:
#include <oalplus/al.hpp>
#include <oalplus/all.hpp>
#include <oalplus/alut.hpp>
#include <chrono>
#include <thread>
int main(int argc, char** argv)
{
// open the default device
oalplus::Device device;
// create a context using the device and make it current
oalplus::CurrentContext context(device);
// create an instance of ALUT
oalplus::ALUtilityToolkit alut(false, argc, argv);
// create a listener and set its position, velocity and orientation
oalplus::Listener listener;
listener.Position(0.0f, 0.0f, 0.0f);
listener.Velocity(0.0f, 0.0f, 0.0f);
listener.Orientation(0.0f, 0.0f,-1.0f, 0.0f, 1.0f, 0.0f);
// create a Hello World sound and store it into a buffer
oalplus::Buffer buffer = alut.CreateBufferHelloWorld();
// create a source from the data in buffer and set its position
oalplus::Source source;
source.Buffer(buffer);
source.Position(0.0f, 0.0f,-1.0f);
// let the source play the sound
source.Play();
// wait for a while
std::chrono::seconds duration(2);
std::this_thread::sleep_for(duration);
//
return 0;
}
OGLplus 的详细介绍:请点这里
OGLplus 的下载地址:请点这里
本文永久更新链接地址:http://www.linuxidc.com/Linux/2014-05/101031.htm
