Demo Programs WebNGL iNGL piNGL docs SDL Demos

NGL is used for most of the programming examples taught to students in the NCCA, it comprises of a number of C++ classes useful for graphics programming. It also has a separate python library binding which can be built so PyNGL can be used in python scripts. There is a separate branch called iNGL which can be found here for iPhone / iPad development

It should be noted that most of these classes are not the most optimal solutions but are designed to teach principles of C++, Object Oriented programming and Graphics techniques. The library is based around OpenGL 3.x and Qt and has a dependency on boost_1_44_0 ( boost++) or greater

Here is an installation guide for windows written by Jonathan Flynn

To get the stable teaching version use git clone git@github.com:NCCA/NGL.git the full NCCA git repository can be found here and issues may also be reported.

This movie will got throught the linux installation

Documentation Demo Programs This blog post highlights the changes between ngl 4.0 and 4.5, this post the differences between 4.5 and 5.0

Previous Versions

NGL version 4.5 has now been deprecated, you can download a tarball of the code but all projects have now been migrated to the NGL 5.0 version above. Some MSc projects from 2012 will use the above library if you need it.

NGL version 4.0 and the demo programs for this are no longer maintained, however the archive here will give you access to the final code base and demo programs. These are useful for lower powered GPU's and for now immediate mode GL / OpenGL 2.x systems. Demos and code are here

The whole library is designed to live in $(HOME)/NGL so when downloading the initial branch ensure you are in $(HOME), to get updates use the bzrpull.sh script in the Root of the NGL directory

Other projects that depend upon NGL can live in any part of the file system as long as NGL is in $(HOME)/ngl. Default start projects can be created using the NCCAProject Tool which will soon be installed in the University system and available for download as a PyQt project.

 

Getting Started

NGL has a number of dependencies which need to be installed on your system before you can use it. The main build system is QtCreator which can be downloaded here

Pre-requisite libraries

You need to have the following libraries installed depending upon the OS you choose.

GLEW for loading OpenGL extensions (Linux, windows incudes the glew source in the project)

Magick++ for image loading and saving (this is linked in from Qt and is required for some image formats in Qt)

The graphics lib uses the bazaar version control system and the most recent version of the library may be downloaded using the bzr command.

Downloading with bzr

The graphics lib is designed to be placed in the root of your home directory ~/NGL to install the latest version of the library type the following into the console

git clone git@github.con:/NCCA/NGL

Once the files have downloaded change to the NGL directory and build with QtCreator.

qmake NGL.pro; make clean; make

Once this is done edit the ~/.bashrc file and add the following

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/NGL/lib

Under Mac OSX you will need to set the following in .profile / .bashrc

export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:~/NGL/lib

alternatively you may wish to add it to the .MacOSX/environment.plist

For the Python library we need to add the following

export PYTHONPATH=$PYTHONPATH:~/NGL/lib

This will all the dynamic library created from the source to the library path so it can be used by applications.

Windows Version

The windows version will need boost++ to be installed as well as QtCreator and bz at present only the C++ library works but the python version will be updated soon (due to problems building boost_python)

By default the project looks for C:/Boost_1_44_0/

If you install Qt to C:\Qt (not the default but can be chosen as part of the install) you need to tell the PATH environment variable to look for Qt in the installed path (see below) Qt by default only has the release libs in the path so both (QTDIR)/bin and (QTDIR)/qt/bin need to be added. My path for the build is set as below

You will also need to set you system environment path to point to the following

;C:\NGL\lib;C:\Qt\bin;C:\Qt\qt\bin