Thursday, April 30, 2015

Introduction to OpenGL Core Profile

OpenGL is one of the most popular multi-platform application programming interface (API) used to produce three dimensional computer graphics applications.

Since version 3.0, it is known as the new era in the evolution of OpenGL because a wide range of new features were added as well as marking the old fixed functions as deprecated that will be completely removed from the core profile in version 3.1. Because of deprecation, GL ARB compatibility extension was added to OpenGL in an attempt to enable graphic programmers to access the old fixed functions.

In this work, we have decided to opt OpenGL core profile 3.3 based primarily on OpenGL shading language (GLSL) because it is efficient programming and programmable. Moreover, it easily switches to OpenGL ES or WebGL which are compatible with modern OpenGL core profile.

Wednesday, April 29, 2015

Basic Qt

Prerequisite
  1. Qt Creator with MinGW or Visual C++

  2. Knowledge of C++

  3. Qt Library
If you have limited experience with C++, please take a look at C++ tutorial before proceeding this tutorial.
The only way to learn a new programming is by starting to write program and play around with it. In this tutorial, we start to write a basic Qt program by using basic functionality of C++ provided by Qt to create a small graphical user interface (GUI). As we have already experienced when we start to learn the programming language, we usually begin with "Hello World". Therefore, we also start with the "hello Qt".

Create HelloQt.cpp

1 #include <QApplication>

2 #include <QLabel>

3 #include <QPushButton>

4 int main(int argc, char *argv[])

5 {

6    QApplication app(argc, argv);

7    QLabel *helloLabel = new QLabel("<font color=blue><b><center>Hello  
      Qt!</center></b></font>");

8    QPushButton *helloButton = new QPushButton("Push me to say Hello");

9    QObject::connect(helloButton, SIGNAL(clicked()), helloLabel,  
      SLOT(show()));

10   helloButton->show();

11   return app.exec();

12   }

Why Qt?

Qt software framework has become a popular cross-platform application framework since its release in 1995. It is widely utilized for developing industrial application software with professional graphical user interfaces (GUIs). With Qt, C++ programmers are easy to build user interface for their applications by dragging and dropping using its GUIs designer. Beside GUIs, Qt is also allowed us to instantiate the class or subclass in order to construct GUIs. Throughout this tutorial, we are going to talk about how to do subclass and instantiate of Qt widgets later. Qt provides main window are generally divided into five sections. In the first section is occupied by the menus followed by toolbars in the second section. 

Qt Creator

Qt creator is the cross platform C++ Integrated Development Environment (IDE) which provides a set of helpful features for assisting developer during the software development process. Those features are listed as the following:
  •     Static code checking and style hinting when typing
  •     Syntax highlighting and code completion
  •    Context sensitive help
  •   Highlighting and folding blocks
  •   Parenthesis matching, and parenthesis selection modes