![]() static int xfatalerrorhandler(Display*) Fatal error (e.g. Static int xerrorhandler(Display* dpy,XErrorEvent* eev) Perhaps should do something else. When timer, signal, io callback fires, need to go once round the event GUI things does not mean we're done with the program! FXApp::exit() should be called by AFTER returning from FXApp::run() also,įXApp::exit() should not call the global exit():- just because we're done doing Need to be able to ``detach'' from GUI more cleanly. Need to be able to run event loop w/o display connection (just I/O, and timers). Need way to specify visual on command line (X11). Such as activation of the application etc. Application should have a target to be notified of certain app-wide events, Sender is the FXApp, but in case of DND ops, we might have a special stand-in objectĪs the sender (e.g. refresh() now forces total GUI updating flush() updates display only. Perhaps combine delayed paint, scroll, and layout into one mechanism. Each vertex from our figure has a position attribute, let’s ignore for the moment any other possible attribute like a color.- Should not be able to DND drop into some windows while modal window is up In the above figure we have four triangles and twelve vertices. In OpenGL terminology, a vertex can be seen as a collection of attributes like position, color, texture coordinates etc … For now, let’s try to draw the four triangles from the next figure:įrom a geometrical point of view, a triangle is completely defined by the position in space of his three corners or vertices. ![]() The basic geometrical primitives that the core OpenGL profile provide to us are points, lines and triangles.įor simplicity, we are going to use only two dimensional drawings in this article, but keep in mind that OpenGL allows us to represent three dimensional objects, more on this in a future article. It is the programmer’s job to combine the geometrical primitives from OpenGL in complex shapes and bodies. It is time to actually draw something using OpenGL.įirst, let me mention that OpenGL is a low level API, this means that it has no support for drawing complex geometrical objects. ![]() In the first article we’ve seen how to open a window for our OpenGL application with the GLFW library and how to compile and run the code on Windows, OS X and Linux. This is the second article from my OpenGL 101 series. Solarian Programmer My programming ramblings Home Archives Contact Privacy OpenGL 101: Drawing primitives - points, lines and triangles Posted on by Paul ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |