GtkGLExt Reference Manual |
---|
Initialization — Library initialization functions
#include <gdk/gdkgl.h> void gdk_gl_init (int *argc, char ***argv); gboolean gdk_gl_init_check (int *argc, char ***argv); gboolean gdk_gl_parse_args (int *argc, char ***argv);
void gdk_gl_init (int *argc, char ***argv);
Call this function before using any other GdkGLExt functions in your applications. It will initialize everything needed to operate the library and parses some standard command line options. argc and argv are adjusted accordingly so your own code will never see those standard arguments.
This function will terminate your program if it was unable to initialize the library for some reason. If you want your program to fall back to a textual interface you want to call gdk_gl_init_check() instead.
argc : | Address of the argc parameter of your main() function. Changed if any arguments were handled. |
argv : | Address of the argv parameter of main(). Any parameters understood by gdk_gl_init() are stripped before return. |
gboolean gdk_gl_init_check (int *argc, char ***argv);
This function does the same work as gdk_gl_init() with only a single change: It does not terminate the program if the library can't be initialized. Instead it returns FALSE on failure.
This way the application can fall back to some other means of communication with the user - for example a curses or command line interface.
argc : | Address of the argc parameter of your main() function. Changed if any arguments were handled. |
argv : | Address of the argv parameter of main(). Any parameters understood by gdk_gl_init() are stripped before return. |
Returns : | TRUE if the GUI has been successfully initialized, FALSE otherwise. |
gboolean gdk_gl_parse_args (int *argc, char ***argv);
Parses command line arguments, and initializes global attributes of GdkGLExt.
Any arguments used by GdkGLExt are removed from the array and argc and argv are updated accordingly.
You shouldn't call this function explicitely if you are using gdk_gl_init(), or gdk_gl_init_check().
argc : | the number of command line arguments. |
argv : | the array of command line arguments. |
Returns : | TRUE if initialization succeeded, otherwise FALSE. |
<< Part II. GdkGLExt API Reference | Query >> |