------------------------------------------------------------ revno: 64 committer: Jon Macey firstname.lastname@example.org branch nick: NGL timestamp: Sat 2013-05-11 10:07:48 +0100 message: left in a mac only header in Shader.cpp removed
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
To get the stable teaching version use bzr branch http://nccastaff.bournemouth.ac.uk/jmacey/Code/NGL
This movie will got throught the linux installation, for Mac OSX Lion read this blog post.
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.
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
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.
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
bzr branch http://nccastaff.bournemouth.ac.uk/jmacey/Code/NGL
Once the files have downloaded change to the NGL directory and build with QtCreator.
qmake NGL.pro; make clean; make
qmake PyNGL.pro; make clean -f Makefile.pyngl; make -f Makefile.pyngl
Once this is done edit the ~/.bashrc file and add the following
Under Mac OSX you will need to set the following in .profile / .bashrc
alternatively you may wish to add it to the .MacOSX/environment.plist
For the Python library we need to add the following
This will all the dynamic library created from the source to the library path so it can be used by applications.
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