OpenGL programming in QT (1) steps required for OpenGL programming in QT

Source: Internet
Author: User
Tags gtk

I. Preface

I spent some time studying ogre at home during the summer vacation, basically a wiki tutorial every day. After finishing the preliminary tutorial, I felt that I could not proceed, because there were a lot of things that I had to understand, so I wanted to get in touch with something more "low-end.

Open-source, of course, OpenGL is required. If we use QT for cross-platform applications, we will spend some time studying it. But at that time, we had to deal with cute professional courses and our own skills were quite average, after studying texture maps, we will stop.

This learning is mainly based on nehe's OpenGL tutorial. Let's take a look at OpenGL's redbooks and some online materials. The operating system is ubuntu11.10.

Ii. Summary

The planned learning time is one month. In fact, I really want to program on Android, but I don't have any devices on my hands, and my computer doesn't work ....

In the end, I hope I can make a game that can be used. It would be even better if I could create a game engine. It would be simpler. If someone else asks you what OpenGL has learned, the answer is: Create a cube... then it will crash.

Assume that you have a certain degree of C \ c ++ programming basics, and then you are familiar with QT. If not, it is recommended to take the QT tutorial of bean, although it has not been updated for a long time.

Iii. Preparations

First of all, you should configure ubuntu. See my other article :. Create a famous workstation-configure Ubuntu

Then install QT and creater, and enter the terminal:

Sudo apt-Get install qtcreator QT-SDK

Open creater, select a hellogl example, and compile and run it. If you finally see the following results, the configuration is successful.

If QT prompts a warning: GTK-warning **: The topic engine pixmap cannot be found in the module path.

Enter the sudo apt-Get install gtk2-engines-pixbuf on the terminal

It can be solved. It should be that a module of GTK is not configured properly.
Here, our environment is set up. Compared with VC and cmake, this should be the simplest way to build the environment!

Iv. References

1. OpenGL reference manual, OpenGL Reference Manual

2. OpenGL programming guide, by Dave shreiner, Mason Woo, Jackie neider, Tom Davis, translated Xu Bo, published by Mechanical Industry Press

You can also find the relevant information in the Pipi bookstore. We suggest you download it. Most of them are E files.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.