Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Examples

# Gdk::GL Namespace Reference

## Classes
class | Config
class | Context
class | Drawable
class | Font
class | Pixmap
class | PixmapExtProxy
class | Window
class | WindowExtProxy
## Enumerations
enum | ConfigMode { MODE_RGB = 0, MODE_RGBA = 0, MODE_INDEX = 1 << 0, MODE_SINGLE = 0, MODE_DOUBLE = 1 << 1, MODE_STEREO = 1 << 2, MODE_ALPHA = 1 << 3, MODE_DEPTH = 1 << 4, MODE_STENCIL = 1 << 5, MODE_ACCUM = 1 << 6, MODE_MULTISAMPLE = 1 << 7 }
enum | ConfigAttrib { USE_GL = 1, BUFFER_SIZE = 2, LEVEL = 3, RGBA = 4, DOUBLEBUFFER = 5, STEREO = 6, AUX_BUFFERS = 7, RED_SIZE = 8, GREEN_SIZE = 9, BLUE_SIZE = 10, ALPHA_SIZE = 11, DEPTH_SIZE = 12, STENCIL_SIZE = 13, ACCUM_RED_SIZE = 14, ACCUM_GREEN_SIZE = 15, ACCUM_BLUE_SIZE = 16, ACCUM_ALPHA_SIZE = 17, CONFIG_CAVEAT = 0x20, X_VISUAL_TYPE = 0x22, TRANSPARENT_TYPE = 0x23, TRANSPARENT_INDEX_VALUE = 0x24, TRANSPARENT_RED_VALUE = 0x25, TRANSPARENT_GREEN_VALUE = 0x26, TRANSPARENT_BLUE_VALUE = 0x27, TRANSPARENT_ALPHA_VALUE = 0x28, DRAWABLE_TYPE = 0x8010, RENDER_TYPE = 0x8011, X_RENDERABLE = 0x8012, FBCONFIG_ID = 0x8013, MAX_PBUFFER_WIDTH = 0x8016, MAX_PBUFFER_HEIGHT = 0x8017, MAX_PBUFFER_PIXELS = 0x8018, VISUAL_ID = 0x800B, SCREEN = 0x800C, SAMPLE_BUFFERS = 100000, SAMPLES = 100001 }
enum | ConfigCaveat { CONFIG_CAVEAT_DONT_CARE = 0xFFFFFFFF, CONFIG_CAVEAT_NONE = 0x8000, SLOW_CONFIG = 0x8001, NON_CONFORMANT_CONFIG = 0x800D }
enum | VisualType { VISUAL_TYPE_DONT_CARE = 0xFFFFFFFF, TRUE_COLOR = 0x8002, DIRECT_COLOR = 0x8003, PSEUDO_COLOR = 0x8004, STATIC_COLOR = 0x8005, GRAY_SCALE = 0x8006, STATIC_GRAY = 0x8007 }
enum | TransparentType { TRANSPARENT_NONE = 0x8000, TRANSPARENT_RGB = 0x8008, TRANSPARENT_INDEX = 0x8009 }
enum | DrawableTypeMask { WINDOW_BIT = 1 << 0, PIXMAP_BIT = 1 << 1, PBUFFER_BIT = 1 << 2 }
enum | RenderTypeMask { RGBA_BIT = 1 << 0, COLOR_INDEX_BIT = 1 << 1 }
enum | BufferMask { FRONT_LEFT_BUFFER_BIT = 1 << 0, FRONT_RIGHT_BUFFER_BIT = 1 << 1, BACK_LEFT_BUFFER_BIT = 1 << 2, BACK_RIGHT_BUFFER_BIT = 1 << 3, AUX_BUFFERS_BIT = 1 << 4, DEPTH_BUFFER_BIT = 1 << 5, STENCIL_BUFFER_BIT = 1 << 6, ACCUM_BUFFER_BIT = 1 << 7 }
enum | ConfigError { BAD_SCREEN = 1, BAD_ATTRIBUTE, NO_EXTENSION, BAD_VISUAL, BAD_CONTEXT, BAD_VALUE, BAD_ENUM }
enum | RenderType { RGBA_TYPE = 0x8014, COLOR_INDEX_TYPE = 0x8015 }
enum | DrawableAttrib { PRESERVED_CONTENTS = 0x801B, LARGEST_PBUFFER = 0x801C, WIDTH = 0x801D, HEIGHT = 0x801E, EVENT_MASK = 0x801F }
enum | PbufferAttrib { PBUFFER_PRESERVED_CONTENTS = 0x801B, PBUFFER_LARGEST_PBUFFER = 0x801C, PBUFFER_HEIGHT = 0x8040, PBUFFER_WIDTH = 0x8041 }
enum | EventMask { PBUFFER_CLOBBER_MASK = 1 << 27 }
enum | EventType { DAMAGED = 0x8020, SAVED = 0x8021 }
enum | DrawableType { WINDOW = 0x8022, PBUFFER = 0x8023 }
## Functions
ConfigMode | operator| (ConfigMode lhs, ConfigMode rhs)
ConfigMode | operator & (ConfigMode lhs, ConfigMode rhs)
ConfigMode | operator^ (ConfigMode lhs, ConfigMode rhs)
ConfigMode | operator~ (ConfigMode flags)
ConfigMode & | operator|= (ConfigMode &lhs, ConfigMode rhs)
ConfigMode & | operator &= (ConfigMode &lhs, ConfigMode rhs)
ConfigMode & | operator^= (ConfigMode &lhs, ConfigMode rhs)
bool | init_check (int &argc, char **&argv)
bool | init_check (int *argc, char ***argv)
void | init (int &argc, char **&argv)
void | init (int *argc, char ***argv)
PixmapExtProxy | ext (const Glib::RefPtr< Gdk::Pixmap > &pixmap)
const PixmapExtProxy | ext (const Glib::RefPtr< const Gdk::Pixmap > &pixmap)
bool | query_extension ()
bool | query_extension (const Glib::RefPtr< const Gdk::Display > &display)
bool | query_version (int &major, int &minor)
bool | query_version (const Glib::RefPtr< const Gdk::Display > &display, int &major, int &minor)
bool | query_gl_extension (const char *extension)
bool | query_gl_extension (const Glib::ustring &extension)
GdkGLProc | get_proc_address (const char *proc_name)
GdkGLProc | get_proc_address (const Glib::ustring &proc_name)
DrawableTypeMask | operator| (DrawableTypeMask lhs, DrawableTypeMask rhs)
DrawableTypeMask | operator & (DrawableTypeMask lhs, DrawableTypeMask rhs)
DrawableTypeMask | operator^ (DrawableTypeMask lhs, DrawableTypeMask rhs)
DrawableTypeMask | operator~ (DrawableTypeMask flags)
DrawableTypeMask & | operator|= (DrawableTypeMask &lhs, DrawableTypeMask rhs)
DrawableTypeMask & | operator &= (DrawableTypeMask &lhs, DrawableTypeMask rhs)
DrawableTypeMask & | operator^= (DrawableTypeMask &lhs, DrawableTypeMask rhs)
RenderTypeMask | operator| (RenderTypeMask lhs, RenderTypeMask rhs)
RenderTypeMask | operator & (RenderTypeMask lhs, RenderTypeMask rhs)
RenderTypeMask | operator^ (RenderTypeMask lhs, RenderTypeMask rhs)
RenderTypeMask | operator~ (RenderTypeMask flags)
RenderTypeMask & | operator|= (RenderTypeMask &lhs, RenderTypeMask rhs)
RenderTypeMask & | operator &= (RenderTypeMask &lhs, RenderTypeMask rhs)
RenderTypeMask & | operator^= (RenderTypeMask &lhs, RenderTypeMask rhs)
BufferMask | operator| (BufferMask lhs, BufferMask rhs)
BufferMask | operator & (BufferMask lhs, BufferMask rhs)
BufferMask | operator^ (BufferMask lhs, BufferMask rhs)
BufferMask | operator~ (BufferMask flags)
BufferMask & | operator|= (BufferMask &lhs, BufferMask rhs)
BufferMask & | operator &= (BufferMask &lhs, BufferMask rhs)
BufferMask & | operator^= (BufferMask &lhs, BufferMask rhs)
EventMask | operator| (EventMask lhs, EventMask rhs)
EventMask | operator & (EventMask lhs, EventMask rhs)
EventMask | operator^ (EventMask lhs, EventMask rhs)
EventMask | operator~ (EventMask flags)
EventMask & | operator|= (EventMask &lhs, EventMask rhs)
EventMask & | operator &= (EventMask &lhs, EventMask rhs)
EventMask & | operator^= (EventMask &lhs, EventMask rhs)
WindowExtProxy | ext (const Glib::RefPtr< Gdk::Window > &window)
const WindowExtProxy | ext (const Glib::RefPtr< const Gdk::Window > &window)
## Variables
GDKMM_GL_VAR const int | SUCCESS
GDKMM_GL_VAR const int | ATTRIB_LIST_NONE
GDKMM_GL_VAR const int | DONT_CARE
GDKMM_GL_VAR const int | NONE

