Home Download Gallery Documentation Developer

# QGLViewer - General FAQ

See also the Technical FAQ
»» What is libQGLViewer ?
»» What is not libQGLViewer ?
»» What is the difference with glut ?
»» What are the main features ?
»» Why is it based on Qt ?
»» Why is Glut needed then ?
»» Who should use this library ?
»» How should I start ?

## What is libQGLViewer ?

libQGLViewer is a GPL free software C++ library which lets you quickly start the development of a new 3D application. It is designed for 3D developers, who can display and move around a 3D scene by simply providing the OpenGL orders that define their 3D geometry. The viewer is designed to be as general as possible and is not designed for a specific 3D application.

## What is not libQGLViewer ?

libQGLViewer is not a 3D viewer that can be used directly to view 3D scenes in various formats (well, there is a 3dsViewer example, but it is just a proof of concept). It is more likely to be the starting point for the coding of such a viewer.

## What is the difference with glut ?

Glut eases the creation of an OpenGL window and lets you implements your own mouse and keyboard callback functions. In that sense, it is very comparable to the `Qt::QGLWidget` class functionalities.
However, libQGLViewer is a higher level API, it is designed to create OpenGL 3D viewers. These default callback functions are already implemented and the mouse can intuitively be used to move the camera (or any object of the scene) with no extra code needed. Simple applications only have to define the `draw()` function to get a functional viewer. Although adapted for most applications, the default handlers can be customized if needed.

## What are the main features ?

libQGLViewer provides some useful classical functionalities such as : a camera trackball, screenshot saving, mouse manipulated frames, stereo display, camera point of view saving, full screen display, keyFrames paths and much more. See the features page for a more exhaustive listing.

## Why is it based on Qt ?

As mentioned above, `glut` and the `Qt::QGLWidget` class provide similar OpenGL window creation facilities with a callback framework. The clean `Qt` object oriented design, the powerful GUI creation tools it provides and some of its functionalities (framebuffer grabbing, image format abstraction...) made us adopt Qt.

## Why is Glut needed then ?

Glut is required only if your Qt version is lower than 3.1. It provides text drawing functionalities that were missing until Qt 3.1.

## Who should use this library ?

Anyone who needs to visualize a 3D scene. libQGLViewer is currently used by Computer Graphics research labs, industrials or game designers. Note however that it is not designed for critical real-time applications (namely games), as it could benefit from some optimizations (that were not performed in order to keep the library versatile). It is however a very good debugging and prototyping tool in these cases.
libQGLViewer also has a strong pedagogical interest, as it allows students to very quickly develop their application and to focus on what is drawn instead of how to make the computer draw it.

## How should I start ?

The main goal of libQGLViewer is to allow a student to have a complete 3D viewer application in less than five minutes. Once the library is installed, the best way to achieve this challenge is to start from one of the provided examples (`simpleViewer` is the simplest). See details in the compilation with libQGLViewer page. Your first program should execute and you can start extending it. Read the principles of the library before you start coding.

Other questions can be sent by e-mail and will be added to this page. See also the Technical FAQ page.

Last modified on Friday, July 10, 2015.