Skip to content

jaccen/liblub

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

liblub

An OpenGL 4 and 3.3 Core Framework.

Dependencies

You need the following packages on Ubuntu.

$ sudo apt-get install build-essential cmake libqt4-dev libqt4-opengl-dev libgrantlee-dev libboost-dev libx11-xcb-dev libxcb-keysyms1-dev

You also need assimp (i.e. from git).

$ git clone git://github.com/assimp/assimp.git

Window and Context Creation

You can use different window backends. The editor can only be used with Qt.

GLX Backends:

  • XCB
  • Qt

EGL Backends:

  • eglut wayland drm x11

Installing EGLUT

You need EGL support. Install a recent MESA.

git clone git://anongit.freedesktop.org/mesa/demos cd demos cmake . -DBUILD_SHARED_LIBS=1 cd src/egl/eglut make sudo make install cp eglut.h /usr/include/EGL

On Arch you can install the AUR Package.

Headers

The CMake script will download glcorearb.h from the OpenGL Registry, if you dont have it in /usr/include/GL, and put them into the local liblub include directory.

Compile

Linux

$ cmake .

$ make

Windows

You can download the required headers and libraries for MinGW here: https://github.com/downloads/lubosz/liblub/liblub-i486-mingw32.tar.7z

To build:

$ cmake . -DLIBLUB_WINDOWS=1 -DCMAKE_TOOLCHAIN_FILE=scripts/mingw-toolchain.cmake

$ make

If you have run CMake before, do

$ rm CMakeCache.txt

Run

Run all all apps from bin and scenes from media/scenes $ bin/liblub-examples -a

Apps

Or just a specific bin $ bin/liblub-load animation

Scenes

View XML nice.xml scene file from media/scenes/. $ bin/liblub-load nice.xml

Interesting config options

You can set a few options in in the ~/.liblub/config.xml file.

The OpenGL context version can be set <Int name="GLcontext" value="4,1" />

VSync can be turned off <Int name="Vsync" value="0" />

Fullscreen Mode with XCB in GNOME

$ gnome-keybinding-properties

Set Window Management > Toggle fullscreen Mode to a hotkey. I chose Super + F12.

SDL Fullscreen works at init (toggle does not).

tl;dr Ubuntu

To quickly build liblub on Ubuntu (assuming 4 cores)

sudo apt-get install build-essential cmake libqt4-dev libqt4-opengl-dev libgrantlee-dev libboost-dev libx11-xcb-dev libxcb-keysyms1-dev

In Quantal (12.10) you can use Assimp 3 from the repository

sudo apt-get install assimp

If you have 12.04 or lower you need to build Assimp 3

git clone git://github.com/assimp/assimp.git

cd assimp

cmake .

make -j5

sudo make install

cd ..

Build liblub

git clone git://github.com/lubosz/liblub.git

cd liblub

cmake .

make -j5

tl;dr Arch Linux

You can install the AUR Package

packer -S liblub-git

About

An OpenGL 3+4 Framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 74.7%
  • GLSL 20.1%
  • CMake 2.2%
  • Python 2.0%
  • JavaScript 0.7%
  • C 0.2%
  • Shell 0.1%