File: GtkGLArea.html

package info (click to toggle)
gtk%2B3.0 3.22.11-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 182,828 kB
  • ctags: 82,378
  • sloc: ansic: 1,165,043; xml: 9,259; makefile: 6,914; sh: 5,179; python: 402; perl: 370; cpp: 34; sed: 16
file content (1353 lines) | stat: -rw-r--r-- 77,651 bytes parent folder | download
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
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkGLArea: GTK+ 3 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
<link rel="up" href="MiscObjects.html" title="Miscellaneous">
<link rel="prev" href="GtkDrawingArea.html" title="GtkDrawingArea">
<link rel="next" href="GtkEventBox.html" title="GtkEventBox">
<meta name="generator" content="GTK-Doc V1.25.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#GtkGLArea.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#GtkGLArea.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces">  <span class="dim">|</span> 
                  <a href="#GtkGLArea.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties">  <span class="dim">|</span> 
                  <a href="#GtkGLArea.properties" class="shortcut">Properties</a></span><span id="nav_signals">  <span class="dim">|</span> 
                  <a href="#GtkGLArea.signals" class="shortcut">Signals</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="MiscObjects.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GtkDrawingArea.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GtkEventBox.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GtkGLArea"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkGLArea.top_of_page"></a>GtkGLArea</span></h2>
<p>GtkGLArea — A widget for custom drawing with OpenGL</p>
</td>
<td class="gallery_image" valign="top" align="right"><img src="glarea.png"></td>
</tr></table></div>
<div class="refsect1">
<a name="GtkGLArea.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkGLArea.html#gtk-gl-area-new" title="gtk_gl_area_new ()">gtk_gl_area_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/gdk3/GdkGLContext.html#GdkGLContext-struct"><span class="returnvalue">GdkGLContext</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkGLArea.html#gtk-gl-area-get-context" title="gtk_gl_area_get_context ()">gtk_gl_area_get_context</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkGLArea.html#gtk-gl-area-make-current" title="gtk_gl_area_make_current ()">gtk_gl_area_make_current</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkGLArea.html#gtk-gl-area-queue-render" title="gtk_gl_area_queue_render ()">gtk_gl_area_queue_render</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkGLArea.html#gtk-gl-area-attach-buffers" title="gtk_gl_area_attach_buffers ()">gtk_gl_area_attach_buffers</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkGLArea.html#gtk-gl-area-set-error" title="gtk_gl_area_set_error ()">gtk_gl_area_set_error</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkGLArea.html#gtk-gl-area-get-error" title="gtk_gl_area_get_error ()">gtk_gl_area_get_error</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkGLArea.html#gtk-gl-area-set-has-alpha" title="gtk_gl_area_set_has_alpha ()">gtk_gl_area_set_has_alpha</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkGLArea.html#gtk-gl-area-get-has-alpha" title="gtk_gl_area_get_has_alpha ()">gtk_gl_area_get_has_alpha</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkGLArea.html#gtk-gl-area-set-has-depth-buffer" title="gtk_gl_area_set_has_depth_buffer ()">gtk_gl_area_set_has_depth_buffer</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkGLArea.html#gtk-gl-area-get-has-depth-buffer" title="gtk_gl_area_get_has_depth_buffer ()">gtk_gl_area_get_has_depth_buffer</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkGLArea.html#gtk-gl-area-set-has-stencil-buffer" title="gtk_gl_area_set_has_stencil_buffer ()">gtk_gl_area_set_has_stencil_buffer</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkGLArea.html#gtk-gl-area-get-has-stencil-buffer" title="gtk_gl_area_get_has_stencil_buffer ()">gtk_gl_area_get_has_stencil_buffer</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkGLArea.html#gtk-gl-area-set-auto-render" title="gtk_gl_area_set_auto_render ()">gtk_gl_area_set_auto_render</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkGLArea.html#gtk-gl-area-get-auto-render" title="gtk_gl_area_get_auto_render ()">gtk_gl_area_get_auto_render</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkGLArea.html#gtk-gl-area-get-required-version" title="gtk_gl_area_get_required_version ()">gtk_gl_area_get_required_version</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkGLArea.html#gtk-gl-area-set-required-version" title="gtk_gl_area_set_required_version ()">gtk_gl_area_set_required_version</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkGLArea.html#gtk-gl-area-set-use-es" title="gtk_gl_area_set_use_es ()">gtk_gl_area_set_use_es</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkGLArea.html#gtk-gl-area-get-use-es" title="gtk_gl_area_get_use_es ()">gtk_gl_area_get_use_es</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkGLArea.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="GtkGLArea.html#GtkGLArea--auto-render" title="The “auto-render” property">auto-render</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type">
<a href="http://developer.gnome.org/gdk3/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a> *</td>
<td class="property_name"><a class="link" href="GtkGLArea.html#GtkGLArea--context" title="The “context” property">context</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="GtkGLArea.html#GtkGLArea--has-alpha" title="The “has-alpha” property">has-alpha</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="GtkGLArea.html#GtkGLArea--has-depth-buffer" title="The “has-depth-buffer” property">has-depth-buffer</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="GtkGLArea.html#GtkGLArea--has-stencil-buffer" title="The “has-stencil-buffer” property">has-stencil-buffer</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="GtkGLArea.html#GtkGLArea--use-es" title="The “use-es” property">use-es</a></td>
<td class="property_flags">Read / Write</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkGLArea.signals"></a><h2>Signals</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="signals_return">
<col width="300px" class="signals_name">
<col width="200px" class="signals_flags">
</colgroup>
<tbody>
<tr>
<td class="signal_type">
<a href="http://developer.gnome.org/gdk3/GdkGLContext.html#GdkGLContext-struct"><span class="returnvalue">GdkGLContext</span></a>*</td>
<td class="signal_name"><a class="link" href="GtkGLArea.html#GtkGLArea-create-context" title="The “create-context” signal">create-context</a></td>
<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
</tr>
<tr>
<td class="signal_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a></td>
<td class="signal_name"><a class="link" href="GtkGLArea.html#GtkGLArea-render" title="The “render” signal">render</a></td>
<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
</tr>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GtkGLArea.html#GtkGLArea-resize" title="The “resize” signal">resize</a></td>
<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkGLArea.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GtkGLArea.html#GtkGLArea-struct" title="struct GtkGLArea">GtkGLArea</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GtkGLArea.html#GtkGLAreaClass" title="struct GtkGLAreaClass">GtkGLAreaClass</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkGLArea.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
    <span class="lineart">╰──</span> <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
        <span class="lineart">╰──</span> <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
            <span class="lineart">╰──</span> GtkGLArea