## Function Documentation

const WindowExtProxy Gdk::GL::ext | ( | const Glib::RefPtr< const Gdk::Window > & | window | ) | `[inline]`

  | OpenGL extension API wrapper. This is a Gdk::Window wrapper to invoke OpenGL extension function. See Gdk::GL::WindowExtProxy for available functions. Parameters:
  | window | A Gdk::Window.

WindowExtProxy Gdk::GL::ext | ( | const Glib::RefPtr< Gdk::Window > & | window | ) | `[inline]`

| OpenGL extension API wrapper. This is a Gdk::Window wrapper to invoke OpenGL extension function. See Gdk::GL::WindowExtProxy for available functions. Here is a simple example:
     Glib::RefPtr<Gdk::Window> window = widget.get_window();
     Glib::RefPtr<Gdk::GL::Window> glwindow =
       Gdk::GL::ext(window).set_gl_capability(glconfig);
     std::cout << "OpenGL-capable? "
               << Gdk::GL::ext(window).is_gl_capable()
               << std::endl;
  Parameters:
  | window | A Gdk::Window.

const PixmapExtProxy Gdk::GL::ext | ( | const Glib::RefPtr< const Gdk::Pixmap > & | pixmap | ) | `[inline]`

  | OpenGL extension API wrapper. This is a Gdk::Pixmap wrapper to invoke OpenGL extension function. See Gdk::GL::PixmapExtProxy for available functions. Parameters:
  | pixmap | A Gdk::Pixmap.

