1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380
|
gdk_gl_* functions
Quite straightforward wrapper around few necessary GLX calls and
should be easy to understand if you already know GLX.
gdk_gl_pixmap_* functions
Latest addition, not very well tested yet, enables rendering
to off-screen pixmaps. See examples/glpixmap.c.
---------------------------------------------------------------
NAME
gdk_gl_query - query for OpenGL capability
C SPECIFICATION
gint gdk_gl_query( void )
DESCRIPTION
gdk_gl_query returns TRUE if OpenGL is supported.
SEE ALSO
glXQueryExtension
---------------------------------------------------------------
NAME
gdk_gl_choose_visual - return visual that matches given attributes
C SPECIFICATION
GdkVisual *gdk_gl_choose_visual( int *attrList )
PARAMETERS
attrList
Specifies a list of Boolean attributes and enum/integer
attribute/value pairs. The last attribute must be NULL
DESCRIPTION
gtk_gl_choose_visual returns pointer to a GdkVisual matching
given attributes. If no match is found NULL is returned.
For explanation of attributes see glXChooseVisual man page.
Note that GLX_ prefix of attributes is changed to GDK_GL_ .
SEE ALSO
glXChooseVisual
gdk_gl_context_share_new
---------------------------------------------------------------
NAME
gdk_gl_get_config - return information about visuals
C SPECIFICATION
gint gdk_gl_get_config( GdkVisual *visual, int attrib )
PARAMETERS
visual
Specifies visual to be queried.
attrib
Specifies visual attribute to be returned
DESCRIPTION
gdk_gl_get_config return value of attrib of windows or
gl pixmap created with respect to visual. gdk_gl_get_config
returns -1 if it fails. For explanation of attributes see
glXGetConfig man page. Note that GLX_ prefix is changed to
GDK_GL_.
SEE ALSO
glXGetConfig
---------------------------------------------------------------
NAME
gdk_gl_context_new - create new OpenGL rendering context
C SPECIFICATION
GdkGLContext *gdk_gl_context_new( GdkVisual *visual )
PARAMETERS
visual
Specifies the visual that defines the frame buffer
resources available. It is a pointer to GdkVisual.
DESCRIPTION
This is backwards compatability/convinence
function equal to gdk_gl_context_share_new(visual, NULL, FALSE).
SEE ALSO
glXCreateContext
gdk_gl_choosevisual
gdk_gl_context_share_new
---------------------------------------------------------------
NAME
gdk_gl_context_share_new - create new rendering context
C SPECIFICATION
GdkGLContext *gdk_gl_context_share_new( GdkVisual *visual,
GdkGLContext *sharelist,
gint direct )
PARAMETERS
visual
Pointer to GdkVisual that defines the frame buffer resources
available to the rendering context.
shareList
Context with which to share display lists and textures.
NULL indicates no sharing.
direct
TRUE if direct connection to graphics system.
FALSE if connection through X server.
DESCRIPTION
gdk_gl_context_share_new creates new rendering context
with reference count of 1 and returns pointer to it.
If context creation fails NULL is returned.
SEE ALSO
glXCreateContext
gdk_gl_context_new
gdk_gl_choose_visual
---------------------------------------------------------------
NAME
gdk_gl_context_ref - increase reference count
C SPECIFICATION
GdkGLContext *gdk_gl_context_ref( GdkGLContext *context )
PARAMETERS
context
Pointer to a GdkGLContext.
DESCRIPTION
Increases reference count of context by one, returns context.
SEE ALSO
gdk_gl_context_new
gdk_gl_context_share_new
gdk_gl_context_unref
---------------------------------------------------------------
NAME
gdk_gl_context_unref - decrease reference count
C SPECIFICATION
void gdk_gl_context_unref( GdkGLContext *context )
PARAMETERS
context Pointer to a GdlGLContext.
DESCRIPTION
gdk_gl_context_unref decreases reference count by 1 and
deletes context if it count drops to 0.
SEE ALSO
glXDestroyContext
gdk_gl_context_new
gdk_gl_context_share_new
gdk_gl_context_ref
---------------------------------------------------------------
NAME
gdk_gl_make_current - attach context to drawable
C SPECIFICATION
gint gdk_gl_make_current( GdkDrawable *drawable,
GdkGLContext *context )
DESCRIPTION
gdk_gl_make_current makes context current OpenGL rendering
context, and it attaches context to gdk drawable. Drawable
must have underlying X window and be created with the same
visual as context. gdk_gl_make_current returns TRUE if
successful.
SEE ALSO
glXMakeCurrent
gdk_gl_pixmap_make_current
---------------------------------------------------------------
NAME
gdk_gl_swap_buffers - exchange front and back buffers
C SPECIFICATION
void gdk_gl_swap_buffers( GdkDrawable *drawable )
DESCRIPTION
Promotes back buffer of drawable to front.
SEE ALSO
glXSwapBuffers
---------------------------------------------------------------
NAME
gdk_gl_wait_gdk - complete gdk execution
C SRECIFICATION
void gdk_gl_wait_gdk( void )
DESCRIPTION
Gdk rendering calls made prior to gtk_gl_wait_gdk are
guarateed to be executed before OpenGL calls made
after gdk_gl_wait_gdk.
SEE ALSO
glXWaitX
gdk_gl_wait_gl
---------------------------------------------------------------
NAME
gdk_gl_wait_gl - complete OpenGL execution
C SRECIFICATION
void gdk_gl_wait_gl( void )
DESCRIPTION
OpenGL rendering calls made prior to gtk_gl_wait_gdk are
are guarateed to be executed before OpenGL calls made
after gdk_gl_wait_gdk.
SEE ALSO
glXWaitGL
gdk_gl_wait_gdk
---------------------------------------------------------------
NAME
gdk_gl_pixmap_new - create an off screen rendering area
C SPECIFICATION
GdkGLPixmap *gdk_gl_pixmap_new( GdkVisual *visual,
GdkPixmap *pixmap )
DESCRIPTION
gdk_gl_pixmap_new returns pointer to new GdkGLPixmap with
reference count of 1. pixmap will become front left buffer
of GdkGLPixmap.
SEE ALSO
glXCreateGLXPixmap
gdk_gl_pixmap_ref
gdk_gl_pixmap_unref
---------------------------------------------------------------
NAME
gdk_gl_pixmap_ref - increase glpixmap reference count
C SPECIFICATION
GdkGLPixmap *gdk_gl_pixmap_ref( GdkGLPixmap *glpixmap )
PARAMETERS
glpixmap
a pointer to GdkGLPixmap
DESCRIPTION
SEE ALSO
gdk_gl_pixmap_new
gdk_gl_pixmap_unref
---------------------------------------------------------------
NAME
gdk_gl_pixmap_unref - decrease glpixmap reference count
C SPECIFICATION
void gdk_gl_pixmap_unref( GdkGLPixmap *glpixmap )
PARAMETERS
glpixmap
a pointer to GdkGLPixmap
DESCRIPTION
gdk_gl_pixmap_unref decreases reference count of
GdkGLPixmap by 1 and deletes pixmap if reference count
reaches 0.
SEE ALSO
glXDestroyGLXPixmap
gdk_gl_pixmap_new
gdk_gl_pixmap_ref
---------------------------------------------------------------
NAME
gdk_gl_pixmap_make_current - attach context to glpixmap
C SPECIFICATION
gint gdk_gl_pixmap_make_current( GdkGLPixmap *glpixmap,
GdkGLContext *context )
PARAMETERS
glpixmap
a pointer to GdkGLPixmap
context
a pointer to GdkGLContext
DESCRIPTION
gdk_gl_pixmap_make_current make context current OpenGL
rendering context, and it attaches context to glpixmap.
gdk_gl_pixmap_make_current returns TRUE of successful.
SEE ALSO
glXMakeCurrent
gdk_gl_make_current
---------------------------------------------------------------
NAME
gdk_gl_use_gdk_font
C SPECIFICATION
void gdk_gl_use_gdk_font( GdkFont *font,
int first,
int count,
int list_base )
PARAMETERS
font
Pointer to GdkFont structure, font type must be GDK_FONT_FONT.
first
Specifies the index of the first font glyph to be taken
count
Specifies the number of glyphs to be taken.
list_base
Specifies the index of the first display list to be generated.
DESCRIPTION
gdk_gl_use_gdk_font generates count display lists, named list_base
through list_base+count-1, each containing a single glBitmap command.
gdk_gl_use_gdk_font is ignored if there is no current context.
SEE ALSO
glXUseXFont
|