</pre>
</div>
<div class="refsect1">
<a name="GtkGLArea.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
GtkGLArea implements
 AtkImplementorIface and  <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a>.</p>
</div>
<div class="refsect1">
<a name="GtkGLArea.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gtk/gtk.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GtkGLArea.description"></a><h2>Description</h2>
<p><a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> is a widget that allows drawing with OpenGL.</p>
<p><a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> sets up its own <a href="http://developer.gnome.org/gdk3/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a> for the window it creates, and
creates a custom GL framebuffer that the widget will do GL rendering onto.
It also ensures that this framebuffer is the default GL rendering target
when rendering.</p>
<p>In order to draw, you have to connect to the <a class="link" href="GtkGLArea.html#GtkGLArea-render" title="The “render” signal"><span class="type">“render”</span></a> signal,
or subclass <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> and override the <em class="parameter"><code>GtkGLAreaClass.render()</code></em>
 virtual
function.</p>
<p>The <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> widget ensures that the <a href="http://developer.gnome.org/gdk3/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a> is associated with
the widget's drawing area, and it is kept updated when the size and
position of the drawing area changes.</p>
<div class="refsect3">
<a name="id-1.3.19.5.10.6"></a><h4>Drawing with GtkGLArea</h4>
<p>The simplest way to draw using OpenGL commands in a <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> is to
create a widget instance and connect to the <a class="link" href="GtkGLArea.html#GtkGLArea-render" title="The “render” signal"><span class="type">“render”</span></a> signal:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="gtkdoc slc">// create a GtkGLArea instance</span>
GtkWidget <span class="gtkdoc opt">*</span>gl_area <span class="gtkdoc opt">=</span> <span class="function"><a href="GtkGLArea.html#gtk-gl-area-new">gtk_gl_area_new</a></span> <span class="gtkdoc opt">();</span>

