Accueil / Uncategorized / Draw in OpenGL

Draw in OpenGL

Print Friendly, PDF & Email

How to compile a program written in OpenGL

g++ -Wall -O my-program.cpp -lglut -o my-program
In which:

  • -Wall: is a way of saying the compiler that it should output all the warnings
  • -O: says the compiler to use some optimization techniques
  • -l is a linker option stating to include the library followed the -l. Here is glut.

    There is a little extra advantage when using GLUT, if you were developing an OpenGL application you should include the header files gl.h and glu.h (glu is the OpenGL Utility Library) but when you are including glut.h, glut.h guarantees the inclusion of gl.h and glu.h. So when we start and OpenGL application we start by writing:

    #include

  • -o: says the compiler that it should produce a binary file whose name is my-program

An Efficient Way to Draw Approximate Circles in OpenGL
An introduction of GLUT (Understand easily)

Draw Text
Faster Text in OpenGL
Drawing Text

À propos Nguyen Vu Ngoc Tung

I love making new professional acquaintances. Don't hesitate to contact me via nguyenvungoctung@gmail.com if you want to talk about information technology, education, and research on complex networks analysis (i.e., metabolic networks analysis), data analysis, and applications of graph theory. Specialties: researching and proposing innovative business approaches to organizations, evaluating and consulting about usability engineering, training and employee development, web technologies, software architecture.

Un commentaire

Laisser une réponse

Votre adresse email ne sera pas publiéeLes champs requis sont surlignés *

*

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.