{"id":892,"date":"2009-08-27T08:28:00","date_gmt":"2009-08-27T07:28:00","guid":{"rendered":"http:\/\/it4bus.vn\/itersdesktop\/2009\/08\/27\/draw-in-opengl\/"},"modified":"2009-08-27T08:28:00","modified_gmt":"2009-08-27T07:28:00","slug":"draw-in-opengl","status":"publish","type":"post","link":"https:\/\/www.itersdesktop.com\/fr\/2009\/08\/27\/draw-in-opengl\/","title":{"rendered":"Draw in OpenGL"},"content":{"rendered":"<p>How to compile a program written in OpenGL<\/p>\n<p>g++ -Wall -O my-program.cpp -lglut -o my-program<br \/>In which:<\/p>\n<ul>\n<li>-Wall: is a way of saying the compiler that it should output all the warnings\n<\/li>\n<li>-O: says the compiler to use some optimization techniques<\/li>\n<li>-l is a linker option stating to include the library followed the -l. Here is glut.\n<p> 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:<\/p>\n<p> <code>#include <\/code>\n<\/li>\n<li>-o: says the compiler that it should produce a binary file whose name is my-program\n<\/li>\n<\/ul>\n<p><a href=\"http:\/\/slabode.exofire.net\/circle_draw.shtml\" target=\"_blank\">An Efficient Way to Draw Approximate Circles in OpenGL<\/a><br \/><a href=\"http:\/\/mindfuck.de-brauwer.be\/articles\/glut\/\">An introduction of GLUT (Understand easily)<br \/><\/a><\/p>\n<p><span>Draw Text<\/span><br \/><a href=\"http:\/\/www.sjbaker.org\/steve\/omniv\/opengl_text.html\" target=\"_blank\">Faster Text in OpenGL<\/a><br \/><a href=\"http:\/\/www.videotutorialsrock.com\/opengl_tutorial\/draw_text\/text.php\" target=\"_blank\">Drawing Text<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to compile a program written in OpenGL g++ -Wall -O my-program.cpp -lglut -o my-programIn which: -Wall: is a way of saying the compiler that it should output all the&hellip; <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-892","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/posts\/892","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/comments?post=892"}],"version-history":[{"count":0,"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/posts\/892\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/media?parent=892"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/categories?post=892"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/tags?post=892"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}