<span class="gtkdoc slc">// connect to the &quot;render&quot; signal</span>
<span class="function"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#g-signal-connect">g_signal_connect</a></span> <span class="gtkdoc opt">(</span>gl_area<span class="gtkdoc opt">,</span> <span class="string">&quot;render&quot;</span><span class="gtkdoc opt">,</span> <span class="function"><a href="https://developer.gnome.org/gobject/unstable/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span> <span class="gtkdoc opt">(</span>render<span class="gtkdoc opt">),</span> NULL<span class="gtkdoc opt">);</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<p>The <code class="literal"><code class="function">render()</code></code> function will be called when the <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> is ready
for you to draw its content:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="gtkdoc kwb">static</span> gboolean
<span class="function">render</span> <span class="gtkdoc opt">(</span>GtkGLArea <span class="gtkdoc opt">*</span>area<span class="gtkdoc opt">,</span> GdkGLContext <span class="gtkdoc opt">*</span>context<span class="gtkdoc opt">)</span>
<span class="gtkdoc opt">{</span>
  <span class="gtkdoc slc">// inside this function it&apos;s safe to use GL; the given</span>
  <span class="gtkdoc slc">// #GdkGLContext has been made current to the drawable</span>
  <span class="gtkdoc slc">// surface used by the #GtkGLArea and the viewport has</span>
  <span class="gtkdoc slc">// already been set to be the size of the allocation</span>

  <span class="gtkdoc slc">// we can start by clearing the buffer</span>
  <span class="function">glClearColor</span> <span class="gtkdoc opt">(</span><span class="number">0</span><span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">);</span>
  <span class="function">glClear</span> <span class="gtkdoc opt">(</span>GL_COLOR_BUFFER_BIT<span class="gtkdoc opt">);</span>

  <span class="gtkdoc slc">// draw your object</span>
  <span class="function">draw_an_object</span> <span class="gtkdoc opt">();</span>

  <span class="gtkdoc slc">// we completed our drawing; the draw commands will be</span>
  <span class="gtkdoc slc">// flushed at the end of the signal emission chain, and</span>
  <span class="gtkdoc slc">// the buffers will be drawn on the window</span>
  <span class="keyword">return</span> TRUE<span class="gtkdoc opt">;</span>
<span class="gtkdoc opt">}</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<p>If you need to initialize OpenGL state, e.g. buffer objects or
shaders, you should use the <a class="link" href="GtkWidget.html#GtkWidget-realize" title="The “realize” signal"><span class="type">“realize”</span></a> signal; you
can use the <a class="link" href="GtkWidget.html#GtkWidget-unrealize" title="The “unrealize” signal"><span class="type">“unrealize”</span></a> signal to clean up. Since the
<a href="http://developer.gnome.org/gdk3/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a> creation and initialization may fail, you will
need to check for errors, using <a class="link" href="GtkGLArea.html#gtk-gl-area-get-error" title="gtk_gl_area_get_error ()"><code class="function">gtk_gl_area_get_error()</code></a>. An example
of how to safely initialize the GL state is:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>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</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="gtkdoc kwb">static void</span>
<span class="function">on_realize</span> <span class="gtkdoc opt">(</span>GtkGLarea <span class="gtkdoc opt">*</span>area<span class="gtkdoc opt">)</span>
<span class="gtkdoc opt">{</span>
  <span class="gtkdoc slc">// We need to make the context current if we want to</span>
  <span class="gtkdoc slc">// call GL API</span>
  <span class="function"><a href="GtkGLArea.html#gtk-gl-area-make-current">gtk_gl_area_make_current</a></span> <span class="gtkdoc opt">(</span>area<span class="gtkdoc opt">);</span>

  <span class="gtkdoc slc">// If there were errors during the initialization or</span>
  <span class="gtkdoc slc">// when trying to make the context current, this</span>
  <span class="gtkdoc slc">// function will return a #GError for you to catch</span>
  <span class="keyword">if</span> <span class="gtkdoc opt">(</span><span class="function"><a href="GtkGLArea.html#gtk-gl-area-get-error">gtk_gl_area_get_error</a></span> <span class="gtkdoc opt">(</span>area<span class="gtkdoc opt">) !=</span> NULL<span class="gtkdoc opt">)</span>
    <span class="keyword">return</span><span class="gtkdoc opt">;</span>

  <span class="gtkdoc slc">// You can also use gtk_gl_area_set_error() in order</span>
  <span class="gtkdoc slc">// to show eventual initialization errors on the</span>
  <span class="gtkdoc slc">// GtkGLArea widget itself</span>
  GError <span class="gtkdoc opt">*</span>internal_error <span class="gtkdoc opt">=</span> NULL<span class="gtkdoc opt">;</span>
  <span class="function">init_buffer_objects</span> <span class="gtkdoc opt">(&amp;</span>error<span class="gtkdoc opt">);</span>
  <span class="keyword">if</span> <span class="gtkdoc opt">(</span>error <span class="gtkdoc opt">!=</span> NULL<span class="gtkdoc opt">)</span>
    <span class="gtkdoc opt">{</span>
      <span class="function"><a href="GtkGLArea.html#gtk-gl-area-set-error">gtk_gl_area_set_error</a></span> <span class="gtkdoc opt">(</span>area<span class="gtkdoc opt">,</span> error<span class="gtkdoc opt">);</span>
      <span class="function"><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#g-error-free">g_error_free</a></span> <span class="gtkdoc opt">(</span>error<span class="gtkdoc opt">);</span>
      <span class="keyword">return</span><span class="gtkdoc opt">;</span>
    <span class="gtkdoc opt">}</span>

  <span class="function">init_shaders</span> <span class="gtkdoc opt">(&amp;</span>error<span class="gtkdoc opt">);</span>
  <span class="keyword">if</span> <span class="gtkdoc opt">(</span>error <span class="gtkdoc opt">!=</span> NULL<span class="gtkdoc opt">)</span>
    <span class="gtkdoc opt">{</span>
      <span class="function"><a href="GtkGLArea.html#gtk-gl-area-set-error">gtk_gl_area_set_error</a></span> <span class="gtkdoc opt">(</span>area<span class="gtkdoc opt">,</span> error<span class="gtkdoc opt">);</span>
      <span class="function"><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#g-error-free">g_error_free</a></span> <span class="gtkdoc opt">(</span>error<span class="gtkdoc opt">);</span>
      <span class="keyword">return</span><span class="gtkdoc opt">;</span>
    <span class="gtkdoc opt">}</span>
<span class="gtkdoc opt">}</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<p>If you need to change the options for creating the <a href="http://developer.gnome.org/gdk3/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a>
you should use the <a class="link" href="GtkGLArea.html#GtkGLArea-create-context" title="The “create-context” signal"><span class="type">“create-context”</span></a> signal.</p>
</div>
</div>
<div class="refsect1">
<a name="GtkGLArea.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gtk-gl-area-new"></a><h3>gtk_gl_area_new ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_gl_area_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Creates a new <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> widget.</p>
<div class="refsect3">
<a name="gtk-gl-area-new.returns"></a><h4>Returns</h4>
<p> the newly created <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gl-area-get-context"></a><h3>gtk_gl_area_get_context ()</h3>
<pre class="programlisting"><a href="http://developer.gnome.org/gdk3/GdkGLContext.html#GdkGLContext-struct"><span class="returnvalue">GdkGLContext</span></a> *
gtk_gl_area_get_context (<em class="parameter"><code><a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> *area</code></em>);</pre>
<p>Retrieves the <a href="http://developer.gnome.org/gdk3/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a> used by <em class="parameter"><code>area</code></em>
.</p>
<div class="refsect3">
<a name="gtk-gl-area-get-context.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>area</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-gl-area-get-context.returns"></a><h4>Returns</h4>
<p> the <a href="http://developer.gnome.org/gdk3/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a>. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gl-area-make-current"></a><h3>gtk_gl_area_make_current ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_gl_area_make_current (<em class="parameter"><code><a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> *area</code></em>);</pre>
<p>Ensures that the <a href="http://developer.gnome.org/gdk3/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a> used by <em class="parameter"><code>area</code></em>
 is associated with
the <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a>.</p>
<p>This function is automatically called before emitting the
<a class="link" href="GtkGLArea.html#GtkGLArea-render" title="The “render” signal"><span class="type">“render”</span></a> signal, and doesn't normally need to be called
by application code.</p>
<div class="refsect3">
<a name="gtk-gl-area-make-current.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>area</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gl-area-queue-render"></a><h3>gtk_gl_area_queue_render ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_gl_area_queue_render (<em class="parameter"><code><a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> *area</code></em>);</pre>
<p>Marks the currently rendered data (if any) as invalid, and queues
a redraw of the widget, ensuring that the <a class="link" href="GtkGLArea.html#GtkGLArea-render" title="The “render” signal"><span class="type">“render”</span></a> signal
is emitted during the draw.</p>
<p>This is only needed when the <a class="link" href="GtkGLArea.html#gtk-gl-area-set-auto-render" title="gtk_gl_area_set_auto_render ()"><code class="function">gtk_gl_area_set_auto_render()</code></a> has
been called with a <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> value. The default behaviour is to
emit <a class="link" href="GtkGLArea.html#GtkGLArea-render" title="The “render” signal"><span class="type">“render”</span></a> on each draw.</p>
<div class="refsect3">
<a name="gtk-gl-area-queue-render.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>area</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gl-area-attach-buffers"></a><h3>gtk_gl_area_attach_buffers ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_gl_area_attach_buffers (<em class="parameter"><code><a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> *area</code></em>);</pre>
<p>Ensures that the <em class="parameter"><code>area</code></em>
 framebuffer object is made the current draw
and read target, and that all the required buffers for the <em class="parameter"><code>area</code></em>

are created and bound to the frambuffer.</p>
<p>This function is automatically called before emitting the
<a class="link" href="GtkGLArea.html#GtkGLArea-render" title="The “render” signal"><span class="type">“render”</span></a> signal, and doesn't normally need to be called
by application code.</p>
<div class="refsect3">
<a name="gtk-gl-area-attach-buffers.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>area</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gl-area-set-error"></a><h3>gtk_gl_area_set_error ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_gl_area_set_error (<em class="parameter"><code><a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> *area</code></em>,
                       <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>);</pre>
<p>Sets an error on the area which will be shown instead of the
GL rendering. This is useful in the <a class="link" href="GtkGLArea.html#GtkGLArea-create-context" title="The “create-context” signal"><span class="type">“create-context”</span></a>
signal if GL context creation fails.</p>
<div class="refsect3">
<a name="gtk-gl-area-set-error.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>area</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p> a new <a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to unset the error. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gl-area-get-error"></a><h3>gtk_gl_area_get_error ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> *
gtk_gl_area_get_error (<em class="parameter"><code><a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> *area</code></em>);</pre>
<p>Gets the current error set on the <em class="parameter"><code>area</code></em>
.</p>
<div class="refsect3">
<a name="gtk-gl-area-get-error.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>area</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-gl-area-get-error.returns"></a><h4>Returns</h4>
<p> the <a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gl-area-set-has-alpha"></a><h3>gtk_gl_area_set_has_alpha ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_gl_area_set_has_alpha (<em class="parameter"><code><a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> *area</code></em>,
                           <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> has_alpha</code></em>);</pre>