PixmapExtProxy Gdk::GL::ext | ( | const Glib::RefPtr< Gdk::Pixmap > & | pixmap | ) | `[inline]`

| OpenGL extension API wrapper. This is a Gdk::Pixmap wrapper to invoke OpenGL extension function. See Gdk::GL::PixmapExtProxy for available functions. Here is a simple example:
     Glib::RefPtr<Gdk::Pixmap> pixmap =
       Gdk::Pixmap::create(0, width, height, glconfig->get_depth());
     Glib::RefPtr<Gdk::GL::Pixmap> glpixmap =
       Gdk::GL::ext(pixmap).set_gl_capability(glconfig);
     std::cout << "OpenGL-capable? "
               << Gdk::GL::ext(pixmap).is_gl_capable()
               << std::endl;
  Parameters:
  | pixmap | A Gdk::Pixmap.
Examples: pixmap-mixed.cc, and pixmap.cc.

GdkGLProc Gdk::GL::get_proc_address | ( | const Glib::ustring & | proc_name | ) |

  | Returns the address of the OpenGL extension functions. Parameters:
  | proc_name | extension function name.
Returns: the address of the extension function named by proc_name.

GdkGLProc Gdk::GL::get_proc_address | ( | const char * | proc_name | ) |

  | Returns the address of the OpenGL extension functions. Parameters:
  | proc_name | extension function name.
