OpenGL的C++封装库 OGLplus

码农软件 · 软件分类 · 3D图形处理库 · 2019-09-12 09:26:28

软件介绍

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;
}

本文地址:https://codercto.com/soft/d/14418.html

在线

在线

王坚 / 中信出版集团 / 2018-5-21 / 59.00元

50多万年前的关键词是光明与黑暗, 50多年前的关键词是数字和模拟, 而今天的关键词是在线与离线。 移动互联网是比传统互联网在线程度更深的互联网。对于真正成熟的互联网来说,手机只是诸多的在线设备之一,慢慢地,每一个设备都会变成互联网的终端。 真正的竞争力,是把所有人都可能拥有的东西变成财富,让沙子变成硅。大家都把大数据当作金矿,想要掘金。但在王坚看来,大数据的厉害之处是把沙......一起来看看 《在线》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码