<p>If <em class="parameter"><code>has_alpha</code></em>
 is <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> the buffer allocated by the widget will have
an alpha channel component, and when rendering to the window the
result will be composited over whatever is below the widget.</p>
<p>If <em class="parameter"><code>has_alpha</code></em>
 is <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> there will be no alpha channel, and the
buffer will fully replace anything below the widget.</p>
<div class="refsect3">
<a name="gtk-gl-area-set-has-alpha.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>area</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>has_alpha</p></td>
<td class="parameter_description"><p><a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to add an alpha component</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gl-area-get-has-alpha"></a><h3>gtk_gl_area_get_has_alpha ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gtk_gl_area_get_has_alpha (<em class="parameter"><code><a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> *area</code></em>);</pre>
<p>Returns whether the area has an alpha component.</p>
<div class="refsect3">
<a name="gtk-gl-area-get-has-alpha.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>area</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-gl-area-get-has-alpha.returns"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <em class="parameter"><code>area</code></em>
has an alpha component, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gl-area-set-has-depth-buffer"></a><h3>gtk_gl_area_set_has_depth_buffer ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_gl_area_set_has_depth_buffer (<em class="parameter"><code><a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> *area</code></em>,
                                  <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> has_depth_buffer</code></em>);</pre>
<p>If <em class="parameter"><code>has_depth_buffer</code></em>
 is <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> the widget will allocate and
