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://www.codercto.com/soft/d/14418.html

数据科学家养成手册

数据科学家养成手册

高扬 / 电子工业出版社 / 2017-5 / 79

作为认知科学的延伸,数据科学一方面应该越来越引起广大大数据工作者的重视,另一方面也要撩开自己的神秘面纱,以最为亲民的姿态和每位大数据工作者成为亲密无间的战友,为用科学的思维方式进行工作做好理论准备。《数据科学家养成手册》从众多先贤及科学家的轶事讲起,以逐步归纳和递进的脉络总结出科学及数据科学所应关注的要点,然后在生产的各个环节中对这些要点逐一进行讨论与落实,从更高、更广的视角回看科学及数据科学在各......一起来看看 《数据科学家养成手册》 这本书的介绍吧!

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

在线压缩/解压 CSS 代码

MD5 加密
MD5 加密

MD5 加密工具

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试