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

黑客大曝光

黑客大曝光

Joel Scambray、Vincent Liu、Caleb Sima / 姚军 / 机械工业出版社华章公司 / 2011-10 / 65.00元

在网络技术和电子商务飞速发展的今天,Web应用安全面临着前所未有的挑战。所有安全技术人员有必要掌握当今黑客们的武器和思维过程,保护Web应用免遭恶意攻击。本书由美国公认的安全专家和精神领袖打造,对上一版做了完全的更新,覆盖新的网络渗透方法和对策,介绍如何增强验证和授权、弥补Firefox和IE中的漏洞、加强对注入攻击的防御以及加固Web 2.0安全,还介绍了如何将安全技术整合在Web开发以及更广泛......一起来看看 《黑客大曝光》 这本书的介绍吧!

MD5 加密
MD5 加密

MD5 加密工具

SHA 加密
SHA 加密

SHA 加密工具

html转js在线工具
html转js在线工具

html转js在线工具