Returns: the address of the extension function named by proc_name.

void Gdk::GL::init | ( | int * | argc,
|  | char *** | argv
| ) |

  | Initialize gdkglextmm library. Call this function before using any other gdkglextmm 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. Parameters:
  | 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.

void Gdk::GL::init | ( | int & | argc,
|  | char **& | argv
| ) |

  | Initialize gdkglextmm library. Call this function before using any other gdkglextmm 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. Parameters:
  | argc | Reference of the `argc` parameter of your `main()` function. Changed if any arguments were handled.
  | argv | Reference of the `argv` parameter of `main()`. Any parameters understood by Gdk::GL::init() are stripped before return.

bool Gdk::GL::init_check | ( | int * | argc,
|  | char *** | argv
| ) |

  | Initialize gdkglextmm library. 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. Parameters:
  | 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 library has been successfully initialized, `false` otherwise.

bool Gdk::GL::init_check | ( | int & | argc,
|  | char **& | argv
| ) |

  | Initialize gdkglextmm library. 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. Parameters:
  | argc | Reference of the `argc` parameter of your `main()` function. Changed if any arguments were handled.
  | argv | Reference of the `argv` parameter of `main()`. Any parameters understood by Gdk::GL::init() are stripped before return.
Returns: `true` if the library has been successfully initialized, `false` otherwise.

bool Gdk::GL::query_extension | ( | const Glib::RefPtr< const Gdk::Display > & | display | ) |

bool Gdk::GL::query_extension | ( |  | ) |

| Indicates whether the window system supports the OpenGL extension (GLX, WGL, etc.). Returns: `true` if the OpenGL is supported, `false` otherwise.

bool Gdk::GL::query_gl_extension | ( | const Glib::ustring & | extension | ) |

  | Determines whether a given OpenGL extension is supported. There must be a valid current Gdk::GL::Drawable to call Gdk::GL::Query::gl_extension(). Gdk::GL::Query::gl_extension() returns information about OpenGL extensions only. This means that window system dependent extensions (for example, GLX extensions) are not reported by Gdk::GL::Query::gl_extension(). Parameters:
  | extension | name of OpenGL extension.
Returns: `false` if the OpenGL extension is supported, `true` if not supported.

bool Gdk::GL::query_gl_extension | ( | const char * | extension | ) |

  | Determines whether a given OpenGL extension is supported. There must be a valid current Gdk::GL::Drawable to call Gdk::GL::Query::gl_extension(). Gdk::GL::Query::gl_extension() returns information about OpenGL extensions only. This means that window system dependent extensions (for example, GLX extensions) are not reported by Gdk::GL::Query::gl_extension(). Parameters:
  | extension | name of OpenGL extension.
Returns: `false` if the OpenGL extension is supported, `true` if not supported.

bool Gdk::GL::query_version | ( | const Glib::RefPtr< const Gdk::Display > & | display,
|  | int & | major,
|  | int & | minor
| ) |

bool Gdk::GL::query_version | ( | int & | major,
|  | int & | minor
| ) |

  | Returns the version numbers of the OpenGL extension to the window system. In the X Window System, it returns the GLX version. In the Microsoft Windows, it returns the Windows version. Parameters:
  | major | returns the major version number of the OpenGL extension.
  | minor | returns the minor version number of the OpenGL extension.
Returns: `false` if it fails, `true` otherwise. Examples: font.cc, logo.cc, pixmap-mixed.cc, pixmap.cc, shapes.cc, simple-darea.cc, simple-mixed.cc, and simple.cc.

## Variable Documentation

GDKMM_GL_VAR const int Gdk::GL::ATTRIB_LIST_NONE

GDKMM_GL_VAR const int Gdk::GL::DONT_CARE

GDKMM_GL_VAR const int Gdk::GL::NONE

GDKMM_GL_VAR const int Gdk::GL::SUCCESS