enable a depth buffer for the target framebuffer. Otherwise
there will be none.</p>
<div class="refsect3">
<a name="gtk-gl-area-set-has-depth-buffer.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>area</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>has_depth_buffer</p></td>
<td class="parameter_description"><p><a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to add a depth buffer</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gl-area-get-has-depth-buffer"></a><h3>gtk_gl_area_get_has_depth_buffer ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gtk_gl_area_get_has_depth_buffer (<em class="parameter"><code><a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> *area</code></em>);</pre>
<p>Returns whether the area has a depth buffer.</p>
<div class="refsect3">
<a name="gtk-gl-area-get-has-depth-buffer.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>area</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-gl-area-get-has-depth-buffer.returns"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <em class="parameter"><code>area</code></em>
has a depth buffer, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gl-area-set-has-stencil-buffer"></a><h3>gtk_gl_area_set_has_stencil_buffer ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_gl_area_set_has_stencil_buffer (<em class="parameter"><code><a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> *area</code></em>,
                                    <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> has_stencil_buffer</code></em>);</pre>
<p>If <em class="parameter"><code>has_stencil_buffer</code></em>
 is <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> the widget will allocate and
enable a stencil buffer for the target framebuffer. Otherwise
there will be none.</p>
<div class="refsect3">
<a name="gtk-gl-area-set-has-stencil-buffer.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>area</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>has_stencil_buffer</p></td>
<td class="parameter_description"><p><a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to add a stencil buffer</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gl-area-get-has-stencil-buffer"></a><h3>gtk_gl_area_get_has_stencil_buffer ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gtk_gl_area_get_has_stencil_buffer (<em class="parameter"><code><a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> *area</code></em>);</pre>
<p>Returns whether the area has a stencil buffer.</p>
<div class="refsect3">
<a name="gtk-gl-area-get-has-stencil-buffer.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>area</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-gl-area-get-has-stencil-buffer.returns"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <em class="parameter"><code>area</code></em>
has a stencil buffer, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gl-area-set-auto-render"></a><h3>gtk_gl_area_set_auto_render ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_gl_area_set_auto_render (<em class="parameter"><code><a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> *area</code></em>,
                             <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> auto_render</code></em>);</pre>
