OpenGL實用開源庫 彙總
https://blog.csdn.net/huawenguang/article/details/1393904
https://blog.csdn.net/hbtj_1216/article/details/54729417
有了網路的最大好處就是可以資源共享。網路是最大的知識庫,也是最好的老師,正所謂“沒有你想不到的,只有你找不到的”。以下是我收集的以遊戲程式設計,OpenGL 3D程式設計相關的免費擴充套件庫資料。不斷更新中,如果你有好的建義,也請把函式庫名及大概功能寫上,本人負責收集整理。免費共享
SDL
在3D的世界裡,SDL可真所胃是大名頂頂,正所謂“為人不知陳近南,自稱英雄也枉然”,因此呢,如果你是做OpenGL開發的,一定要認識一下
SDL是跨平臺的,目前支援的系統有:Linux, Windows, Windows CE, BeOS, MacOS, Mac OS X, FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, IRIX, and QNX
SDL 是用C語言寫的,但是能很好地相容C++語言。並且能被其它語言繫結使用,如: Ada, C#, Eiffel, Erlang, Euphoria, Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP, Pike, Pliant, Python, Ruby, and Smalltalk.
SDL釋出支援GNU LGPL v2.0 許可協議。也就是說SDL可以免費用於商業應用。
GLM
OpenGl中在進行圖形變換的時候需要使用幾何數學庫,這裡使用第三方數學庫GLM。github地址:https://github.com/g-truc/glm
OpenGL Mathematics (GLM) 是基於OpenGL著色語言(GLSL)規範的圖形軟體的標頭檔案C ++數學庫。
GLM提供的類和函式使用與GLSL相同的命名約定和功能設計和實現,因此任何知道GLSL的人都可以在C ++中使用GLM。
這個專案不限於GLSL的功能。基於GLSL擴充套件約定的擴充套件系統提供擴充套件能力:矩陣變換,四元數,資料打包,隨機數,噪聲等等。
這個庫與OpenGL完美地工作,但它也確保與其他第三方庫和SDK的互操作性。它是軟體渲染(光線追蹤/光柵化),影象處理,物理模擬和任何需要簡單方便的數學庫的開發上下文的良好候選。
GLM是用C ++ 98編寫的,但是當編譯器支援時可以利用C ++ 11。它是一個沒有依賴的平臺獨立庫,它正式支援以下編譯器:
● 蘋果Clang 6.0及更高版本
● GCC 4.7及以上
● 英特爾C ++ Composer XE 2013及更高版本
● LLVM 3.4及更高版本
● Visual C ++ 2013及更高版本
● CUDA 7.0及更高版本(實驗版)
● 任何C ++ 11編譯器
使用案例:
#include <glm/vec3.hpp> // glm::vec3
#include <glm/vec4.hpp> // glm::vec4
#include <glm/mat4x4.hpp> // glm::mat4
#include <glm/gtc/matrix_transform.hpp> // glm::translate, glm::rotate, glm::scale, glm::perspective
#include <glm/gtc/constants.hpp> // glm::pi
glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
{
glm::mat4 Projection = glm::perspective(glm::pi<float>() * 0.25f, 4.0f / 3.0f, 0.1f, 100.f);
glm::mat4 View = glm::translate(glm::mat4(1.0f), glm::vec3(0.0f, 0.0f, -Translate));
View = glm::rotate(View, Rotate.y, glm::vec3(-1.0f, 0.0f, 0.0f));
View = glm::rotate(View, Rotate.x, glm::vec3(0.0f, 1.0f, 0.0f));
glm::mat4 Model = glm::scale(glm::mat4(1.0f), glm::vec3(0.5f));
return Projection * View * Model;
}
GLEW是一個跨平臺的C++擴充套件庫,基於OpenGL圖形介面。使用OpenGL的朋友都知道,window目前只支援OpenGL1.1的涵數,但OpenGL現在都發展到2.0以上了,要使用這些OpenGL的高階特性,就必須下載最新的擴充套件,另外,不同的顯示卡公司,也會發布一些只有自家顯示卡才支援的擴充套件函式,你要想用這數涵數,不得不去尋找最新的glext.h,有了GLEW擴充套件庫,你就再也不用為找不到函式的介面而煩惱,因為GLEW能自動識別你的平臺所支援的全部OpenGL高階擴充套件涵數。也就是說,只要包含一個glew.h標頭檔案,你就能使用gl,glu,glext,wgl,glx的全部函式。GLEW支援目前流行的各種作業系統(including Windows, Linux, Mac OS X, FreeBSD, Irix, and Solaris)。
The NVIDIA Scene Graph Software Development Kit (NVSGSDK) is an object-oriented programming library for creating scenegraph-based applications. The NVSGSDK provides a comprehensive set of classes that developers can easily combine and extend to create fast and reliable graphics applications.
CG_GL is OpenGL API-based open source engine for creating 3D effects. The new release adds depth-of-field with lens blur, and motion blur using shaders. Older version of the engine work on GeForce4 and support full screen blur, transparent object distortion, and glow. Engine is available here: http://tweety3d.no-ip.org. There are also other 3D related programs.
OpenSteer for AI. [MIT license]
Fluid Studios provides a memory manager, matrix class, font generator, radiosity processor, and various other things.
Panda3D (Game/graphics lib, released by Disney after being used for Toontown Online)
provides the normal matrix, vector and quaternion classes, and their associated operations.
bitmap font library (and font texture generator)
OpenSceneGraph - 3D engine.
Demeter Terrain Engine [LGPL]
OGLWFW (OpenGL Window Framework)and basically does what it says on the tin, acts as a framework to create OpenGL windows. here
An augmented reality toolkit, works really nice and very fun to play with. Documentation is still in the works though so you will have to do with the examples.
I haven't used this one but it appears to offer about the same as ARToolKit except it comes with documentation.
MathGL++ is a class library for fast C++ maths for use in OpenGL C++ projects. Easy to use and similar to the OpenGL API. Matricies, Vectors, Quaternions, Linear polynomials with eigen systems are all going to be included.
- The cross-platform .NET game library. Development ManagedGL 1 is stalled in faviour of ManagedGL 2. Currently mostly 2D graphics.
GUI library (for OpenGL) [LGPL] 一個基於OpenGL的介面庫 (another GUI lib)另一個比較有名氣的遊戲介面庫,被OGRE遊戲引擎收錄使用。
HGEis a greate library for creating hardware accelerated 2D games for windows that is free for freeware games.
under physics libraries, free for non-commercial use.一個物理引擎,現在被收購了,改名為:PhysX
http://www.pixeltoaster.com/
Open source c++ library for realtime software rendering.
It gives you a truecolor or floating point framebuffer at your choice, then converts the pixels to the display on the fly. Keyboard and mouse input, and a high resolution timer are also provided.
Currently supports only Windows (DirectX9), but ports to MacOS X and Unix (XWindows etc) are underway.
PTK . PTK is a great Mac/Windows 2d library running on top of OpenGL (so it's fast). It's free for freeware but it does have a PTK Watermark in the corner
Almost twice as fast as the original Wagner's C++ code using Pentium MMX instruction by Matthew Bellew:
- .Net libraries for Cg, DevIL, FreeGLUT, ODE, OpenAL, OpenGL, and SDL.
OPAL - Open Physics Abstraction Layer, currently wraps just ODE I think but could be adapted to use other libraries. Choice of BSD or LGPL license.
(math library for C++)
does cross-platform audio output and input using callbacks.
- zlib license
Not exactly a library, but a simple class that bridges freetype and OpenGL allowing drawing of truetype fonts in OpenGL. It's functionality is requested often enough I figured I'd release it
(OIS)
OIS is a library for cross-platform input management. It is under the zlib/libpng license. The library supports keyboard, mouse, and joystick/gamepad input. Action mapping is included in one of the demos, and force feedback is planned for the 0.4.0 release (currently in development).
is a audio module player and library supporting many formats, including mod, s3m, it, and xm. Originally a player for MS-DOS, MikMod has been ported to other platforms, such as Unix, Macintosh, BeOS, and Java. libMikMod falls under theLGPL agreement.
GLM - a Math Library for OpenGL
http://members.tripod.com/markus_ilmola
This library contains useful math functions that are needed when
programming with OpenGL. Mostly vector and matrix math.
: Collision detection library.
http://gimpact.sourceforge.net/
============================================
目錄
Video
Low level
High-level
GPL , or commercial | |
GPL , or free by application | |
Free for freeware, otherwise commercial | |
Free for noncommercial, otherwise contact author |
Unknown
(free) | |
free, but note possible crypto. legal issues | |
(public domain) | |
free for non-commercial, otherwise GPL | |
GPL , or pay for commercial license | |
zipstream, bzip2stream (iostream wrappers for the zlib and bzip2 libraries) | |
GPL , other | |
(old, mainly Czech) |
Mathematics
Physics
free for noncommercial, contact for commercial | |
free for both commercial and non-commercial use | |
free for non-commercial use |
Collision detection:
free usage | |
free for non-commercial use | |
free for non-commercial use |