OGLplusOpenGL的C++封装库
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; }
评论
PHP-XZendAPI 的 C++ 封装库
PHPZendAPI的C++封装库,可以用于快速开发PHP扩展。PHP-X使用了完全面向对象的设计,使得PHP扩展开发、C++嵌入PHP变得非常简单,实现了C++和PHP的互通。环境依赖:PHP-7.
PHP-XZendAPI 的 C++ 封装库
0
SSL++OpenSSL 的 C++ 封装库
SSL++是OpenSSL的C++封装库。你可以通过SSL++提供简单的类来使用OpenSSLAPI,目前该项目还没有完全封装OpenSSL所有API,但已经可以满足绝大多数应用要求。
SSL++OpenSSL 的 C++ 封装库
0
DrumstickALSA的C++封装库
Drumstick是一个ALSA的音序器(MIDI接口)的C++封装库示例代码:#include<QApplication>#include<drumstick.h>intma
DrumstickALSA的C++封装库
0