<p>If <em class="parameter"><code>auto_render</code></em>
 is <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> the <a class="link" href="GtkGLArea.html#GtkGLArea-render" title="The “render” signal"><span class="type">“render”</span></a> signal will be
emitted every time the widget draws. This is the default and is
useful if drawing the widget is faster.</p>
<p>If <em class="parameter"><code>auto_render</code></em>
 is <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> the data from previous rendering is kept
around and will be used for drawing the widget the next time,
unless the window is resized. In order to force a rendering
<a class="link" href="GtkGLArea.html#gtk-gl-area-queue-render" title="gtk_gl_area_queue_render ()"><code class="function">gtk_gl_area_queue_render()</code></a> must be called. This mode is useful when
the scene changes seldomly, but takes a long time to redraw.</p>
<div class="refsect3">
<a name="gtk-gl-area-set-auto-render.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>area</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>auto_render</p></td>
<td class="parameter_description"><p>a boolean</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gl-area-get-auto-render"></a><h3>gtk_gl_area_get_auto_render ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gtk_gl_area_get_auto_render (<em class="parameter"><code><a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> *area</code></em>);</pre>
<p>Returns whether the area is in auto render mode or not.</p>
<div class="refsect3">
<a name="gtk-gl-area-get-auto-render.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>area</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-gl-area-get-auto-render.returns"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <em class="parameter"><code>area</code></em>
is auto rendering, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gl-area-get-required-version"></a><h3>gtk_gl_area_get_required_version ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_gl_area_get_required_version (<em class="parameter"><code><a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> *area</code></em>,
                                  <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *major</code></em>,
                                  <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *minor</code></em>);</pre>
<p>Retrieves the required version of OpenGL set
using <a class="link" href="GtkGLArea.html#gtk-gl-area-set-required-version" title="gtk_gl_area_set_required_version ()"><code class="function">gtk_gl_area_set_required_version()</code></a>.</p>
<div class="refsect3">
<a name="gtk-gl-area-get-required-version.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>area</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>major</p></td>
<td class="parameter_description"><p> return location for the required major version. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>minor</p></td>
<td class="parameter_description"><p> return location for the required minor version. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gl-area-set-required-version"></a><h3>gtk_gl_area_set_required_version ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_gl_area_set_required_version (<em class="parameter"><code><a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> *area</code></em>,
                                  <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> major</code></em>,
                                  <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> minor</code></em>);</pre>
<p>Sets the required version of OpenGL to be used when creating the context
for the widget.</p>
<p>This function must be called before the area has been realized.</p>
<div class="refsect3">
<a name="gtk-gl-area-set-required-version.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>area</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>major</p></td>
<td class="parameter_description"><p>the major version</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>minor</p></td>
<td class="parameter_description"><p>the minor version</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gl-area-set-use-es"></a><h3>gtk_gl_area_set_use_es ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_gl_area_set_use_es (<em class="parameter"><code><a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> *area</code></em>,
                        <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use_es</code></em>);</pre>
<p>Sets whether the <em class="parameter"><code>area</code></em>
 should create an OpenGL or an OpenGL ES context.</p>
<p>You should check the capabilities of the <a href="http://developer.gnome.org/gdk3/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a> before drawing
with either API.</p>
<div class="refsect3">
<a name="gtk-gl-area-set-use-es.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>area</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>use_es</p></td>
<td class="parameter_description"><p>whether to use OpenGL or OpenGL ES</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-22.html#api-index-3.22">3.22</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gl-area-get-use-es"></a><h3>gtk_gl_area_get_use_es ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gtk_gl_area_get_use_es (<em class="parameter"><code><a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> *area</code></em>);</pre>
<p>Retrieves the value set by <a class="link" href="GtkGLArea.html#gtk-gl-area-set-use-es" title="gtk_gl_area_set_use_es ()"><code class="function">gtk_gl_area_set_use_es()</code></a>.</p>
<div class="refsect3">
<a name="gtk-gl-area-get-use-es.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>area</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-gl-area-get-use-es.returns"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> should create an OpenGL ES context
and <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-22.html#api-index-3.22">3.22</a></p>
</div>
</div>
<div class="refsect1">
<a name="GtkGLArea.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GtkGLArea-struct"></a><h3>struct GtkGLArea</h3>
<pre class="programlisting">struct GtkGLArea;</pre>
<p>A <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> used for drawing with OpenGL.</p>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GtkGLAreaClass"></a><h3>struct GtkGLAreaClass</h3>
<pre class="programlisting">struct GtkGLAreaClass {
  gboolean       (* render)         (GtkGLArea        *area,
                                     GdkGLContext     *context);
  void           (* resize)         (GtkGLArea        *area,
                                     int               width,
                                     int               height);
  GdkGLContext * (* create_context) (GtkGLArea        *area);
};
</pre>
<p>The <code class="literal">GtkGLAreaClass</code> structure contains only private data.</p>
<div class="refsect3">
<a name="GtkGLAreaClass.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkGLAreaClass.render"></a>render</code></em> ()</p></td>
<td class="struct_member_description"><p>class closure for the <a class="link" href="GtkGLArea.html#GtkGLArea-render" title="The “render” signal"><span class="type">“render”</span></a> signal</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkGLAreaClass.resize"></a>resize</code></em> ()</p></td>
<td class="struct_member_description"><p>class closeure for the <a class="link" href="GtkGLArea.html#GtkGLArea-resize" title="The “resize” signal"><span class="type">“resize”</span></a> signal</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkGLAreaClass.create-context"></a>create_context</code></em> ()</p></td>
<td class="struct_member_description"><p>class closure for the <a class="link" href="GtkGLArea.html#GtkGLArea-create-context" title="The “create-context” signal"><span class="type">“create-context”</span></a> signal</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
</div>
<div class="refsect1">
<a name="GtkGLArea.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GtkGLArea--auto-render"></a><h3>The <code class="literal">“auto-render”</code> property</h3>
<pre class="programlisting">  “auto-render”              <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>If set to <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> the <a class="link" href="GtkGLArea.html#GtkGLArea-render" title="The “render” signal"><span class="type">“render”</span></a> signal will be emitted every time
the widget draws. This is the default and is useful if drawing the widget
is faster.</p>
<p>If set to <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> the data from previous rendering is kept around and will
be used for drawing the widget the next time, unless the window is resized.
In order to force a rendering <a class="link" href="GtkGLArea.html#gtk-gl-area-queue-render" title="gtk_gl_area_queue_render ()"><code class="function">gtk_gl_area_queue_render()</code></a> must be called.
This mode is useful when the scene changes seldomly, but takes a long time
to redraw.</p>
<p>Flags: Read / Write</p>
<p>Default value: TRUE</p>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GtkGLArea--context"></a><h3>The <code class="literal">“context”</code> property</h3>
<pre class="programlisting">  “context”                  <a href="http://developer.gnome.org/gdk3/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a> *</pre>
<p>The <a href="http://developer.gnome.org/gdk3/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a> used by the <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> widget.</p>
<p>The <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> widget is responsible for creating the <a href="http://developer.gnome.org/gdk3/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a>
instance. If you need to render with other kinds of buffers (stencil,
depth, etc), use render buffers.</p>
<p>Flags: Read</p>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GtkGLArea--has-alpha"></a><h3>The <code class="literal">“has-alpha”</code> property</h3>
<pre class="programlisting">  “has-alpha”                <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>If set to <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> the buffer allocated by the widget will have an alpha channel
component, and when rendering to the window the result will be composited over
whatever is below the widget.</p>
<p>If set to <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> there will be no alpha channel, and the buffer will fully
replace anything below the widget.</p>
<p>Flags: Read / Write</p>
<p>Default value: FALSE</p>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GtkGLArea--has-depth-buffer"></a><h3>The <code class="literal">“has-depth-buffer”</code> property</h3>
<pre class="programlisting">  “has-depth-buffer”         <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>If set to <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> the widget will allocate and enable a depth buffer for the
target framebuffer.</p>
<p>Flags: Read / Write</p>
<p>Default value: FALSE</p>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GtkGLArea--has-stencil-buffer"></a><h3>The <code class="literal">“has-stencil-buffer”</code> property</h3>
<pre class="programlisting">  “has-stencil-buffer”       <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>If set to <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> the widget will allocate and enable a stencil buffer for the
target framebuffer.</p>
<p>Flags: Read / Write</p>
<p>Default value: FALSE</p>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GtkGLArea--use-es"></a><h3>The <code class="literal">“use-es”</code> property</h3>
<pre class="programlisting">  “use-es”                   <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>If set to <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> the widget will try to create a <a href="http://developer.gnome.org/gdk3/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a> using
OpenGL ES instead of OpenGL.</p>
<p>See also: <a href="http://developer.gnome.org/gdk3/GdkGLContext.html#gdk-gl-context-set-use-es"><code class="function">gdk_gl_context_set_use_es()</code></a></p>
<p>Flags: Read / Write</p>
<p>Default value: FALSE</p>
<p class="since">Since: <a class="link" href="api-index-3-22.html#api-index-3.22">3.22</a></p>
</div>
</div>
<div class="refsect1">
<a name="GtkGLArea.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GtkGLArea-create-context"></a><h3>The <code class="literal">“create-context”</code> signal</h3>
<pre class="programlisting"><a href="http://developer.gnome.org/gdk3/GdkGLContext.html#GdkGLContext-struct"><span class="returnvalue">GdkGLContext</span></a>*
user_function (<a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> *area,
               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>   user_data)</pre>
<p>The ::create-context signal is emitted when the widget is being
realized, and allows you to override how the GL context is
created. This is useful when you want to reuse an existing GL
context, or if you want to try creating different kinds of GL
options.</p>
<p>If context creation fails then the signal handler can use
<a class="link" href="GtkGLArea.html#gtk-gl-area-set-error" title="gtk_gl_area_set_error ()"><code class="function">gtk_gl_area_set_error()</code></a> to register a more detailed error
of how the construction failed.</p>
<div class="refsect3">
<a name="GtkGLArea-create-context.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>area</p></td>
<td class="parameter_description"><p>the <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> that emitted the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p> location to store error information on failure. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="GtkGLArea-create-context.returns"></a><h4>Returns</h4>
<p> a newly created <a href="http://developer.gnome.org/gdk3/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a>;
the <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> widget will take ownership of the returned value. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GtkGLArea-render"></a><h3>The <code class="literal">“render”</code> signal</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
user_function (<a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a>    *area,
               <a href="http://developer.gnome.org/gdk3/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a> *context,
               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)</pre>
<p>The ::render signal is emitted every time the contents
of the <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> should be redrawn.</p>
<p>The <em class="parameter"><code>context</code></em>
 is bound to the <em class="parameter"><code>area</code></em>
 prior to emitting this function,
and the buffers are painted to the window once the emission terminates.</p>
<div class="refsect3">
<a name="GtkGLArea-render.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>area</p></td>
<td class="parameter_description"><p>the <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> that emitted the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>context</p></td>
<td class="parameter_description"><p>the <a href="http://developer.gnome.org/gdk3/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a> used by <em class="parameter"><code>area</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="GtkGLArea-render.returns"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to stop other handlers from being invoked for the event.
<a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> to propagate the event further.</p>
</div>
<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GtkGLArea-resize"></a><h3>The <code class="literal">“resize”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> *area,
               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>       width,
               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>       height,
               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>   user_data)</pre>
<p>The ::resize signal is emitted once when the widget is realized, and
then each time the widget is changed while realized. This is useful
in order to keep GL state up to date with the widget size, like for
instance camera properties which may depend on the width/height ratio.</p>
<p>The GL context for the area is guaranteed to be current when this signal
is emitted.</p>
<p>The default handler sets up the GL viewport.</p>
<div class="refsect3">
<a name="GtkGLArea-resize.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>area</p></td>
<td class="parameter_description"><p>the <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> that emitted the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>width</p></td>
<td class="parameter_description"><p>the width of the viewport</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>height</p></td>
<td class="parameter_description"><p>the height of the viewport</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25.1</div>
</body>
</html>