@girs/cogl-6 4.3.0 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -41
- package/cogl-6.d.ts +519 -163
- package/package.json +7 -7
package/cogl-6.d.ts
CHANGED
|
@@ -33,25 +33,25 @@ export namespace Cogl {
|
|
|
33
33
|
/**
|
|
34
34
|
* Data is the same size of a byte
|
|
35
35
|
*/
|
|
36
|
-
BYTE,
|
|
36
|
+
BYTE = 5120,
|
|
37
37
|
/**
|
|
38
38
|
* Data is the same size of an
|
|
39
39
|
* unsigned byte
|
|
40
40
|
*/
|
|
41
|
-
UNSIGNED_BYTE,
|
|
41
|
+
UNSIGNED_BYTE = 5121,
|
|
42
42
|
/**
|
|
43
43
|
* Data is the same size of a short integer
|
|
44
44
|
*/
|
|
45
|
-
SHORT,
|
|
45
|
+
SHORT = 5122,
|
|
46
46
|
/**
|
|
47
47
|
* Data is the same size of
|
|
48
48
|
* an unsigned short integer
|
|
49
49
|
*/
|
|
50
|
-
UNSIGNED_SHORT,
|
|
50
|
+
UNSIGNED_SHORT = 5123,
|
|
51
51
|
/**
|
|
52
52
|
* Data is the same size of a float
|
|
53
53
|
*/
|
|
54
|
-
FLOAT,
|
|
54
|
+
FLOAT = 5126,
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
|
|
@@ -69,15 +69,15 @@ export namespace Cogl {
|
|
|
69
69
|
* Generic failure code, something went
|
|
70
70
|
* wrong.
|
|
71
71
|
*/
|
|
72
|
-
FAILED,
|
|
72
|
+
FAILED = 0,
|
|
73
73
|
/**
|
|
74
74
|
* Unknown image type.
|
|
75
75
|
*/
|
|
76
|
-
UNKNOWN_TYPE,
|
|
76
|
+
UNKNOWN_TYPE = 1,
|
|
77
77
|
/**
|
|
78
78
|
* An image file was broken somehow.
|
|
79
79
|
*/
|
|
80
|
-
CORRUPT_IMAGE,
|
|
80
|
+
CORRUPT_IMAGE = 2,
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
|
|
@@ -90,20 +90,20 @@ export namespace Cogl {
|
|
|
90
90
|
/**
|
|
91
91
|
* Generic parse error
|
|
92
92
|
*/
|
|
93
|
-
PARSE_ERROR,
|
|
93
|
+
PARSE_ERROR = 0,
|
|
94
94
|
/**
|
|
95
95
|
* Argument parse error
|
|
96
96
|
*/
|
|
97
|
-
ARGUMENT_PARSE_ERROR,
|
|
97
|
+
ARGUMENT_PARSE_ERROR = 1,
|
|
98
98
|
/**
|
|
99
99
|
* Internal parser error
|
|
100
100
|
*/
|
|
101
|
-
INVALID_ERROR,
|
|
101
|
+
INVALID_ERROR = 2,
|
|
102
102
|
/**
|
|
103
103
|
* Blend string not
|
|
104
104
|
* supported by the GPU
|
|
105
105
|
*/
|
|
106
|
-
GPU_UNSUPPORTED_ERROR,
|
|
106
|
+
GPU_UNSUPPORTED_ERROR = 3,
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
|
|
@@ -121,41 +121,41 @@ export namespace Cogl {
|
|
|
121
121
|
/**
|
|
122
122
|
* Never passes.
|
|
123
123
|
*/
|
|
124
|
-
NEVER,
|
|
124
|
+
NEVER = 512,
|
|
125
125
|
/**
|
|
126
126
|
* Passes if the fragment's depth
|
|
127
127
|
* value is less than the value currently in the depth buffer.
|
|
128
128
|
*/
|
|
129
|
-
LESS,
|
|
129
|
+
LESS = 513,
|
|
130
130
|
/**
|
|
131
131
|
* Passes if the fragment's depth
|
|
132
132
|
* value is equal to the value currently in the depth buffer.
|
|
133
133
|
*/
|
|
134
|
-
EQUAL,
|
|
134
|
+
EQUAL = 514,
|
|
135
135
|
/**
|
|
136
136
|
* Passes if the fragment's depth
|
|
137
137
|
* value is less or equal to the value currently in the depth buffer.
|
|
138
138
|
*/
|
|
139
|
-
LEQUAL,
|
|
139
|
+
LEQUAL = 515,
|
|
140
140
|
/**
|
|
141
141
|
* Passes if the fragment's depth
|
|
142
142
|
* value is greater than the value currently in the depth buffer.
|
|
143
143
|
*/
|
|
144
|
-
GREATER,
|
|
144
|
+
GREATER = 516,
|
|
145
145
|
/**
|
|
146
146
|
* Passes if the fragment's depth
|
|
147
147
|
* value is not equal to the value currently in the depth buffer.
|
|
148
148
|
*/
|
|
149
|
-
NOTEQUAL,
|
|
149
|
+
NOTEQUAL = 517,
|
|
150
150
|
/**
|
|
151
151
|
* Passes if the fragment's depth
|
|
152
152
|
* value greater than or equal to the value currently in the depth buffer.
|
|
153
153
|
*/
|
|
154
|
-
GEQUAL,
|
|
154
|
+
GEQUAL = 518,
|
|
155
155
|
/**
|
|
156
156
|
* Always passes.
|
|
157
157
|
*/
|
|
158
|
-
ALWAYS,
|
|
158
|
+
ALWAYS = 519,
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
|
|
@@ -172,41 +172,41 @@ export namespace Cogl {
|
|
|
172
172
|
* {@link Cogl.IndicesType.INT} is supported in
|
|
173
173
|
* `cogl_indices_new()`.
|
|
174
174
|
*/
|
|
175
|
-
OGL_FEATURE_ID_UNSIGNED_INT_INDICES,
|
|
175
|
+
OGL_FEATURE_ID_UNSIGNED_INT_INDICES = 0,
|
|
176
176
|
/**
|
|
177
177
|
* Whether `cogl_buffer_map()` is
|
|
178
178
|
* supported with CoglBufferAccess including read support.
|
|
179
179
|
*/
|
|
180
|
-
OGL_FEATURE_ID_MAP_BUFFER_FOR_READ,
|
|
180
|
+
OGL_FEATURE_ID_MAP_BUFFER_FOR_READ = 1,
|
|
181
181
|
/**
|
|
182
182
|
* Whether `cogl_buffer_map()` is
|
|
183
183
|
* supported with CoglBufferAccess including write support.
|
|
184
184
|
*/
|
|
185
|
-
OGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE,
|
|
185
|
+
OGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE = 2,
|
|
186
186
|
/**
|
|
187
187
|
* Available if the window system supports reporting an event
|
|
188
188
|
* for swap buffer completions.
|
|
189
189
|
*/
|
|
190
|
-
OGL_FEATURE_ID_SWAP_BUFFERS_EVENT,
|
|
190
|
+
OGL_FEATURE_ID_SWAP_BUFFERS_EVENT = 3,
|
|
191
191
|
/**
|
|
192
192
|
* Whether frame presentation
|
|
193
193
|
* time stamps will be recorded in `CoglFrameInfo` objects.
|
|
194
194
|
*/
|
|
195
|
-
OGL_FEATURE_ID_PRESENTATION_TIME,
|
|
196
|
-
OGL_FEATURE_ID_FENCE,
|
|
195
|
+
OGL_FEATURE_ID_PRESENTATION_TIME = 4,
|
|
196
|
+
OGL_FEATURE_ID_FENCE = 5,
|
|
197
197
|
/**
|
|
198
198
|
* Support for
|
|
199
199
|
* {@link Cogl.TextureComponents.RG} as the internal components of a
|
|
200
200
|
* texture.
|
|
201
201
|
*/
|
|
202
|
-
OGL_FEATURE_ID_TEXTURE_RG,
|
|
202
|
+
OGL_FEATURE_ID_TEXTURE_RG = 6,
|
|
203
203
|
/**
|
|
204
204
|
* Available if the age of {@link Cogl.Onscreen} back
|
|
205
205
|
* buffers are tracked and so `cogl_onscreen_get_buffer_age()` can be
|
|
206
206
|
* expected to return age values other than 0.
|
|
207
207
|
*/
|
|
208
|
-
OGL_FEATURE_ID_BUFFER_AGE,
|
|
209
|
-
OGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL,
|
|
208
|
+
OGL_FEATURE_ID_BUFFER_AGE = 7,
|
|
209
|
+
OGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL = 8,
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
|
|
@@ -219,11 +219,11 @@ export namespace Cogl {
|
|
|
219
219
|
* The event was not handled, continues the
|
|
220
220
|
* processing
|
|
221
221
|
*/
|
|
222
|
-
CONTINUE,
|
|
222
|
+
CONTINUE = 0,
|
|
223
223
|
/**
|
|
224
224
|
* Remove the event, stops the processing
|
|
225
225
|
*/
|
|
226
|
-
REMOVE,
|
|
226
|
+
REMOVE = 1,
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
|
|
@@ -251,7 +251,7 @@ export namespace Cogl {
|
|
|
251
251
|
* acknowledged a frame and is ready for a
|
|
252
252
|
* new frame to be created.
|
|
253
253
|
*/
|
|
254
|
-
SYNC,
|
|
254
|
+
SYNC = 1,
|
|
255
255
|
/**
|
|
256
256
|
* Notifies that a frame has ended. This
|
|
257
257
|
* is a good time for applications to
|
|
@@ -261,7 +261,7 @@ export namespace Cogl {
|
|
|
261
261
|
* events should be expected after a
|
|
262
262
|
* `COGL_FRAME_EVENT_COMPLETE` event.
|
|
263
263
|
*/
|
|
264
|
-
COMPLETE,
|
|
264
|
+
COMPLETE = 2,
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
|
|
@@ -269,7 +269,7 @@ export namespace Cogl {
|
|
|
269
269
|
* @gir-type Enum
|
|
270
270
|
*/
|
|
271
271
|
enum FramebufferError {
|
|
272
|
-
FRAMEBUFFER_ERROR_ALLOCATE,
|
|
272
|
+
FRAMEBUFFER_ERROR_ALLOCATE = 0,
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
|
|
@@ -281,11 +281,11 @@ export namespace Cogl {
|
|
|
281
281
|
* @gir-type Enum
|
|
282
282
|
*/
|
|
283
283
|
enum GraphicsResetStatus {
|
|
284
|
-
NO_ERROR,
|
|
285
|
-
GUILTY_CONTEXT_RESET,
|
|
286
|
-
INNOCENT_CONTEXT_RESET,
|
|
287
|
-
UNKNOWN_CONTEXT_RESET,
|
|
288
|
-
PURGED_CONTEXT_RESET,
|
|
284
|
+
NO_ERROR = 0,
|
|
285
|
+
GUILTY_CONTEXT_RESET = 1,
|
|
286
|
+
INNOCENT_CONTEXT_RESET = 2,
|
|
287
|
+
UNKNOWN_CONTEXT_RESET = 3,
|
|
288
|
+
PURGED_CONTEXT_RESET = 4,
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
|
|
@@ -305,15 +305,15 @@ export namespace Cogl {
|
|
|
305
305
|
/**
|
|
306
306
|
* Your indices are unsigned bytes
|
|
307
307
|
*/
|
|
308
|
-
BYTE,
|
|
308
|
+
BYTE = 0,
|
|
309
309
|
/**
|
|
310
310
|
* Your indices are unsigned shorts
|
|
311
311
|
*/
|
|
312
|
-
SHORT,
|
|
312
|
+
SHORT = 1,
|
|
313
313
|
/**
|
|
314
314
|
* Your indices are unsigned ints
|
|
315
315
|
*/
|
|
316
|
-
INT,
|
|
316
|
+
INT = 2,
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
|
|
@@ -328,41 +328,41 @@ export namespace Cogl {
|
|
|
328
328
|
/**
|
|
329
329
|
* Never let the fragment through.
|
|
330
330
|
*/
|
|
331
|
-
NEVER,
|
|
331
|
+
NEVER = 512,
|
|
332
332
|
/**
|
|
333
333
|
* Let the fragment through if the incoming
|
|
334
334
|
* alpha value is less than the reference alpha value
|
|
335
335
|
*/
|
|
336
|
-
LESS,
|
|
336
|
+
LESS = 513,
|
|
337
337
|
/**
|
|
338
338
|
* Let the fragment through if the incoming
|
|
339
339
|
* alpha value equals the reference alpha value
|
|
340
340
|
*/
|
|
341
|
-
EQUAL,
|
|
341
|
+
EQUAL = 514,
|
|
342
342
|
/**
|
|
343
343
|
* Let the fragment through if the incoming
|
|
344
344
|
* alpha value is less than or equal to the reference alpha value
|
|
345
345
|
*/
|
|
346
|
-
LEQUAL,
|
|
346
|
+
LEQUAL = 515,
|
|
347
347
|
/**
|
|
348
348
|
* Let the fragment through if the incoming
|
|
349
349
|
* alpha value is greater than the reference alpha value
|
|
350
350
|
*/
|
|
351
|
-
GREATER,
|
|
351
|
+
GREATER = 516,
|
|
352
352
|
/**
|
|
353
353
|
* Let the fragment through if the incoming
|
|
354
354
|
* alpha value does not equal the reference alpha value
|
|
355
355
|
*/
|
|
356
|
-
NOTEQUAL,
|
|
356
|
+
NOTEQUAL = 517,
|
|
357
357
|
/**
|
|
358
358
|
* Let the fragment through if the incoming
|
|
359
359
|
* alpha value is greater than or equal to the reference alpha value.
|
|
360
360
|
*/
|
|
361
|
-
GEQUAL,
|
|
361
|
+
GEQUAL = 518,
|
|
362
362
|
/**
|
|
363
363
|
* Always let the fragment through.
|
|
364
364
|
*/
|
|
365
|
-
ALWAYS,
|
|
365
|
+
ALWAYS = 519,
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
|
|
@@ -379,38 +379,38 @@ export namespace Cogl {
|
|
|
379
379
|
* Measuring in manhatten distance from the,
|
|
380
380
|
* current pixel center, use the nearest texture texel
|
|
381
381
|
*/
|
|
382
|
-
NEAREST,
|
|
382
|
+
NEAREST = 9728,
|
|
383
383
|
/**
|
|
384
384
|
* Use the weighted average of the 4 texels
|
|
385
385
|
* nearest the current pixel center
|
|
386
386
|
*/
|
|
387
|
-
LINEAR,
|
|
387
|
+
LINEAR = 9729,
|
|
388
388
|
/**
|
|
389
389
|
* Select the mimap level whose
|
|
390
390
|
* texel size most closely matches the current pixel, and use the
|
|
391
391
|
* {@link Cogl.MaterialFilter.NEAREST} criterion
|
|
392
392
|
*/
|
|
393
|
-
NEAREST_MIPMAP_NEAREST,
|
|
393
|
+
NEAREST_MIPMAP_NEAREST = 9984,
|
|
394
394
|
/**
|
|
395
395
|
* Select the mimap level whose
|
|
396
396
|
* texel size most closely matches the current pixel, and use the
|
|
397
397
|
* {@link Cogl.MaterialFilter.LINEAR} criterion
|
|
398
398
|
*/
|
|
399
|
-
LINEAR_MIPMAP_NEAREST,
|
|
399
|
+
LINEAR_MIPMAP_NEAREST = 9985,
|
|
400
400
|
/**
|
|
401
401
|
* Select the two mimap levels
|
|
402
402
|
* whose texel size most closely matches the current pixel, use
|
|
403
403
|
* the {@link Cogl.MaterialFilter.NEAREST} criterion on each one and take
|
|
404
404
|
* their weighted average
|
|
405
405
|
*/
|
|
406
|
-
NEAREST_MIPMAP_LINEAR,
|
|
406
|
+
NEAREST_MIPMAP_LINEAR = 9986,
|
|
407
407
|
/**
|
|
408
408
|
* Select the two mimap levels
|
|
409
409
|
* whose texel size most closely matches the current pixel, use
|
|
410
410
|
* the {@link Cogl.MaterialFilter.LINEAR} criterion on each one and take
|
|
411
411
|
* their weighted average
|
|
412
412
|
*/
|
|
413
|
-
LINEAR_MIPMAP_LINEAR,
|
|
413
|
+
LINEAR_MIPMAP_LINEAR = 9987,
|
|
414
414
|
}
|
|
415
415
|
|
|
416
416
|
|
|
@@ -431,14 +431,14 @@ export namespace Cogl {
|
|
|
431
431
|
* The texture will be repeated. This
|
|
432
432
|
* is useful for example to draw a tiled background.
|
|
433
433
|
*/
|
|
434
|
-
REPEAT,
|
|
434
|
+
REPEAT = 10497,
|
|
435
435
|
/**
|
|
436
436
|
* The coordinates outside the
|
|
437
437
|
* range 0→1 will sample copies of the edge pixels of the
|
|
438
438
|
* texture. This is useful to avoid artifacts if only one copy of
|
|
439
439
|
* the texture is being rendered.
|
|
440
440
|
*/
|
|
441
|
-
CLAMP_TO_EDGE,
|
|
441
|
+
CLAMP_TO_EDGE = 33071,
|
|
442
442
|
/**
|
|
443
443
|
* Cogl will try to automatically
|
|
444
444
|
* decide which of the above two to use. For `cogl_rectangle()`, it
|
|
@@ -449,7 +449,7 @@ export namespace Cogl {
|
|
|
449
449
|
* layers that have point sprite coordinate generation enabled. This
|
|
450
450
|
* is the default value.
|
|
451
451
|
*/
|
|
452
|
-
AUTOMATIC,
|
|
452
|
+
AUTOMATIC = 519,
|
|
453
453
|
}
|
|
454
454
|
|
|
455
455
|
|
|
@@ -464,41 +464,41 @@ export namespace Cogl {
|
|
|
464
464
|
/**
|
|
465
465
|
* Never let the fragment through.
|
|
466
466
|
*/
|
|
467
|
-
NEVER,
|
|
467
|
+
NEVER = 512,
|
|
468
468
|
/**
|
|
469
469
|
* Let the fragment through if the incoming
|
|
470
470
|
* alpha value is less than the reference alpha value
|
|
471
471
|
*/
|
|
472
|
-
LESS,
|
|
472
|
+
LESS = 513,
|
|
473
473
|
/**
|
|
474
474
|
* Let the fragment through if the incoming
|
|
475
475
|
* alpha value equals the reference alpha value
|
|
476
476
|
*/
|
|
477
|
-
EQUAL,
|
|
477
|
+
EQUAL = 514,
|
|
478
478
|
/**
|
|
479
479
|
* Let the fragment through if the incoming
|
|
480
480
|
* alpha value is less than or equal to the reference alpha value
|
|
481
481
|
*/
|
|
482
|
-
LEQUAL,
|
|
482
|
+
LEQUAL = 515,
|
|
483
483
|
/**
|
|
484
484
|
* Let the fragment through if the incoming
|
|
485
485
|
* alpha value is greater than the reference alpha value
|
|
486
486
|
*/
|
|
487
|
-
GREATER,
|
|
487
|
+
GREATER = 516,
|
|
488
488
|
/**
|
|
489
489
|
* Let the fragment through if the incoming
|
|
490
490
|
* alpha value does not equal the reference alpha value
|
|
491
491
|
*/
|
|
492
|
-
NOTEQUAL,
|
|
492
|
+
NOTEQUAL = 517,
|
|
493
493
|
/**
|
|
494
494
|
* Let the fragment through if the incoming
|
|
495
495
|
* alpha value is greater than or equal to the reference alpha value.
|
|
496
496
|
*/
|
|
497
|
-
GEQUAL,
|
|
497
|
+
GEQUAL = 518,
|
|
498
498
|
/**
|
|
499
499
|
* Always let the fragment through.
|
|
500
500
|
*/
|
|
501
|
-
ALWAYS,
|
|
501
|
+
ALWAYS = 519,
|
|
502
502
|
}
|
|
503
503
|
|
|
504
504
|
|
|
@@ -512,19 +512,19 @@ export namespace Cogl {
|
|
|
512
512
|
* Neither face will be
|
|
513
513
|
* culled. This is the default.
|
|
514
514
|
*/
|
|
515
|
-
NONE,
|
|
515
|
+
NONE = 0,
|
|
516
516
|
/**
|
|
517
517
|
* Front faces will be culled.
|
|
518
518
|
*/
|
|
519
|
-
FRONT,
|
|
519
|
+
FRONT = 1,
|
|
520
520
|
/**
|
|
521
521
|
* Back faces will be culled.
|
|
522
522
|
*/
|
|
523
|
-
BACK,
|
|
523
|
+
BACK = 2,
|
|
524
524
|
/**
|
|
525
525
|
* All faces will be culled.
|
|
526
526
|
*/
|
|
527
|
-
BOTH,
|
|
527
|
+
BOTH = 3,
|
|
528
528
|
}
|
|
529
529
|
|
|
530
530
|
|
|
@@ -541,38 +541,38 @@ export namespace Cogl {
|
|
|
541
541
|
* Measuring in manhatten distance from the,
|
|
542
542
|
* current pixel center, use the nearest texture texel
|
|
543
543
|
*/
|
|
544
|
-
NEAREST,
|
|
544
|
+
NEAREST = 9728,
|
|
545
545
|
/**
|
|
546
546
|
* Use the weighted average of the 4 texels
|
|
547
547
|
* nearest the current pixel center
|
|
548
548
|
*/
|
|
549
|
-
LINEAR,
|
|
549
|
+
LINEAR = 9729,
|
|
550
550
|
/**
|
|
551
551
|
* Select the mimap level whose
|
|
552
552
|
* texel size most closely matches the current pixel, and use the
|
|
553
553
|
* {@link Cogl.PipelineFilter.NEAREST} criterion
|
|
554
554
|
*/
|
|
555
|
-
NEAREST_MIPMAP_NEAREST,
|
|
555
|
+
NEAREST_MIPMAP_NEAREST = 9984,
|
|
556
556
|
/**
|
|
557
557
|
* Select the mimap level whose
|
|
558
558
|
* texel size most closely matches the current pixel, and use the
|
|
559
559
|
* {@link Cogl.PipelineFilter.LINEAR} criterion
|
|
560
560
|
*/
|
|
561
|
-
LINEAR_MIPMAP_NEAREST,
|
|
561
|
+
LINEAR_MIPMAP_NEAREST = 9985,
|
|
562
562
|
/**
|
|
563
563
|
* Select the two mimap levels
|
|
564
564
|
* whose texel size most closely matches the current pixel, use
|
|
565
565
|
* the {@link Cogl.PipelineFilter.NEAREST} criterion on each one and take
|
|
566
566
|
* their weighted average
|
|
567
567
|
*/
|
|
568
|
-
NEAREST_MIPMAP_LINEAR,
|
|
568
|
+
NEAREST_MIPMAP_LINEAR = 9986,
|
|
569
569
|
/**
|
|
570
570
|
* Select the two mimap levels
|
|
571
571
|
* whose texel size most closely matches the current pixel, use
|
|
572
572
|
* the {@link Cogl.PipelineFilter.LINEAR} criterion on each one and take
|
|
573
573
|
* their weighted average
|
|
574
574
|
*/
|
|
575
|
-
LINEAR_MIPMAP_LINEAR,
|
|
575
|
+
LINEAR_MIPMAP_LINEAR = 9987,
|
|
576
576
|
}
|
|
577
577
|
|
|
578
578
|
|
|
@@ -593,15 +593,15 @@ export namespace Cogl {
|
|
|
593
593
|
* The texture will be repeated. This
|
|
594
594
|
* is useful for example to draw a tiled background.
|
|
595
595
|
*/
|
|
596
|
-
REPEAT,
|
|
597
|
-
MIRRORED_REPEAT,
|
|
596
|
+
REPEAT = 10497,
|
|
597
|
+
MIRRORED_REPEAT = 33648,
|
|
598
598
|
/**
|
|
599
599
|
* The coordinates outside the
|
|
600
600
|
* range 0→1 will sample copies of the edge pixels of the
|
|
601
601
|
* texture. This is useful to avoid artifacts if only one copy of
|
|
602
602
|
* the texture is being rendered.
|
|
603
603
|
*/
|
|
604
|
-
CLAMP_TO_EDGE,
|
|
604
|
+
CLAMP_TO_EDGE = 33071,
|
|
605
605
|
/**
|
|
606
606
|
* Cogl will try to automatically
|
|
607
607
|
* decide which of the above two to use. For `cogl_rectangle()`, it
|
|
@@ -612,7 +612,7 @@ export namespace Cogl {
|
|
|
612
612
|
* layers that have point sprite coordinate generation enabled. This
|
|
613
613
|
* is the default value.
|
|
614
614
|
*/
|
|
615
|
-
AUTOMATIC,
|
|
615
|
+
AUTOMATIC = 519,
|
|
616
616
|
}
|
|
617
617
|
|
|
618
618
|
|
|
@@ -620,8 +620,8 @@ export namespace Cogl {
|
|
|
620
620
|
* @gir-type Enum
|
|
621
621
|
*/
|
|
622
622
|
enum RendererError {
|
|
623
|
-
XLIB_DISPLAY_OPEN,
|
|
624
|
-
BAD_CONSTRAINT,
|
|
623
|
+
XLIB_DISPLAY_OPEN = 0,
|
|
624
|
+
BAD_CONSTRAINT = 1,
|
|
625
625
|
}
|
|
626
626
|
|
|
627
627
|
|
|
@@ -634,11 +634,11 @@ export namespace Cogl {
|
|
|
634
634
|
/**
|
|
635
635
|
* A program for proccessing vertices
|
|
636
636
|
*/
|
|
637
|
-
VERTEX,
|
|
637
|
+
VERTEX = 0,
|
|
638
638
|
/**
|
|
639
639
|
* A program for processing fragments
|
|
640
640
|
*/
|
|
641
|
-
FRAGMENT,
|
|
641
|
+
FRAGMENT = 1,
|
|
642
642
|
}
|
|
643
643
|
|
|
644
644
|
|
|
@@ -651,15 +651,15 @@ export namespace Cogl {
|
|
|
651
651
|
/**
|
|
652
652
|
* draw to both stereo buffers
|
|
653
653
|
*/
|
|
654
|
-
BOTH,
|
|
654
|
+
BOTH = 0,
|
|
655
655
|
/**
|
|
656
656
|
* draw only to the left stereo buffer
|
|
657
657
|
*/
|
|
658
|
-
LEFT,
|
|
658
|
+
LEFT = 1,
|
|
659
659
|
/**
|
|
660
660
|
* draw only to the left stereo buffer
|
|
661
661
|
*/
|
|
662
|
-
RIGHT,
|
|
662
|
+
RIGHT = 2,
|
|
663
663
|
}
|
|
664
664
|
|
|
665
665
|
|
|
@@ -689,12 +689,12 @@ export namespace Cogl {
|
|
|
689
689
|
* You tried to use a feature or
|
|
690
690
|
* configuration not currently available.
|
|
691
691
|
*/
|
|
692
|
-
UNSUPPORTED,
|
|
692
|
+
UNSUPPORTED = 0,
|
|
693
693
|
/**
|
|
694
694
|
* You tried to allocate a resource
|
|
695
695
|
* such as a texture and there wasn't enough memory.
|
|
696
696
|
*/
|
|
697
|
-
NO_MEMORY,
|
|
697
|
+
NO_MEMORY = 1,
|
|
698
698
|
}
|
|
699
699
|
|
|
700
700
|
|
|
@@ -707,25 +707,25 @@ export namespace Cogl {
|
|
|
707
707
|
/**
|
|
708
708
|
* Only the alpha component
|
|
709
709
|
*/
|
|
710
|
-
A,
|
|
710
|
+
A = 1,
|
|
711
711
|
/**
|
|
712
712
|
* Red and green components. Note that
|
|
713
713
|
* this can only be used if the {@link Cogl.FeatureID.OGL_FEATURE_ID_TEXTURE_RG} feature
|
|
714
714
|
* is advertised.
|
|
715
715
|
*/
|
|
716
|
-
RG,
|
|
716
|
+
RG = 2,
|
|
717
717
|
/**
|
|
718
718
|
* Red, green and blue components
|
|
719
719
|
*/
|
|
720
|
-
RGB,
|
|
720
|
+
RGB = 3,
|
|
721
721
|
/**
|
|
722
722
|
* Red, green, blue and alpha components
|
|
723
723
|
*/
|
|
724
|
-
RGBA,
|
|
724
|
+
RGBA = 4,
|
|
725
725
|
/**
|
|
726
726
|
* Only a depth component
|
|
727
727
|
*/
|
|
728
|
-
DEPTH,
|
|
728
|
+
DEPTH = 5,
|
|
729
729
|
}
|
|
730
730
|
|
|
731
731
|
|
|
@@ -738,17 +738,17 @@ export namespace Cogl {
|
|
|
738
738
|
/**
|
|
739
739
|
* Unsupported size
|
|
740
740
|
*/
|
|
741
|
-
SIZE,
|
|
741
|
+
SIZE = 0,
|
|
742
742
|
/**
|
|
743
743
|
* Unsupported format
|
|
744
744
|
*/
|
|
745
|
-
FORMAT,
|
|
746
|
-
BAD_PARAMETER,
|
|
745
|
+
FORMAT = 1,
|
|
746
|
+
BAD_PARAMETER = 2,
|
|
747
747
|
/**
|
|
748
748
|
* A primitive texture type that is
|
|
749
749
|
* unsupported by the driver was used
|
|
750
750
|
*/
|
|
751
|
-
TYPE,
|
|
751
|
+
TYPE = 3,
|
|
752
752
|
}
|
|
753
753
|
|
|
754
754
|
|
|
@@ -762,35 +762,35 @@ export namespace Cogl {
|
|
|
762
762
|
* FIXME, equivalent to
|
|
763
763
|
* <constant>GL_POINTS</constant>
|
|
764
764
|
*/
|
|
765
|
-
POINTS,
|
|
765
|
+
POINTS = 0,
|
|
766
766
|
/**
|
|
767
767
|
* FIXME, equivalent to <constant>GL_LINES</constant>
|
|
768
768
|
*/
|
|
769
|
-
LINES,
|
|
769
|
+
LINES = 1,
|
|
770
770
|
/**
|
|
771
771
|
* FIXME, equivalent to
|
|
772
772
|
* <constant>GL_LINE_LOOP</constant>
|
|
773
773
|
*/
|
|
774
|
-
LINE_LOOP,
|
|
774
|
+
LINE_LOOP = 2,
|
|
775
775
|
/**
|
|
776
776
|
* FIXME, equivalent to
|
|
777
777
|
* <constant>GL_LINE_STRIP</constant>
|
|
778
778
|
*/
|
|
779
|
-
LINE_STRIP,
|
|
779
|
+
LINE_STRIP = 3,
|
|
780
780
|
/**
|
|
781
781
|
* FIXME, equivalent to
|
|
782
782
|
* <constant>GL_TRIANGLES</constant>
|
|
783
783
|
*/
|
|
784
|
-
TRIANGLES,
|
|
784
|
+
TRIANGLES = 4,
|
|
785
785
|
/**
|
|
786
786
|
* FIXME, equivalent to
|
|
787
787
|
* <constant>GL_TRIANGLE_STRIP</constant>
|
|
788
788
|
*/
|
|
789
|
-
TRIANGLE_STRIP,
|
|
789
|
+
TRIANGLE_STRIP = 5,
|
|
790
790
|
/**
|
|
791
791
|
* FIXME, equivalent to <constant>GL_TRIANGLE_FAN</constant>
|
|
792
792
|
*/
|
|
793
|
-
TRIANGLE_FAN,
|
|
793
|
+
TRIANGLE_FAN = 6,
|
|
794
794
|
}
|
|
795
795
|
|
|
796
796
|
|
|
@@ -804,11 +804,11 @@ export namespace Cogl {
|
|
|
804
804
|
/**
|
|
805
805
|
* Vertices are in a clockwise order
|
|
806
806
|
*/
|
|
807
|
-
CLOCKWISE,
|
|
807
|
+
CLOCKWISE = 0,
|
|
808
808
|
/**
|
|
809
809
|
* Vertices are in a counter-clockwise order
|
|
810
810
|
*/
|
|
811
|
-
COUNTER_CLOCKWISE,
|
|
811
|
+
COUNTER_CLOCKWISE = 1,
|
|
812
812
|
}
|
|
813
813
|
|
|
814
814
|
|
|
@@ -816,39 +816,61 @@ export namespace Cogl {
|
|
|
816
816
|
* @gir-type Enum
|
|
817
817
|
*/
|
|
818
818
|
enum WinsysFeature {
|
|
819
|
-
MULTIPLE_ONSCREEN,
|
|
820
|
-
SWAP_THROTTLE,
|
|
821
|
-
VBLANK_COUNTER,
|
|
822
|
-
VBLANK_WAIT,
|
|
823
|
-
TEXTURE_FROM_PIXMAP,
|
|
824
|
-
SWAP_BUFFERS_EVENT,
|
|
825
|
-
SWAP_REGION,
|
|
826
|
-
SWAP_REGION_THROTTLE,
|
|
827
|
-
SWAP_REGION_SYNCHRONIZED,
|
|
828
|
-
BUFFER_AGE,
|
|
829
|
-
SYNC_AND_COMPLETE_EVENT,
|
|
830
|
-
N_FEATURES,
|
|
819
|
+
MULTIPLE_ONSCREEN = 0,
|
|
820
|
+
SWAP_THROTTLE = 1,
|
|
821
|
+
VBLANK_COUNTER = 2,
|
|
822
|
+
VBLANK_WAIT = 3,
|
|
823
|
+
TEXTURE_FROM_PIXMAP = 4,
|
|
824
|
+
SWAP_BUFFERS_EVENT = 5,
|
|
825
|
+
SWAP_REGION = 6,
|
|
826
|
+
SWAP_REGION_THROTTLE = 7,
|
|
827
|
+
SWAP_REGION_SYNCHRONIZED = 8,
|
|
828
|
+
BUFFER_AGE = 9,
|
|
829
|
+
SYNC_AND_COMPLETE_EVENT = 10,
|
|
830
|
+
N_FEATURES = 11,
|
|
831
831
|
}
|
|
832
832
|
|
|
833
833
|
|
|
834
|
+
/**
|
|
835
|
+
* @default 64
|
|
836
|
+
*/
|
|
834
837
|
const AFIRST_BIT: number;
|
|
835
838
|
|
|
839
|
+
/**
|
|
840
|
+
* @default 16
|
|
841
|
+
*/
|
|
836
842
|
const A_BIT: number;
|
|
837
843
|
|
|
844
|
+
/**
|
|
845
|
+
* @default 32
|
|
846
|
+
*/
|
|
838
847
|
const BGR_BIT: number;
|
|
839
848
|
|
|
849
|
+
/**
|
|
850
|
+
* @default 256
|
|
851
|
+
*/
|
|
840
852
|
const DEPTH_BIT: number;
|
|
841
853
|
|
|
842
854
|
/**
|
|
843
855
|
* The maximum number of planes of a pixel format (see also
|
|
844
856
|
* `cogl_pixel_format_get_planes()`).
|
|
857
|
+
* @default 4
|
|
845
858
|
*/
|
|
846
859
|
const PIXEL_FORMAT_MAX_PLANES: number;
|
|
847
860
|
|
|
861
|
+
/**
|
|
862
|
+
* @default 128
|
|
863
|
+
*/
|
|
848
864
|
const PREMULT_BIT: number;
|
|
849
865
|
|
|
866
|
+
/**
|
|
867
|
+
* @default 512
|
|
868
|
+
*/
|
|
850
869
|
const STENCIL_BIT: number;
|
|
851
870
|
|
|
871
|
+
/**
|
|
872
|
+
* @default 127
|
|
873
|
+
*/
|
|
852
874
|
const TEXTURE_MAX_WASTE: number;
|
|
853
875
|
|
|
854
876
|
function blend_string_error_quark(): number;
|
|
@@ -901,6 +923,7 @@ export namespace Cogl {
|
|
|
901
923
|
* @param dst_y Destination y position
|
|
902
924
|
* @param width Width of region to copy
|
|
903
925
|
* @param height Height of region to copy
|
|
926
|
+
* @throws GLib.Error
|
|
904
927
|
*/
|
|
905
928
|
function blit_framebuffer(src: Framebuffer, dest: Framebuffer, src_x: number, src_y: number, dst_x: number, dst_y: number, width: number, height: number): boolean;
|
|
906
929
|
|
|
@@ -1397,6 +1420,7 @@ export namespace Cogl {
|
|
|
1397
1420
|
* @returns A newly created {@link Cogl.Texture} or `null` on failure
|
|
1398
1421
|
* @since 0.8
|
|
1399
1422
|
* @deprecated since 1.18: Use specific constructors such as `cogl_texture_2d_new_from_file()`
|
|
1423
|
+
* @throws GLib.Error
|
|
1400
1424
|
*/
|
|
1401
1425
|
function texture_new_from_file(filename: string, flags: TextureFlags, internal_format: PixelFormat): Texture;
|
|
1402
1426
|
|
|
@@ -1483,15 +1507,15 @@ export namespace Cogl {
|
|
|
1483
1507
|
/**
|
|
1484
1508
|
* Selects the primary color buffer
|
|
1485
1509
|
*/
|
|
1486
|
-
COLOR,
|
|
1510
|
+
COLOR = 1,
|
|
1487
1511
|
/**
|
|
1488
1512
|
* Selects the depth buffer
|
|
1489
1513
|
*/
|
|
1490
|
-
DEPTH,
|
|
1514
|
+
DEPTH = 2,
|
|
1491
1515
|
/**
|
|
1492
1516
|
* Selects the stencil buffer
|
|
1493
1517
|
*/
|
|
1494
|
-
STENCIL,
|
|
1518
|
+
STENCIL = 4,
|
|
1495
1519
|
}
|
|
1496
1520
|
|
|
1497
1521
|
|
|
@@ -1504,11 +1528,11 @@ export namespace Cogl {
|
|
|
1504
1528
|
/**
|
|
1505
1529
|
* FIXME
|
|
1506
1530
|
*/
|
|
1507
|
-
WINDOW_BUFFER,
|
|
1531
|
+
WINDOW_BUFFER = 2,
|
|
1508
1532
|
/**
|
|
1509
1533
|
* FIXME
|
|
1510
1534
|
*/
|
|
1511
|
-
OFFSCREEN_BUFFER,
|
|
1535
|
+
OFFSCREEN_BUFFER = 4,
|
|
1512
1536
|
}
|
|
1513
1537
|
|
|
1514
1538
|
|
|
@@ -1516,8 +1540,8 @@ export namespace Cogl {
|
|
|
1516
1540
|
* @gir-type Flags
|
|
1517
1541
|
*/
|
|
1518
1542
|
enum EglImageFlags {
|
|
1519
|
-
NONE,
|
|
1520
|
-
NO_GET_DATA,
|
|
1543
|
+
NONE = 0,
|
|
1544
|
+
NO_GET_DATA = 1,
|
|
1521
1545
|
}
|
|
1522
1546
|
|
|
1523
1547
|
|
|
@@ -1547,120 +1571,120 @@ export namespace Cogl {
|
|
|
1547
1571
|
/**
|
|
1548
1572
|
* Any format
|
|
1549
1573
|
*/
|
|
1550
|
-
ANY,
|
|
1574
|
+
ANY = 0,
|
|
1551
1575
|
/**
|
|
1552
1576
|
* 8 bits alpha mask
|
|
1553
1577
|
*/
|
|
1554
|
-
A_8,
|
|
1578
|
+
A_8 = 17,
|
|
1555
1579
|
/**
|
|
1556
1580
|
* RGB, 16 bits
|
|
1557
1581
|
*/
|
|
1558
|
-
RGB_565,
|
|
1582
|
+
RGB_565 = 4,
|
|
1559
1583
|
/**
|
|
1560
1584
|
* RGBA, 16 bits
|
|
1561
1585
|
*/
|
|
1562
|
-
RGBA_4444,
|
|
1586
|
+
RGBA_4444 = 21,
|
|
1563
1587
|
/**
|
|
1564
1588
|
* RGBA, 16 bits
|
|
1565
1589
|
*/
|
|
1566
|
-
RGBA_5551,
|
|
1590
|
+
RGBA_5551 = 22,
|
|
1567
1591
|
/**
|
|
1568
1592
|
* Not currently supported
|
|
1569
1593
|
*/
|
|
1570
|
-
YUV,
|
|
1594
|
+
YUV = 7,
|
|
1571
1595
|
/**
|
|
1572
1596
|
* Single luminance component
|
|
1573
1597
|
*/
|
|
1574
|
-
G_8,
|
|
1598
|
+
G_8 = 8,
|
|
1575
1599
|
/**
|
|
1576
1600
|
* RG, 16 bits. Note that red-green textures
|
|
1577
1601
|
* are only available if {@link Cogl.FeatureID.OGL_FEATURE_ID_TEXTURE_RG} is advertised.
|
|
1578
1602
|
* See `cogl_texture_set_components()` for details.
|
|
1579
1603
|
*/
|
|
1580
|
-
RG_88,
|
|
1604
|
+
RG_88 = 9,
|
|
1581
1605
|
/**
|
|
1582
1606
|
* RGB, 24 bits
|
|
1583
1607
|
*/
|
|
1584
|
-
RGB_888,
|
|
1608
|
+
RGB_888 = 2,
|
|
1585
1609
|
/**
|
|
1586
1610
|
* BGR, 24 bits
|
|
1587
1611
|
*/
|
|
1588
|
-
BGR_888,
|
|
1612
|
+
BGR_888 = 34,
|
|
1589
1613
|
/**
|
|
1590
1614
|
* RGBA, 32 bits
|
|
1591
1615
|
*/
|
|
1592
|
-
RGBA_8888,
|
|
1616
|
+
RGBA_8888 = 19,
|
|
1593
1617
|
/**
|
|
1594
1618
|
* BGRA, 32 bits
|
|
1595
1619
|
*/
|
|
1596
|
-
BGRA_8888,
|
|
1620
|
+
BGRA_8888 = 51,
|
|
1597
1621
|
/**
|
|
1598
1622
|
* ARGB, 32 bits
|
|
1599
1623
|
*/
|
|
1600
|
-
ARGB_8888,
|
|
1624
|
+
ARGB_8888 = 83,
|
|
1601
1625
|
/**
|
|
1602
1626
|
* ABGR, 32 bits
|
|
1603
1627
|
*/
|
|
1604
|
-
ABGR_8888,
|
|
1628
|
+
ABGR_8888 = 115,
|
|
1605
1629
|
/**
|
|
1606
1630
|
* RGBA, 32 bits, 10 bpc
|
|
1607
1631
|
*/
|
|
1608
|
-
RGBA_1010102,
|
|
1632
|
+
RGBA_1010102 = 29,
|
|
1609
1633
|
/**
|
|
1610
1634
|
* BGRA, 32 bits, 10 bpc
|
|
1611
1635
|
*/
|
|
1612
|
-
BGRA_1010102,
|
|
1636
|
+
BGRA_1010102 = 61,
|
|
1613
1637
|
/**
|
|
1614
1638
|
* ARGB, 32 bits, 10 bpc
|
|
1615
1639
|
*/
|
|
1616
|
-
ARGB_2101010,
|
|
1640
|
+
ARGB_2101010 = 93,
|
|
1617
1641
|
/**
|
|
1618
1642
|
* ABGR, 32 bits, 10 bpc
|
|
1619
1643
|
*/
|
|
1620
|
-
ABGR_2101010,
|
|
1644
|
+
ABGR_2101010 = 125,
|
|
1621
1645
|
/**
|
|
1622
1646
|
* Premultiplied RGBA, 32 bits
|
|
1623
1647
|
*/
|
|
1624
|
-
RGBA_8888_PRE,
|
|
1648
|
+
RGBA_8888_PRE = 147,
|
|
1625
1649
|
/**
|
|
1626
1650
|
* Premultiplied BGRA, 32 bits
|
|
1627
1651
|
*/
|
|
1628
|
-
BGRA_8888_PRE,
|
|
1652
|
+
BGRA_8888_PRE = 179,
|
|
1629
1653
|
/**
|
|
1630
1654
|
* Premultiplied ARGB, 32 bits
|
|
1631
1655
|
*/
|
|
1632
|
-
ARGB_8888_PRE,
|
|
1656
|
+
ARGB_8888_PRE = 211,
|
|
1633
1657
|
/**
|
|
1634
1658
|
* Premultiplied ABGR, 32 bits
|
|
1635
1659
|
*/
|
|
1636
|
-
ABGR_8888_PRE,
|
|
1660
|
+
ABGR_8888_PRE = 243,
|
|
1637
1661
|
/**
|
|
1638
1662
|
* Premultiplied RGBA, 16 bits
|
|
1639
1663
|
*/
|
|
1640
|
-
RGBA_4444_PRE,
|
|
1664
|
+
RGBA_4444_PRE = 149,
|
|
1641
1665
|
/**
|
|
1642
1666
|
* Premultiplied RGBA, 16 bits
|
|
1643
1667
|
*/
|
|
1644
|
-
RGBA_5551_PRE,
|
|
1668
|
+
RGBA_5551_PRE = 150,
|
|
1645
1669
|
/**
|
|
1646
1670
|
* Premultiplied RGBA, 32 bits, 10 bpc
|
|
1647
1671
|
*/
|
|
1648
|
-
RGBA_1010102_PRE,
|
|
1672
|
+
RGBA_1010102_PRE = 157,
|
|
1649
1673
|
/**
|
|
1650
1674
|
* Premultiplied BGRA, 32 bits, 10 bpc
|
|
1651
1675
|
*/
|
|
1652
|
-
BGRA_1010102_PRE,
|
|
1676
|
+
BGRA_1010102_PRE = 189,
|
|
1653
1677
|
/**
|
|
1654
1678
|
* Premultiplied ARGB, 32 bits, 10 bpc
|
|
1655
1679
|
*/
|
|
1656
|
-
ARGB_2101010_PRE,
|
|
1680
|
+
ARGB_2101010_PRE = 221,
|
|
1657
1681
|
/**
|
|
1658
1682
|
* Premultiplied ABGR, 32 bits, 10 bpc
|
|
1659
1683
|
*/
|
|
1660
|
-
ABGR_2101010_PRE,
|
|
1661
|
-
DEPTH_16,
|
|
1662
|
-
DEPTH_32,
|
|
1663
|
-
DEPTH_24_STENCIL_8,
|
|
1684
|
+
ABGR_2101010_PRE = 253,
|
|
1685
|
+
DEPTH_16 = 265,
|
|
1686
|
+
DEPTH_32 = 259,
|
|
1687
|
+
DEPTH_24_STENCIL_8 = 771,
|
|
1664
1688
|
}
|
|
1665
1689
|
|
|
1666
1690
|
|
|
@@ -1673,7 +1697,7 @@ export namespace Cogl {
|
|
|
1673
1697
|
/**
|
|
1674
1698
|
* Read from the color buffer
|
|
1675
1699
|
*/
|
|
1676
|
-
READ_PIXELS_COLOR_BUFFER,
|
|
1700
|
+
READ_PIXELS_COLOR_BUFFER = 1,
|
|
1677
1701
|
}
|
|
1678
1702
|
|
|
1679
1703
|
|
|
@@ -1686,7 +1710,7 @@ export namespace Cogl {
|
|
|
1686
1710
|
/**
|
|
1687
1711
|
* No flags specified
|
|
1688
1712
|
*/
|
|
1689
|
-
NONE,
|
|
1713
|
+
NONE = 0,
|
|
1690
1714
|
/**
|
|
1691
1715
|
* Disables the automatic generation of
|
|
1692
1716
|
* the mipmap pyramid from the base level image whenever it is
|
|
@@ -1694,16 +1718,16 @@ export namespace Cogl {
|
|
|
1694
1718
|
* rendered with a mipmap filter so it should be free to leave out
|
|
1695
1719
|
* this flag when using other filtering modes
|
|
1696
1720
|
*/
|
|
1697
|
-
NO_AUTO_MIPMAP,
|
|
1721
|
+
NO_AUTO_MIPMAP = 1,
|
|
1698
1722
|
/**
|
|
1699
1723
|
* Disables the slicing of the texture
|
|
1700
1724
|
*/
|
|
1701
|
-
NO_SLICING,
|
|
1725
|
+
NO_SLICING = 2,
|
|
1702
1726
|
/**
|
|
1703
1727
|
* Disables the insertion of the texture inside
|
|
1704
1728
|
* the texture atlas used by Cogl
|
|
1705
1729
|
*/
|
|
1706
|
-
NO_ATLAS,
|
|
1730
|
+
NO_ATLAS = 4,
|
|
1707
1731
|
}
|
|
1708
1732
|
|
|
1709
1733
|
|
|
@@ -1743,27 +1767,32 @@ export namespace Cogl {
|
|
|
1743
1767
|
* Parses an image file enough to extract the width and height
|
|
1744
1768
|
* of the bitmap.
|
|
1745
1769
|
* @param filename the file to check
|
|
1770
|
+
* @since 1.0
|
|
1746
1771
|
*/
|
|
1747
1772
|
static get_size_from_file(filename: string): [boolean, number, number];
|
|
1748
1773
|
|
|
1749
1774
|
// Methods
|
|
1750
1775
|
/**
|
|
1751
1776
|
* @returns the {@link Cogl.PixelFormat} that the data for the bitmap is in.
|
|
1777
|
+
* @since 1.10
|
|
1752
1778
|
*/
|
|
1753
1779
|
get_format(): PixelFormat;
|
|
1754
1780
|
|
|
1755
1781
|
/**
|
|
1756
1782
|
* @returns the height of the bitmap
|
|
1783
|
+
* @since 1.10
|
|
1757
1784
|
*/
|
|
1758
1785
|
get_height(): number;
|
|
1759
1786
|
|
|
1760
1787
|
/**
|
|
1761
1788
|
* @returns the rowstride of the bitmap. This is the number of bytes between the address of start of one row to the address of the next row in the image.
|
|
1789
|
+
* @since 1.10
|
|
1762
1790
|
*/
|
|
1763
1791
|
get_rowstride(): number;
|
|
1764
1792
|
|
|
1765
1793
|
/**
|
|
1766
1794
|
* @returns the width of the bitmap
|
|
1795
|
+
* @since 1.10
|
|
1767
1796
|
*/
|
|
1768
1797
|
get_width(): number;
|
|
1769
1798
|
}
|
|
@@ -1870,6 +1899,8 @@ export namespace Cogl {
|
|
|
1870
1899
|
* program will abort with an error message if there is an error during
|
|
1871
1900
|
* automatic allocation.</note>
|
|
1872
1901
|
* @returns `true` if there were no error allocating the framebuffer, else `false`.
|
|
1902
|
+
* @since 1.8
|
|
1903
|
+
* @throws GLib.Error
|
|
1873
1904
|
*/
|
|
1874
1905
|
allocate(): boolean;
|
|
1875
1906
|
|
|
@@ -1878,6 +1909,7 @@ export namespace Cogl {
|
|
|
1878
1909
|
* that includes the color buffer then the specified `color` is used.
|
|
1879
1910
|
* @param buffers A mask of {@link Cogl.BufferBit}<!-- -->'s identifying which auxiliary buffers to clear
|
|
1880
1911
|
* @param color The color to clear the color buffer too if specified in `buffers`.
|
|
1912
|
+
* @since 1.8
|
|
1881
1913
|
*/
|
|
1882
1914
|
clear(buffers: bigint | number, color: Color): void;
|
|
1883
1915
|
|
|
@@ -1889,6 +1921,7 @@ export namespace Cogl {
|
|
|
1889
1921
|
* @param green The green component of color to clear the color buffer too if specified in `buffers`.
|
|
1890
1922
|
* @param blue The blue component of color to clear the color buffer too if specified in `buffers`.
|
|
1891
1923
|
* @param alpha The alpha component of color to clear the color buffer too if specified in `buffers`.
|
|
1924
|
+
* @since 1.8
|
|
1892
1925
|
*/
|
|
1893
1926
|
clear4f(buffers: bigint | number, red: number, green: number, blue: number, alpha: number): void;
|
|
1894
1927
|
|
|
@@ -1910,6 +1943,7 @@ export namespace Cogl {
|
|
|
1910
1943
|
* framebuffer, and it's not meaningful to try and discard the color buffer of
|
|
1911
1944
|
* a {@link Cogl.Offscreen} framebuffer since they are single-buffered.
|
|
1912
1945
|
* @param buffers A {@link Cogl.BufferBit} mask of which ancillary buffers you want to discard.
|
|
1946
|
+
* @since 1.8
|
|
1913
1947
|
*/
|
|
1914
1948
|
discard_buffers(buffers: bigint | number): void;
|
|
1915
1949
|
|
|
@@ -1959,6 +1993,7 @@ export namespace Cogl {
|
|
|
1959
1993
|
* @param y_2 y coordinate lower right on screen.
|
|
1960
1994
|
* @param tex_coords An array containing groups of 4 float values: [s_1, t_1, s_2, t_2] that are interpreted as two texture coordinates; one for the top left texel, and one for the bottom right texel. Each value should be between 0.0 and 1.0, where the coordinate (0.0, 0.0) represents the top left of the texture, and (1.0, 1.0) the bottom right.
|
|
1961
1995
|
* @param tex_coords_len The length of the `tex_coords` array. (For one layer and one group of texture coordinates, this would be 4)
|
|
1996
|
+
* @since 1.10
|
|
1962
1997
|
*/
|
|
1963
1998
|
draw_multitextured_rectangle(pipeline: Pipeline, x_1: number, y_1: number, x_2: number, y_2: number, tex_coords: number[], tex_coords_len: number): void;
|
|
1964
1999
|
|
|
@@ -1979,6 +2014,7 @@ export namespace Cogl {
|
|
|
1979
2014
|
* @param y_1 Y coordinate of the top-left corner
|
|
1980
2015
|
* @param x_2 X coordinate of the bottom-right corner
|
|
1981
2016
|
* @param y_2 Y coordinate of the bottom-right corner
|
|
2017
|
+
* @since 1.10
|
|
1982
2018
|
*/
|
|
1983
2019
|
draw_rectangle(pipeline: Pipeline, x_1: number, y_1: number, x_2: number, y_2: number): void;
|
|
1984
2020
|
|
|
@@ -2005,6 +2041,7 @@ export namespace Cogl {
|
|
|
2005
2041
|
* @param pipeline A {@link Cogl.Pipeline} state object
|
|
2006
2042
|
* @param coordinates an array of coordinates containing groups of 4 float values: [x_1, y_1, x_2, y_2] that are interpreted as two position coordinates; one for the top left of the rectangle (x1, y1), and one for the bottom right of the rectangle (x2, y2).
|
|
2007
2043
|
* @param n_rectangles number of rectangles defined in `coordinates`.
|
|
2044
|
+
* @since 1.10
|
|
2008
2045
|
*/
|
|
2009
2046
|
draw_rectangles(pipeline: Pipeline, coordinates: number[], n_rectangles: number): void;
|
|
2010
2047
|
|
|
@@ -2044,6 +2081,7 @@ export namespace Cogl {
|
|
|
2044
2081
|
* @param t_1 T texture coordinate of the top-left coorner
|
|
2045
2082
|
* @param s_2 S texture coordinate of the bottom-right coorner
|
|
2046
2083
|
* @param t_2 T texture coordinate of the bottom-right coorner
|
|
2084
|
+
* @since 1.10
|
|
2047
2085
|
*/
|
|
2048
2086
|
draw_textured_rectangle(pipeline: Pipeline, x_1: number, y_1: number, x_2: number, y_2: number, s_1: number, t_1: number, s_2: number, t_2: number): void;
|
|
2049
2087
|
|
|
@@ -2085,6 +2123,7 @@ export namespace Cogl {
|
|
|
2085
2123
|
* @param pipeline A {@link Cogl.Pipeline} state object
|
|
2086
2124
|
* @param coordinates an array containing groups of 8 float values: [x_1, y_1, x_2, y_2, s_1, t_1, s_2, t_2] that have the same meaning as the arguments for `cogl_framebuffer_draw_textured_rectangle()`.
|
|
2087
2125
|
* @param n_rectangles number of rectangles to `coordinates` to draw
|
|
2126
|
+
* @since 1.10
|
|
2088
2127
|
*/
|
|
2089
2128
|
draw_textured_rectangles(pipeline: Pipeline, coordinates: number[], n_rectangles: number): void;
|
|
2090
2129
|
|
|
@@ -2098,6 +2137,7 @@ export namespace Cogl {
|
|
|
2098
2137
|
* One example might be for benchmarking purposes to be sure timing
|
|
2099
2138
|
* measurements reflect the time that the GPU is busy for not just the time it
|
|
2100
2139
|
* takes to queue rendering commands.
|
|
2140
|
+
* @since 1.10
|
|
2101
2141
|
*/
|
|
2102
2142
|
finish(): void;
|
|
2103
2143
|
|
|
@@ -2119,18 +2159,21 @@ export namespace Cogl {
|
|
|
2119
2159
|
* @param top Y position of the top clipping plane where it intersects the near clipping plane
|
|
2120
2160
|
* @param z_near The distance to the near clipping plane (Must be positive)
|
|
2121
2161
|
* @param z_far The distance to the far clipping plane (Must be positive)
|
|
2162
|
+
* @since 1.10
|
|
2122
2163
|
*/
|
|
2123
2164
|
frustum(left: number, right: number, bottom: number, top: number, z_near: number, z_far: number): void;
|
|
2124
2165
|
|
|
2125
2166
|
/**
|
|
2126
2167
|
* Retrieves the number of alpha bits of `framebuffer`
|
|
2127
2168
|
* @returns the number of bits
|
|
2169
|
+
* @since 1.8
|
|
2128
2170
|
*/
|
|
2129
2171
|
get_alpha_bits(): number;
|
|
2130
2172
|
|
|
2131
2173
|
/**
|
|
2132
2174
|
* Retrieves the number of blue bits of `framebuffer`
|
|
2133
2175
|
* @returns the number of bits
|
|
2176
|
+
* @since 1.8
|
|
2134
2177
|
*/
|
|
2135
2178
|
get_blue_bits(): number;
|
|
2136
2179
|
|
|
@@ -2139,12 +2182,14 @@ export namespace Cogl {
|
|
|
2139
2182
|
* instantiated within. This is the {@link Cogl.Context} that was passed to
|
|
2140
2183
|
* `cogl_onscreen_new()` for example.
|
|
2141
2184
|
* @returns The {@link Cogl.Context} that the given `framebuffer` was instantiated within.
|
|
2185
|
+
* @since 1.8
|
|
2142
2186
|
*/
|
|
2143
2187
|
get_context(): Context;
|
|
2144
2188
|
|
|
2145
2189
|
/**
|
|
2146
2190
|
* Retrieves the number of depth bits of `framebuffer`
|
|
2147
2191
|
* @returns the number of bits
|
|
2192
|
+
* @since 2.0
|
|
2148
2193
|
*/
|
|
2149
2194
|
get_depth_bits(): number;
|
|
2150
2195
|
|
|
@@ -2152,6 +2197,7 @@ export namespace Cogl {
|
|
|
2152
2197
|
* Queries whether depth buffer writing is enabled for `framebuffer`. This
|
|
2153
2198
|
* can be controlled via `cogl_framebuffer_set_depth_write_enabled()`.
|
|
2154
2199
|
* @returns `true` if depth writing is enabled or `false` if not.
|
|
2200
|
+
* @since 1.18
|
|
2155
2201
|
*/
|
|
2156
2202
|
get_depth_write_enabled(): boolean;
|
|
2157
2203
|
|
|
@@ -2163,18 +2209,21 @@ export namespace Cogl {
|
|
|
2163
2209
|
* display pipeline does not support dithering. This value only represents
|
|
2164
2210
|
* the user's request for dithering.</note>
|
|
2165
2211
|
* @returns `true` if dithering has been requested or `false` if not.
|
|
2212
|
+
* @since 1.8
|
|
2166
2213
|
*/
|
|
2167
2214
|
get_dither_enabled(): boolean;
|
|
2168
2215
|
|
|
2169
2216
|
/**
|
|
2170
2217
|
* Retrieves the number of green bits of `framebuffer`
|
|
2171
2218
|
* @returns the number of bits
|
|
2219
|
+
* @since 1.8
|
|
2172
2220
|
*/
|
|
2173
2221
|
get_green_bits(): number;
|
|
2174
2222
|
|
|
2175
2223
|
/**
|
|
2176
2224
|
* Queries the current height of the given `framebuffer`.
|
|
2177
2225
|
* @returns The height of `framebuffer`.
|
|
2226
|
+
* @since 1.8
|
|
2178
2227
|
*/
|
|
2179
2228
|
get_height(): number;
|
|
2180
2229
|
|
|
@@ -2182,17 +2231,20 @@ export namespace Cogl {
|
|
|
2182
2231
|
|
|
2183
2232
|
/**
|
|
2184
2233
|
* Stores the current model-view matrix in `matrix`.
|
|
2234
|
+
* @since 1.10
|
|
2185
2235
|
*/
|
|
2186
2236
|
get_modelview_matrix(): Matrix;
|
|
2187
2237
|
|
|
2188
2238
|
/**
|
|
2189
2239
|
* Stores the current projection matrix in `matrix`.
|
|
2240
|
+
* @since 1.10
|
|
2190
2241
|
*/
|
|
2191
2242
|
get_projection_matrix(): Matrix;
|
|
2192
2243
|
|
|
2193
2244
|
/**
|
|
2194
2245
|
* Retrieves the number of red bits of `framebuffer`
|
|
2195
2246
|
* @returns the number of bits
|
|
2247
|
+
* @since 1.8
|
|
2196
2248
|
*/
|
|
2197
2249
|
get_red_bits(): number;
|
|
2198
2250
|
|
|
@@ -2210,6 +2262,7 @@ export namespace Cogl {
|
|
|
2210
2262
|
* framebuffer has been allocated the value will reflect the actual
|
|
2211
2263
|
* number of samples that will be made by the GPU.
|
|
2212
2264
|
* @returns The number of point samples made per pixel when rasterizing geometry or 0 if single-sample rendering has been chosen.
|
|
2265
|
+
* @since 1.10
|
|
2213
2266
|
*/
|
|
2214
2267
|
get_samples_per_pixel(): number;
|
|
2215
2268
|
|
|
@@ -2217,6 +2270,7 @@ export namespace Cogl {
|
|
|
2217
2270
|
* Gets the current {@link Cogl.StereoMode}, which defines which stereo buffers
|
|
2218
2271
|
* should be drawn to. See `cogl_framebuffer_set_stereo_mode()`.
|
|
2219
2272
|
* @returns A {@link Cogl.StereoMode}
|
|
2273
|
+
* @since 1.20
|
|
2220
2274
|
*/
|
|
2221
2275
|
get_stereo_mode(): StereoMode;
|
|
2222
2276
|
|
|
@@ -2225,6 +2279,7 @@ export namespace Cogl {
|
|
|
2225
2279
|
* using `cogl_framebuffer_set_viewport()` or the default values which are 0, 0,
|
|
2226
2280
|
* framebuffer_width and framebuffer_height. The values are written into the
|
|
2227
2281
|
* given `viewport` array.
|
|
2282
|
+
* @since 1.8
|
|
2228
2283
|
*/
|
|
2229
2284
|
get_viewport4fv(): number[];
|
|
2230
2285
|
|
|
@@ -2232,6 +2287,7 @@ export namespace Cogl {
|
|
|
2232
2287
|
* Queries the height of the viewport as set using `cogl_framebuffer_set_viewport()`
|
|
2233
2288
|
* or the default value which is the height of the framebuffer.
|
|
2234
2289
|
* @returns The height of the viewport.
|
|
2290
|
+
* @since 1.8
|
|
2235
2291
|
*/
|
|
2236
2292
|
get_viewport_height(): number;
|
|
2237
2293
|
|
|
@@ -2239,6 +2295,7 @@ export namespace Cogl {
|
|
|
2239
2295
|
* Queries the width of the viewport as set using `cogl_framebuffer_set_viewport()`
|
|
2240
2296
|
* or the default value which is the width of the framebuffer.
|
|
2241
2297
|
* @returns The width of the viewport.
|
|
2298
|
+
* @since 1.8
|
|
2242
2299
|
*/
|
|
2243
2300
|
get_viewport_width(): number;
|
|
2244
2301
|
|
|
@@ -2246,6 +2303,7 @@ export namespace Cogl {
|
|
|
2246
2303
|
* Queries the x coordinate of the viewport origin as set using `cogl_framebuffer_set_viewport()`
|
|
2247
2304
|
* or the default value which is 0.
|
|
2248
2305
|
* @returns The x coordinate of the viewport origin.
|
|
2306
|
+
* @since 1.8
|
|
2249
2307
|
*/
|
|
2250
2308
|
get_viewport_x(): number;
|
|
2251
2309
|
|
|
@@ -2253,17 +2311,20 @@ export namespace Cogl {
|
|
|
2253
2311
|
* Queries the y coordinate of the viewport origin as set using `cogl_framebuffer_set_viewport()`
|
|
2254
2312
|
* or the default value which is 0.
|
|
2255
2313
|
* @returns The y coordinate of the viewport origin.
|
|
2314
|
+
* @since 1.8
|
|
2256
2315
|
*/
|
|
2257
2316
|
get_viewport_y(): number;
|
|
2258
2317
|
|
|
2259
2318
|
/**
|
|
2260
2319
|
* Queries the current width of the given `framebuffer`.
|
|
2261
2320
|
* @returns The width of `framebuffer`.
|
|
2321
|
+
* @since 1.8
|
|
2262
2322
|
*/
|
|
2263
2323
|
get_width(): number;
|
|
2264
2324
|
|
|
2265
2325
|
/**
|
|
2266
2326
|
* Resets the current model-view matrix to the identity matrix.
|
|
2327
|
+
* @since 1.10
|
|
2267
2328
|
*/
|
|
2268
2329
|
identity_matrix(): void;
|
|
2269
2330
|
|
|
@@ -2276,6 +2337,7 @@ export namespace Cogl {
|
|
|
2276
2337
|
* @param y_2 The y coordinate for the second horizontal clipping plane
|
|
2277
2338
|
* @param near The <emphasis>distance</emphasis> to the near clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
2278
2339
|
* @param far The <emphasis>distance</emphasis> to the far clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
2340
|
+
* @since 1.10
|
|
2279
2341
|
*/
|
|
2280
2342
|
orthographic(x_1: number, y_1: number, x_2: number, y_2: number, near: number, far: number): void;
|
|
2281
2343
|
|
|
@@ -2291,6 +2353,7 @@ export namespace Cogl {
|
|
|
2291
2353
|
* @param aspect The (width over height) aspect ratio for display
|
|
2292
2354
|
* @param z_near The distance to the near clipping plane (Must be positive, and must not be 0)
|
|
2293
2355
|
* @param z_far The distance to the far clipping plane (Must be positive)
|
|
2356
|
+
* @since 1.10
|
|
2294
2357
|
*/
|
|
2295
2358
|
perspective(fov_y: number, aspect: number, z_near: number, z_far: number): void;
|
|
2296
2359
|
|
|
@@ -2298,17 +2361,20 @@ export namespace Cogl {
|
|
|
2298
2361
|
* Reverts the clipping region to the state before the last call to
|
|
2299
2362
|
* `cogl_framebuffer_push_scissor_clip()`, `cogl_framebuffer_push_rectangle_clip()`
|
|
2300
2363
|
* `cogl_framebuffer_push_path_clip()`, or `cogl_framebuffer_push_primitive_clip()`.
|
|
2364
|
+
* @since 1.10
|
|
2301
2365
|
*/
|
|
2302
2366
|
pop_clip(): void;
|
|
2303
2367
|
|
|
2304
2368
|
/**
|
|
2305
2369
|
* Restores the model-view matrix on the top of the matrix stack.
|
|
2370
|
+
* @since 1.10
|
|
2306
2371
|
*/
|
|
2307
2372
|
pop_matrix(): void;
|
|
2308
2373
|
|
|
2309
2374
|
/**
|
|
2310
2375
|
* Copies the current model-view matrix onto the matrix stack. The matrix
|
|
2311
2376
|
* can later be restored with `cogl_framebuffer_pop_matrix()`.
|
|
2377
|
+
* @since 1.10
|
|
2312
2378
|
*/
|
|
2313
2379
|
push_matrix(): void;
|
|
2314
2380
|
|
|
@@ -2325,6 +2391,7 @@ export namespace Cogl {
|
|
|
2325
2391
|
* @param y_1 y coordinate for top left corner of the clip rectangle
|
|
2326
2392
|
* @param x_2 x coordinate for bottom right corner of the clip rectangle
|
|
2327
2393
|
* @param y_2 y coordinate for bottom right corner of the clip rectangle
|
|
2394
|
+
* @since 1.10
|
|
2328
2395
|
*/
|
|
2329
2396
|
push_rectangle_clip(x_1: number, y_1: number, x_2: number, y_2: number): void;
|
|
2330
2397
|
|
|
@@ -2346,6 +2413,7 @@ export namespace Cogl {
|
|
|
2346
2413
|
* @param y top edge of the clip rectangle in window coordinates
|
|
2347
2414
|
* @param width width of the clip rectangle
|
|
2348
2415
|
* @param height height of the clip rectangle
|
|
2416
|
+
* @since 1.10
|
|
2349
2417
|
*/
|
|
2350
2418
|
push_scissor_clip(x: number, y: number, width: number, height: number): void;
|
|
2351
2419
|
|
|
@@ -2383,6 +2451,7 @@ export namespace Cogl {
|
|
|
2383
2451
|
* @param format The pixel format to store the data in
|
|
2384
2452
|
* @param pixels The address of the buffer to store the data in
|
|
2385
2453
|
* @returns `true` if the read succeeded or `false` otherwise.
|
|
2454
|
+
* @since 1.10
|
|
2386
2455
|
*/
|
|
2387
2456
|
read_pixels(x: number, y: number, width: number, height: number, format: PixelFormat, pixels: number): boolean;
|
|
2388
2457
|
|
|
@@ -2402,6 +2471,7 @@ export namespace Cogl {
|
|
|
2402
2471
|
* @param source Identifies which auxillary buffer you want to read (only COGL_READ_PIXELS_COLOR_BUFFER supported currently)
|
|
2403
2472
|
* @param bitmap The bitmap to store the results in.
|
|
2404
2473
|
* @returns `true` if the read succeeded or `false` otherwise. The function is only likely to fail if the bitmap points to a pixel buffer and it could not be mapped.
|
|
2474
|
+
* @since 1.10
|
|
2405
2475
|
*/
|
|
2406
2476
|
read_pixels_into_bitmap(x: number, y: number, source: ReadPixelsFlags, bitmap: Bitmap): boolean;
|
|
2407
2477
|
|
|
@@ -2426,6 +2496,7 @@ export namespace Cogl {
|
|
|
2426
2496
|
* If you are performing incremental updates to a framebuffer you
|
|
2427
2497
|
* should consider using `cogl_framebuffer_resolve_samples_region()`
|
|
2428
2498
|
* instead to avoid resolving redundant pixels.
|
|
2499
|
+
* @since 1.8
|
|
2429
2500
|
*/
|
|
2430
2501
|
resolve_samples(): void;
|
|
2431
2502
|
|
|
@@ -2455,6 +2526,7 @@ export namespace Cogl {
|
|
|
2455
2526
|
* @param y top-left y coordinate of region to resolve
|
|
2456
2527
|
* @param width width of region to resolve
|
|
2457
2528
|
* @param height height of region to resolve
|
|
2529
|
+
* @since 1.8
|
|
2458
2530
|
*/
|
|
2459
2531
|
resolve_samples_region(x: number, y: number, width: number, height: number): void;
|
|
2460
2532
|
|
|
@@ -2468,6 +2540,7 @@ export namespace Cogl {
|
|
|
2468
2540
|
* @param x X-component of vertex to rotate around.
|
|
2469
2541
|
* @param y Y-component of vertex to rotate around.
|
|
2470
2542
|
* @param z Z-component of vertex to rotate around.
|
|
2543
|
+
* @since 1.10
|
|
2471
2544
|
*/
|
|
2472
2545
|
rotate(angle: number, x: number, y: number, z: number): void;
|
|
2473
2546
|
|
|
@@ -2475,6 +2548,7 @@ export namespace Cogl {
|
|
|
2475
2548
|
* Multiplies the current model-view matrix by one that rotates
|
|
2476
2549
|
* according to the rotation described by `euler`.
|
|
2477
2550
|
* @param euler A {@link Graphene.Euler}
|
|
2551
|
+
* @since 2.0
|
|
2478
2552
|
*/
|
|
2479
2553
|
rotate_euler(euler: Graphene.Euler): void;
|
|
2480
2554
|
|
|
@@ -2484,6 +2558,7 @@ export namespace Cogl {
|
|
|
2484
2558
|
* @param x Amount to scale along the x-axis
|
|
2485
2559
|
* @param y Amount to scale along the y-axis
|
|
2486
2560
|
* @param z Amount to scale along the z-axis
|
|
2561
|
+
* @since 1.10
|
|
2487
2562
|
*/
|
|
2488
2563
|
scale(x: number, y: number, z: number): void;
|
|
2489
2564
|
|
|
@@ -2495,6 +2570,7 @@ export namespace Cogl {
|
|
|
2495
2570
|
*
|
|
2496
2571
|
* Depth buffer writing is enabled by default.
|
|
2497
2572
|
* @param depth_write_enabled `true` to enable depth writing or `false` to disable
|
|
2573
|
+
* @since 1.18
|
|
2498
2574
|
*/
|
|
2499
2575
|
set_depth_write_enabled(depth_write_enabled: boolean): void;
|
|
2500
2576
|
|
|
@@ -2513,18 +2589,21 @@ export namespace Cogl {
|
|
|
2513
2589
|
*
|
|
2514
2590
|
* Dithering is enabled by default.
|
|
2515
2591
|
* @param dither_enabled `true` to enable dithering or `false` to disable
|
|
2592
|
+
* @since 1.8
|
|
2516
2593
|
*/
|
|
2517
2594
|
set_dither_enabled(dither_enabled: boolean): void;
|
|
2518
2595
|
|
|
2519
2596
|
/**
|
|
2520
2597
|
* Sets `matrix` as the new model-view matrix.
|
|
2521
2598
|
* @param matrix the new model-view matrix
|
|
2599
|
+
* @since 1.10
|
|
2522
2600
|
*/
|
|
2523
2601
|
set_modelview_matrix(matrix: Matrix): void;
|
|
2524
2602
|
|
|
2525
2603
|
/**
|
|
2526
2604
|
* Sets `matrix` as the new projection matrix.
|
|
2527
2605
|
* @param matrix the new projection matrix
|
|
2606
|
+
* @since 1.10
|
|
2528
2607
|
*/
|
|
2529
2608
|
set_projection_matrix(matrix: Matrix): void;
|
|
2530
2609
|
|
|
@@ -2562,6 +2641,7 @@ export namespace Cogl {
|
|
|
2562
2641
|
* framebuffer has changed this can lead to redundant work being
|
|
2563
2642
|
* done.</note>
|
|
2564
2643
|
* @param samples_per_pixel The minimum number of samples per pixel
|
|
2644
|
+
* @since 1.8
|
|
2565
2645
|
*/
|
|
2566
2646
|
set_samples_per_pixel(samples_per_pixel: number): void;
|
|
2567
2647
|
|
|
@@ -2574,6 +2654,7 @@ export namespace Cogl {
|
|
|
2574
2654
|
* enabled. (See `cogl_onscreen_template_set_stereo_enabled()`,
|
|
2575
2655
|
* `cogl_framebuffer_get_is_stereo()`.)
|
|
2576
2656
|
* @param stereo_mode A {@link Cogl.StereoMode} specifying which stereo buffers should be drawn tow.
|
|
2657
|
+
* @since 1.20
|
|
2577
2658
|
*/
|
|
2578
2659
|
set_stereo_mode(stereo_mode: StereoMode): void;
|
|
2579
2660
|
|
|
@@ -2597,12 +2678,14 @@ export namespace Cogl {
|
|
|
2597
2678
|
* @param y The top-left y coordinate of the viewport origin (only integers supported currently)
|
|
2598
2679
|
* @param width The width of the viewport (only integers supported currently)
|
|
2599
2680
|
* @param height The height of the viewport (only integers supported currently)
|
|
2681
|
+
* @since 1.8
|
|
2600
2682
|
*/
|
|
2601
2683
|
set_viewport(x: number, y: number, width: number, height: number): void;
|
|
2602
2684
|
|
|
2603
2685
|
/**
|
|
2604
2686
|
* Multiplies the current model-view matrix by the given matrix.
|
|
2605
2687
|
* @param matrix the matrix to multiply with the current model-view
|
|
2688
|
+
* @since 1.10
|
|
2606
2689
|
*/
|
|
2607
2690
|
transform(matrix: Matrix): void;
|
|
2608
2691
|
|
|
@@ -2612,6 +2695,7 @@ export namespace Cogl {
|
|
|
2612
2695
|
* @param x Distance to translate along the x-axis
|
|
2613
2696
|
* @param y Distance to translate along the y-axis
|
|
2614
2697
|
* @param z Distance to translate along the z-axis
|
|
2698
|
+
* @since 1.10
|
|
2615
2699
|
*/
|
|
2616
2700
|
translate(x: number, y: number, z: number): void;
|
|
2617
2701
|
}
|
|
@@ -2665,6 +2749,7 @@ export namespace Cogl {
|
|
|
2665
2749
|
* @param callback A callback function to call for dirty events
|
|
2666
2750
|
* @param destroy An optional callback to destroy `user_data` when the `callback` is removed or `onscreen` is freed.
|
|
2667
2751
|
* @returns a {@link Cogl.OnscreenDirtyClosure} pointer that can be used to remove the callback and associated `user_data` later.
|
|
2752
|
+
* @since 1.16
|
|
2668
2753
|
*/
|
|
2669
2754
|
add_dirty_callback(callback: OnscreenDirtyCallback, destroy: UserDataDestroyCallback | null): OnscreenDirtyClosure;
|
|
2670
2755
|
|
|
@@ -2690,6 +2775,7 @@ export namespace Cogl {
|
|
|
2690
2775
|
* @param callback A {@link Cogl.OnscreenResizeCallback} to call when the `onscreen` changes size.
|
|
2691
2776
|
* @param destroy An optional callback to destroy `user_data` when the `callback` is removed or `onscreen` is freed.
|
|
2692
2777
|
* @returns a {@link Cogl.OnscreenResizeClosure} pointer that can be used to remove the callback and associated `user_data` later.
|
|
2778
|
+
* @since 2.0
|
|
2693
2779
|
*/
|
|
2694
2780
|
add_resize_callback(callback: OnscreenResizeCallback, destroy: UserDataDestroyCallback | null): OnscreenResizeClosure;
|
|
2695
2781
|
|
|
@@ -2733,6 +2819,7 @@ export namespace Cogl {
|
|
|
2733
2819
|
* age of {@link Cogl.Onscreen} back buffer contents. If this feature is
|
|
2734
2820
|
* missing then this function will always return 0.</note>
|
|
2735
2821
|
* @returns The age of the buffer contents or 0 when the buffer contents are undefined.
|
|
2822
|
+
* @since 1.14
|
|
2736
2823
|
*/
|
|
2737
2824
|
get_buffer_age(): number;
|
|
2738
2825
|
|
|
@@ -2742,6 +2829,7 @@ export namespace Cogl {
|
|
|
2742
2829
|
* `cogl_onscreen_swap_buffers()` or `cogl_onscreen_swap_region()`
|
|
2743
2830
|
* is called.
|
|
2744
2831
|
* @returns the current frame counter value
|
|
2832
|
+
* @since 1.14
|
|
2745
2833
|
*/
|
|
2746
2834
|
get_frame_counter(): number;
|
|
2747
2835
|
|
|
@@ -2761,6 +2849,7 @@ export namespace Cogl {
|
|
|
2761
2849
|
* meaningful with your window system, only whether the `onscreen` has
|
|
2762
2850
|
* been marked as resizable.</note>
|
|
2763
2851
|
* @returns Returns whether `onscreen` has been marked as resizable or not.
|
|
2852
|
+
* @since 2.0
|
|
2764
2853
|
*/
|
|
2765
2854
|
get_resizable(): boolean;
|
|
2766
2855
|
|
|
@@ -2779,6 +2868,7 @@ export namespace Cogl {
|
|
|
2779
2868
|
* requests e.g. to show an already visible window. This also means
|
|
2780
2869
|
* that it's acceptable to alternatively use native APIs to show and
|
|
2781
2870
|
* hide windows without confusing Cogl.</note>
|
|
2871
|
+
* @since 2.0
|
|
2782
2872
|
*/
|
|
2783
2873
|
hide(): void;
|
|
2784
2874
|
|
|
@@ -2790,6 +2880,7 @@ export namespace Cogl {
|
|
|
2790
2880
|
* `cogl_onscreen_add_dirty_callback()` to destroy the user data then
|
|
2791
2881
|
* this will also get called.
|
|
2792
2882
|
* @param closure A {@link Cogl.OnscreenDirtyClosure} returned from `cogl_onscreen_add_dirty_callback()`
|
|
2883
|
+
* @since 1.16
|
|
2793
2884
|
*/
|
|
2794
2885
|
remove_dirty_callback(closure: OnscreenDirtyClosure): void;
|
|
2795
2886
|
|
|
@@ -2801,6 +2892,7 @@ export namespace Cogl {
|
|
|
2801
2892
|
* `cogl_onscreen_add_frame_callback()` to destroy the user data then
|
|
2802
2893
|
* this will get called.
|
|
2803
2894
|
* @param closure A {@link Cogl.FrameClosure} returned from `cogl_onscreen_add_frame_callback()`
|
|
2895
|
+
* @since 1.14
|
|
2804
2896
|
*/
|
|
2805
2897
|
remove_frame_callback(closure: FrameClosure): void;
|
|
2806
2898
|
|
|
@@ -2808,6 +2900,7 @@ export namespace Cogl {
|
|
|
2808
2900
|
* Removes a resize `callback` and `user_data` pair that were previously
|
|
2809
2901
|
* associated with `onscreen` via `cogl_onscreen_add_resize_callback()`.
|
|
2810
2902
|
* @param closure An identifier returned from `cogl_onscreen_add_resize_callback()`
|
|
2903
|
+
* @since 2.0
|
|
2811
2904
|
*/
|
|
2812
2905
|
remove_resize_callback(closure: OnscreenResizeClosure): void;
|
|
2813
2906
|
|
|
@@ -2835,6 +2928,7 @@ export namespace Cogl {
|
|
|
2835
2928
|
* resize handler using `cogl_onscreen_add_resize_callback()` so that it
|
|
2836
2929
|
* can track when the viewport has been changed automatically.</note>
|
|
2837
2930
|
* @param resizable
|
|
2931
|
+
* @since 2.0
|
|
2838
2932
|
*/
|
|
2839
2933
|
set_resizable(resizable: boolean): void;
|
|
2840
2934
|
|
|
@@ -2859,6 +2953,7 @@ export namespace Cogl {
|
|
|
2859
2953
|
* requests e.g. to show an already visible window. This also means
|
|
2860
2954
|
* that it's acceptable to alternatively use native APIs to show and
|
|
2861
2955
|
* hide windows without confusing Cogl.</note>
|
|
2956
|
+
* @since 2.0
|
|
2862
2957
|
*/
|
|
2863
2958
|
show(): void;
|
|
2864
2959
|
|
|
@@ -2876,6 +2971,7 @@ export namespace Cogl {
|
|
|
2876
2971
|
* and also use the `cogl_onscreen_get_buffer_age()` api so they can
|
|
2877
2972
|
* perform incremental updates to older buffers instead of having to
|
|
2878
2973
|
* render a full buffer for every frame.</note>
|
|
2974
|
+
* @since 1.10
|
|
2879
2975
|
*/
|
|
2880
2976
|
swap_buffers(): void;
|
|
2881
2977
|
|
|
@@ -2919,6 +3015,7 @@ export namespace Cogl {
|
|
|
2919
3015
|
* perform incremental rendering based on old back buffers.</note>
|
|
2920
3016
|
* @param rectangles An array of integer 4-tuples representing damaged rectangles as (x, y, width, height) tuples.
|
|
2921
3017
|
* @param n_rectangles The number of 4-tuples to be read from `rectangles`
|
|
3018
|
+
* @since 1.16
|
|
2922
3019
|
*/
|
|
2923
3020
|
swap_buffers_with_damage(rectangles: number, n_rectangles: number): void;
|
|
2924
3021
|
|
|
@@ -2934,6 +3031,7 @@ export namespace Cogl {
|
|
|
2934
3031
|
* frame.
|
|
2935
3032
|
* @param rectangles An array of integer 4-tuples representing rectangles as (x, y, width, height) tuples.
|
|
2936
3033
|
* @param n_rectangles The number of 4-tuples to be read from `rectangles`
|
|
3034
|
+
* @since 1.10
|
|
2937
3035
|
*/
|
|
2938
3036
|
swap_region(rectangles: number, n_rectangles: number): void;
|
|
2939
3037
|
|
|
@@ -2949,6 +3047,8 @@ export namespace Cogl {
|
|
|
2949
3047
|
* program will abort with an error message if there is an error during
|
|
2950
3048
|
* automatic allocation.</note>
|
|
2951
3049
|
* @returns `true` if there were no error allocating the framebuffer, else `false`.
|
|
3050
|
+
* @since 1.8
|
|
3051
|
+
* @throws GLib.Error
|
|
2952
3052
|
*/
|
|
2953
3053
|
allocate(): boolean;
|
|
2954
3054
|
|
|
@@ -2957,6 +3057,7 @@ export namespace Cogl {
|
|
|
2957
3057
|
* that includes the color buffer then the specified `color` is used.
|
|
2958
3058
|
* @param buffers A mask of {@link Cogl.BufferBit}<!-- -->'s identifying which auxiliary buffers to clear
|
|
2959
3059
|
* @param color The color to clear the color buffer too if specified in `buffers`.
|
|
3060
|
+
* @since 1.8
|
|
2960
3061
|
*/
|
|
2961
3062
|
clear(buffers: bigint | number, color: Color): void;
|
|
2962
3063
|
|
|
@@ -2968,6 +3069,7 @@ export namespace Cogl {
|
|
|
2968
3069
|
* @param green The green component of color to clear the color buffer too if specified in `buffers`.
|
|
2969
3070
|
* @param blue The blue component of color to clear the color buffer too if specified in `buffers`.
|
|
2970
3071
|
* @param alpha The alpha component of color to clear the color buffer too if specified in `buffers`.
|
|
3072
|
+
* @since 1.8
|
|
2971
3073
|
*/
|
|
2972
3074
|
clear4f(buffers: bigint | number, red: number, green: number, blue: number, alpha: number): void;
|
|
2973
3075
|
|
|
@@ -2989,6 +3091,7 @@ export namespace Cogl {
|
|
|
2989
3091
|
* framebuffer, and it's not meaningful to try and discard the color buffer of
|
|
2990
3092
|
* a {@link Cogl.Offscreen} framebuffer since they are single-buffered.
|
|
2991
3093
|
* @param buffers A {@link Cogl.BufferBit} mask of which ancillary buffers you want to discard.
|
|
3094
|
+
* @since 1.8
|
|
2992
3095
|
*/
|
|
2993
3096
|
discard_buffers(buffers: bigint | number): void;
|
|
2994
3097
|
|
|
@@ -3038,6 +3141,7 @@ export namespace Cogl {
|
|
|
3038
3141
|
* @param y_2 y coordinate lower right on screen.
|
|
3039
3142
|
* @param tex_coords An array containing groups of 4 float values: [s_1, t_1, s_2, t_2] that are interpreted as two texture coordinates; one for the top left texel, and one for the bottom right texel. Each value should be between 0.0 and 1.0, where the coordinate (0.0, 0.0) represents the top left of the texture, and (1.0, 1.0) the bottom right.
|
|
3040
3143
|
* @param tex_coords_len The length of the `tex_coords` array. (For one layer and one group of texture coordinates, this would be 4)
|
|
3144
|
+
* @since 1.10
|
|
3041
3145
|
*/
|
|
3042
3146
|
draw_multitextured_rectangle(pipeline: Pipeline, x_1: number, y_1: number, x_2: number, y_2: number, tex_coords: number[], tex_coords_len: number): void;
|
|
3043
3147
|
|
|
@@ -3058,6 +3162,7 @@ export namespace Cogl {
|
|
|
3058
3162
|
* @param y_1 Y coordinate of the top-left corner
|
|
3059
3163
|
* @param x_2 X coordinate of the bottom-right corner
|
|
3060
3164
|
* @param y_2 Y coordinate of the bottom-right corner
|
|
3165
|
+
* @since 1.10
|
|
3061
3166
|
*/
|
|
3062
3167
|
draw_rectangle(pipeline: Pipeline, x_1: number, y_1: number, x_2: number, y_2: number): void;
|
|
3063
3168
|
|
|
@@ -3084,6 +3189,7 @@ export namespace Cogl {
|
|
|
3084
3189
|
* @param pipeline A {@link Cogl.Pipeline} state object
|
|
3085
3190
|
* @param coordinates an array of coordinates containing groups of 4 float values: [x_1, y_1, x_2, y_2] that are interpreted as two position coordinates; one for the top left of the rectangle (x1, y1), and one for the bottom right of the rectangle (x2, y2).
|
|
3086
3191
|
* @param n_rectangles number of rectangles defined in `coordinates`.
|
|
3192
|
+
* @since 1.10
|
|
3087
3193
|
*/
|
|
3088
3194
|
draw_rectangles(pipeline: Pipeline, coordinates: number[], n_rectangles: number): void;
|
|
3089
3195
|
|
|
@@ -3123,6 +3229,7 @@ export namespace Cogl {
|
|
|
3123
3229
|
* @param t_1 T texture coordinate of the top-left coorner
|
|
3124
3230
|
* @param s_2 S texture coordinate of the bottom-right coorner
|
|
3125
3231
|
* @param t_2 T texture coordinate of the bottom-right coorner
|
|
3232
|
+
* @since 1.10
|
|
3126
3233
|
*/
|
|
3127
3234
|
draw_textured_rectangle(pipeline: Pipeline, x_1: number, y_1: number, x_2: number, y_2: number, s_1: number, t_1: number, s_2: number, t_2: number): void;
|
|
3128
3235
|
|
|
@@ -3164,6 +3271,7 @@ export namespace Cogl {
|
|
|
3164
3271
|
* @param pipeline A {@link Cogl.Pipeline} state object
|
|
3165
3272
|
* @param coordinates an array containing groups of 8 float values: [x_1, y_1, x_2, y_2, s_1, t_1, s_2, t_2] that have the same meaning as the arguments for `cogl_framebuffer_draw_textured_rectangle()`.
|
|
3166
3273
|
* @param n_rectangles number of rectangles to `coordinates` to draw
|
|
3274
|
+
* @since 1.10
|
|
3167
3275
|
*/
|
|
3168
3276
|
draw_textured_rectangles(pipeline: Pipeline, coordinates: number[], n_rectangles: number): void;
|
|
3169
3277
|
|
|
@@ -3177,6 +3285,7 @@ export namespace Cogl {
|
|
|
3177
3285
|
* One example might be for benchmarking purposes to be sure timing
|
|
3178
3286
|
* measurements reflect the time that the GPU is busy for not just the time it
|
|
3179
3287
|
* takes to queue rendering commands.
|
|
3288
|
+
* @since 1.10
|
|
3180
3289
|
*/
|
|
3181
3290
|
finish(): void;
|
|
3182
3291
|
|
|
@@ -3198,18 +3307,21 @@ export namespace Cogl {
|
|
|
3198
3307
|
* @param top Y position of the top clipping plane where it intersects the near clipping plane
|
|
3199
3308
|
* @param z_near The distance to the near clipping plane (Must be positive)
|
|
3200
3309
|
* @param z_far The distance to the far clipping plane (Must be positive)
|
|
3310
|
+
* @since 1.10
|
|
3201
3311
|
*/
|
|
3202
3312
|
frustum(left: number, right: number, bottom: number, top: number, z_near: number, z_far: number): void;
|
|
3203
3313
|
|
|
3204
3314
|
/**
|
|
3205
3315
|
* Retrieves the number of alpha bits of `framebuffer`
|
|
3206
3316
|
* @returns the number of bits
|
|
3317
|
+
* @since 1.8
|
|
3207
3318
|
*/
|
|
3208
3319
|
get_alpha_bits(): number;
|
|
3209
3320
|
|
|
3210
3321
|
/**
|
|
3211
3322
|
* Retrieves the number of blue bits of `framebuffer`
|
|
3212
3323
|
* @returns the number of bits
|
|
3324
|
+
* @since 1.8
|
|
3213
3325
|
*/
|
|
3214
3326
|
get_blue_bits(): number;
|
|
3215
3327
|
|
|
@@ -3218,12 +3330,14 @@ export namespace Cogl {
|
|
|
3218
3330
|
* instantiated within. This is the {@link Cogl.Context} that was passed to
|
|
3219
3331
|
* `cogl_onscreen_new()` for example.
|
|
3220
3332
|
* @returns The {@link Cogl.Context} that the given `framebuffer` was instantiated within.
|
|
3333
|
+
* @since 1.8
|
|
3221
3334
|
*/
|
|
3222
3335
|
get_context(): Context;
|
|
3223
3336
|
|
|
3224
3337
|
/**
|
|
3225
3338
|
* Retrieves the number of depth bits of `framebuffer`
|
|
3226
3339
|
* @returns the number of bits
|
|
3340
|
+
* @since 2.0
|
|
3227
3341
|
*/
|
|
3228
3342
|
get_depth_bits(): number;
|
|
3229
3343
|
|
|
@@ -3231,6 +3345,7 @@ export namespace Cogl {
|
|
|
3231
3345
|
* Queries whether depth buffer writing is enabled for `framebuffer`. This
|
|
3232
3346
|
* can be controlled via `cogl_framebuffer_set_depth_write_enabled()`.
|
|
3233
3347
|
* @returns `true` if depth writing is enabled or `false` if not.
|
|
3348
|
+
* @since 1.18
|
|
3234
3349
|
*/
|
|
3235
3350
|
get_depth_write_enabled(): boolean;
|
|
3236
3351
|
|
|
@@ -3242,18 +3357,21 @@ export namespace Cogl {
|
|
|
3242
3357
|
* display pipeline does not support dithering. This value only represents
|
|
3243
3358
|
* the user's request for dithering.</note>
|
|
3244
3359
|
* @returns `true` if dithering has been requested or `false` if not.
|
|
3360
|
+
* @since 1.8
|
|
3245
3361
|
*/
|
|
3246
3362
|
get_dither_enabled(): boolean;
|
|
3247
3363
|
|
|
3248
3364
|
/**
|
|
3249
3365
|
* Retrieves the number of green bits of `framebuffer`
|
|
3250
3366
|
* @returns the number of bits
|
|
3367
|
+
* @since 1.8
|
|
3251
3368
|
*/
|
|
3252
3369
|
get_green_bits(): number;
|
|
3253
3370
|
|
|
3254
3371
|
/**
|
|
3255
3372
|
* Queries the current height of the given `framebuffer`.
|
|
3256
3373
|
* @returns The height of `framebuffer`.
|
|
3374
|
+
* @since 1.8
|
|
3257
3375
|
*/
|
|
3258
3376
|
get_height(): number;
|
|
3259
3377
|
|
|
@@ -3261,17 +3379,20 @@ export namespace Cogl {
|
|
|
3261
3379
|
|
|
3262
3380
|
/**
|
|
3263
3381
|
* Stores the current model-view matrix in `matrix`.
|
|
3382
|
+
* @since 1.10
|
|
3264
3383
|
*/
|
|
3265
3384
|
get_modelview_matrix(): Matrix;
|
|
3266
3385
|
|
|
3267
3386
|
/**
|
|
3268
3387
|
* Stores the current projection matrix in `matrix`.
|
|
3388
|
+
* @since 1.10
|
|
3269
3389
|
*/
|
|
3270
3390
|
get_projection_matrix(): Matrix;
|
|
3271
3391
|
|
|
3272
3392
|
/**
|
|
3273
3393
|
* Retrieves the number of red bits of `framebuffer`
|
|
3274
3394
|
* @returns the number of bits
|
|
3395
|
+
* @since 1.8
|
|
3275
3396
|
*/
|
|
3276
3397
|
get_red_bits(): number;
|
|
3277
3398
|
|
|
@@ -3289,6 +3410,7 @@ export namespace Cogl {
|
|
|
3289
3410
|
* framebuffer has been allocated the value will reflect the actual
|
|
3290
3411
|
* number of samples that will be made by the GPU.
|
|
3291
3412
|
* @returns The number of point samples made per pixel when rasterizing geometry or 0 if single-sample rendering has been chosen.
|
|
3413
|
+
* @since 1.10
|
|
3292
3414
|
*/
|
|
3293
3415
|
get_samples_per_pixel(): number;
|
|
3294
3416
|
|
|
@@ -3296,6 +3418,7 @@ export namespace Cogl {
|
|
|
3296
3418
|
* Gets the current {@link Cogl.StereoMode}, which defines which stereo buffers
|
|
3297
3419
|
* should be drawn to. See `cogl_framebuffer_set_stereo_mode()`.
|
|
3298
3420
|
* @returns A {@link Cogl.StereoMode}
|
|
3421
|
+
* @since 1.20
|
|
3299
3422
|
*/
|
|
3300
3423
|
get_stereo_mode(): StereoMode;
|
|
3301
3424
|
|
|
@@ -3304,6 +3427,7 @@ export namespace Cogl {
|
|
|
3304
3427
|
* using `cogl_framebuffer_set_viewport()` or the default values which are 0, 0,
|
|
3305
3428
|
* framebuffer_width and framebuffer_height. The values are written into the
|
|
3306
3429
|
* given `viewport` array.
|
|
3430
|
+
* @since 1.8
|
|
3307
3431
|
*/
|
|
3308
3432
|
get_viewport4fv(): number[];
|
|
3309
3433
|
|
|
@@ -3311,6 +3435,7 @@ export namespace Cogl {
|
|
|
3311
3435
|
* Queries the height of the viewport as set using `cogl_framebuffer_set_viewport()`
|
|
3312
3436
|
* or the default value which is the height of the framebuffer.
|
|
3313
3437
|
* @returns The height of the viewport.
|
|
3438
|
+
* @since 1.8
|
|
3314
3439
|
*/
|
|
3315
3440
|
get_viewport_height(): number;
|
|
3316
3441
|
|
|
@@ -3318,6 +3443,7 @@ export namespace Cogl {
|
|
|
3318
3443
|
* Queries the width of the viewport as set using `cogl_framebuffer_set_viewport()`
|
|
3319
3444
|
* or the default value which is the width of the framebuffer.
|
|
3320
3445
|
* @returns The width of the viewport.
|
|
3446
|
+
* @since 1.8
|
|
3321
3447
|
*/
|
|
3322
3448
|
get_viewport_width(): number;
|
|
3323
3449
|
|
|
@@ -3325,6 +3451,7 @@ export namespace Cogl {
|
|
|
3325
3451
|
* Queries the x coordinate of the viewport origin as set using `cogl_framebuffer_set_viewport()`
|
|
3326
3452
|
* or the default value which is 0.
|
|
3327
3453
|
* @returns The x coordinate of the viewport origin.
|
|
3454
|
+
* @since 1.8
|
|
3328
3455
|
*/
|
|
3329
3456
|
get_viewport_x(): number;
|
|
3330
3457
|
|
|
@@ -3332,17 +3459,20 @@ export namespace Cogl {
|
|
|
3332
3459
|
* Queries the y coordinate of the viewport origin as set using `cogl_framebuffer_set_viewport()`
|
|
3333
3460
|
* or the default value which is 0.
|
|
3334
3461
|
* @returns The y coordinate of the viewport origin.
|
|
3462
|
+
* @since 1.8
|
|
3335
3463
|
*/
|
|
3336
3464
|
get_viewport_y(): number;
|
|
3337
3465
|
|
|
3338
3466
|
/**
|
|
3339
3467
|
* Queries the current width of the given `framebuffer`.
|
|
3340
3468
|
* @returns The width of `framebuffer`.
|
|
3469
|
+
* @since 1.8
|
|
3341
3470
|
*/
|
|
3342
3471
|
get_width(): number;
|
|
3343
3472
|
|
|
3344
3473
|
/**
|
|
3345
3474
|
* Resets the current model-view matrix to the identity matrix.
|
|
3475
|
+
* @since 1.10
|
|
3346
3476
|
*/
|
|
3347
3477
|
identity_matrix(): void;
|
|
3348
3478
|
|
|
@@ -3355,6 +3485,7 @@ export namespace Cogl {
|
|
|
3355
3485
|
* @param y_2 The y coordinate for the second horizontal clipping plane
|
|
3356
3486
|
* @param near The <emphasis>distance</emphasis> to the near clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
3357
3487
|
* @param far The <emphasis>distance</emphasis> to the far clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
3488
|
+
* @since 1.10
|
|
3358
3489
|
*/
|
|
3359
3490
|
orthographic(x_1: number, y_1: number, x_2: number, y_2: number, near: number, far: number): void;
|
|
3360
3491
|
|
|
@@ -3370,6 +3501,7 @@ export namespace Cogl {
|
|
|
3370
3501
|
* @param aspect The (width over height) aspect ratio for display
|
|
3371
3502
|
* @param z_near The distance to the near clipping plane (Must be positive, and must not be 0)
|
|
3372
3503
|
* @param z_far The distance to the far clipping plane (Must be positive)
|
|
3504
|
+
* @since 1.10
|
|
3373
3505
|
*/
|
|
3374
3506
|
perspective(fov_y: number, aspect: number, z_near: number, z_far: number): void;
|
|
3375
3507
|
|
|
@@ -3377,17 +3509,20 @@ export namespace Cogl {
|
|
|
3377
3509
|
* Reverts the clipping region to the state before the last call to
|
|
3378
3510
|
* `cogl_framebuffer_push_scissor_clip()`, `cogl_framebuffer_push_rectangle_clip()`
|
|
3379
3511
|
* `cogl_framebuffer_push_path_clip()`, or `cogl_framebuffer_push_primitive_clip()`.
|
|
3512
|
+
* @since 1.10
|
|
3380
3513
|
*/
|
|
3381
3514
|
pop_clip(): void;
|
|
3382
3515
|
|
|
3383
3516
|
/**
|
|
3384
3517
|
* Restores the model-view matrix on the top of the matrix stack.
|
|
3518
|
+
* @since 1.10
|
|
3385
3519
|
*/
|
|
3386
3520
|
pop_matrix(): void;
|
|
3387
3521
|
|
|
3388
3522
|
/**
|
|
3389
3523
|
* Copies the current model-view matrix onto the matrix stack. The matrix
|
|
3390
3524
|
* can later be restored with `cogl_framebuffer_pop_matrix()`.
|
|
3525
|
+
* @since 1.10
|
|
3391
3526
|
*/
|
|
3392
3527
|
push_matrix(): void;
|
|
3393
3528
|
|
|
@@ -3404,6 +3539,7 @@ export namespace Cogl {
|
|
|
3404
3539
|
* @param y_1 y coordinate for top left corner of the clip rectangle
|
|
3405
3540
|
* @param x_2 x coordinate for bottom right corner of the clip rectangle
|
|
3406
3541
|
* @param y_2 y coordinate for bottom right corner of the clip rectangle
|
|
3542
|
+
* @since 1.10
|
|
3407
3543
|
*/
|
|
3408
3544
|
push_rectangle_clip(x_1: number, y_1: number, x_2: number, y_2: number): void;
|
|
3409
3545
|
|
|
@@ -3425,6 +3561,7 @@ export namespace Cogl {
|
|
|
3425
3561
|
* @param y top edge of the clip rectangle in window coordinates
|
|
3426
3562
|
* @param width width of the clip rectangle
|
|
3427
3563
|
* @param height height of the clip rectangle
|
|
3564
|
+
* @since 1.10
|
|
3428
3565
|
*/
|
|
3429
3566
|
push_scissor_clip(x: number, y: number, width: number, height: number): void;
|
|
3430
3567
|
|
|
@@ -3462,6 +3599,7 @@ export namespace Cogl {
|
|
|
3462
3599
|
* @param format The pixel format to store the data in
|
|
3463
3600
|
* @param pixels The address of the buffer to store the data in
|
|
3464
3601
|
* @returns `true` if the read succeeded or `false` otherwise.
|
|
3602
|
+
* @since 1.10
|
|
3465
3603
|
*/
|
|
3466
3604
|
read_pixels(x: number, y: number, width: number, height: number, format: PixelFormat, pixels: number): boolean;
|
|
3467
3605
|
|
|
@@ -3481,6 +3619,7 @@ export namespace Cogl {
|
|
|
3481
3619
|
* @param source Identifies which auxillary buffer you want to read (only COGL_READ_PIXELS_COLOR_BUFFER supported currently)
|
|
3482
3620
|
* @param bitmap The bitmap to store the results in.
|
|
3483
3621
|
* @returns `true` if the read succeeded or `false` otherwise. The function is only likely to fail if the bitmap points to a pixel buffer and it could not be mapped.
|
|
3622
|
+
* @since 1.10
|
|
3484
3623
|
*/
|
|
3485
3624
|
read_pixels_into_bitmap(x: number, y: number, source: ReadPixelsFlags, bitmap: Bitmap): boolean;
|
|
3486
3625
|
|
|
@@ -3505,6 +3644,7 @@ export namespace Cogl {
|
|
|
3505
3644
|
* If you are performing incremental updates to a framebuffer you
|
|
3506
3645
|
* should consider using `cogl_framebuffer_resolve_samples_region()`
|
|
3507
3646
|
* instead to avoid resolving redundant pixels.
|
|
3647
|
+
* @since 1.8
|
|
3508
3648
|
*/
|
|
3509
3649
|
resolve_samples(): void;
|
|
3510
3650
|
|
|
@@ -3534,6 +3674,7 @@ export namespace Cogl {
|
|
|
3534
3674
|
* @param y top-left y coordinate of region to resolve
|
|
3535
3675
|
* @param width width of region to resolve
|
|
3536
3676
|
* @param height height of region to resolve
|
|
3677
|
+
* @since 1.8
|
|
3537
3678
|
*/
|
|
3538
3679
|
resolve_samples_region(x: number, y: number, width: number, height: number): void;
|
|
3539
3680
|
|
|
@@ -3547,6 +3688,7 @@ export namespace Cogl {
|
|
|
3547
3688
|
* @param x X-component of vertex to rotate around.
|
|
3548
3689
|
* @param y Y-component of vertex to rotate around.
|
|
3549
3690
|
* @param z Z-component of vertex to rotate around.
|
|
3691
|
+
* @since 1.10
|
|
3550
3692
|
*/
|
|
3551
3693
|
rotate(angle: number, x: number, y: number, z: number): void;
|
|
3552
3694
|
|
|
@@ -3554,6 +3696,7 @@ export namespace Cogl {
|
|
|
3554
3696
|
* Multiplies the current model-view matrix by one that rotates
|
|
3555
3697
|
* according to the rotation described by `euler`.
|
|
3556
3698
|
* @param euler A {@link Graphene.Euler}
|
|
3699
|
+
* @since 2.0
|
|
3557
3700
|
*/
|
|
3558
3701
|
rotate_euler(euler: Graphene.Euler): void;
|
|
3559
3702
|
|
|
@@ -3563,6 +3706,7 @@ export namespace Cogl {
|
|
|
3563
3706
|
* @param x Amount to scale along the x-axis
|
|
3564
3707
|
* @param y Amount to scale along the y-axis
|
|
3565
3708
|
* @param z Amount to scale along the z-axis
|
|
3709
|
+
* @since 1.10
|
|
3566
3710
|
*/
|
|
3567
3711
|
scale(x: number, y: number, z: number): void;
|
|
3568
3712
|
|
|
@@ -3574,6 +3718,7 @@ export namespace Cogl {
|
|
|
3574
3718
|
*
|
|
3575
3719
|
* Depth buffer writing is enabled by default.
|
|
3576
3720
|
* @param depth_write_enabled `true` to enable depth writing or `false` to disable
|
|
3721
|
+
* @since 1.18
|
|
3577
3722
|
*/
|
|
3578
3723
|
set_depth_write_enabled(depth_write_enabled: boolean): void;
|
|
3579
3724
|
|
|
@@ -3592,18 +3737,21 @@ export namespace Cogl {
|
|
|
3592
3737
|
*
|
|
3593
3738
|
* Dithering is enabled by default.
|
|
3594
3739
|
* @param dither_enabled `true` to enable dithering or `false` to disable
|
|
3740
|
+
* @since 1.8
|
|
3595
3741
|
*/
|
|
3596
3742
|
set_dither_enabled(dither_enabled: boolean): void;
|
|
3597
3743
|
|
|
3598
3744
|
/**
|
|
3599
3745
|
* Sets `matrix` as the new model-view matrix.
|
|
3600
3746
|
* @param matrix the new model-view matrix
|
|
3747
|
+
* @since 1.10
|
|
3601
3748
|
*/
|
|
3602
3749
|
set_modelview_matrix(matrix: Matrix): void;
|
|
3603
3750
|
|
|
3604
3751
|
/**
|
|
3605
3752
|
* Sets `matrix` as the new projection matrix.
|
|
3606
3753
|
* @param matrix the new projection matrix
|
|
3754
|
+
* @since 1.10
|
|
3607
3755
|
*/
|
|
3608
3756
|
set_projection_matrix(matrix: Matrix): void;
|
|
3609
3757
|
|
|
@@ -3641,6 +3789,7 @@ export namespace Cogl {
|
|
|
3641
3789
|
* framebuffer has changed this can lead to redundant work being
|
|
3642
3790
|
* done.</note>
|
|
3643
3791
|
* @param samples_per_pixel The minimum number of samples per pixel
|
|
3792
|
+
* @since 1.8
|
|
3644
3793
|
*/
|
|
3645
3794
|
set_samples_per_pixel(samples_per_pixel: number): void;
|
|
3646
3795
|
|
|
@@ -3653,6 +3802,7 @@ export namespace Cogl {
|
|
|
3653
3802
|
* enabled. (See `cogl_onscreen_template_set_stereo_enabled()`,
|
|
3654
3803
|
* `cogl_framebuffer_get_is_stereo()`.)
|
|
3655
3804
|
* @param stereo_mode A {@link Cogl.StereoMode} specifying which stereo buffers should be drawn tow.
|
|
3805
|
+
* @since 1.20
|
|
3656
3806
|
*/
|
|
3657
3807
|
set_stereo_mode(stereo_mode: StereoMode): void;
|
|
3658
3808
|
|
|
@@ -3676,12 +3826,14 @@ export namespace Cogl {
|
|
|
3676
3826
|
* @param y The top-left y coordinate of the viewport origin (only integers supported currently)
|
|
3677
3827
|
* @param width The width of the viewport (only integers supported currently)
|
|
3678
3828
|
* @param height The height of the viewport (only integers supported currently)
|
|
3829
|
+
* @since 1.8
|
|
3679
3830
|
*/
|
|
3680
3831
|
set_viewport(x: number, y: number, width: number, height: number): void;
|
|
3681
3832
|
|
|
3682
3833
|
/**
|
|
3683
3834
|
* Multiplies the current model-view matrix by the given matrix.
|
|
3684
3835
|
* @param matrix the matrix to multiply with the current model-view
|
|
3836
|
+
* @since 1.10
|
|
3685
3837
|
*/
|
|
3686
3838
|
transform(matrix: Matrix): void;
|
|
3687
3839
|
|
|
@@ -3691,6 +3843,7 @@ export namespace Cogl {
|
|
|
3691
3843
|
* @param x Distance to translate along the x-axis
|
|
3692
3844
|
* @param y Distance to translate along the y-axis
|
|
3693
3845
|
* @param z Distance to translate along the z-axis
|
|
3846
|
+
* @since 1.10
|
|
3694
3847
|
*/
|
|
3695
3848
|
translate(x: number, y: number, z: number): void;
|
|
3696
3849
|
}
|
|
@@ -3736,32 +3889,38 @@ export namespace Cogl {
|
|
|
3736
3889
|
* keep track of a pipelines ancestry which we may use to help minimize GPU
|
|
3737
3890
|
* state changes.
|
|
3738
3891
|
* @returns a pointer to the newly allocated {@link Cogl.Pipeline}
|
|
3892
|
+
* @since 2.0
|
|
3739
3893
|
*/
|
|
3740
3894
|
copy(): Pipeline;
|
|
3741
3895
|
|
|
3742
3896
|
/**
|
|
3743
3897
|
* Iterates all the layer indices of the given `pipeline`.
|
|
3744
3898
|
* @param callback A {@link Cogl.PipelineLayerCallback} to be called for each layer index
|
|
3899
|
+
* @since 2.0
|
|
3745
3900
|
*/
|
|
3746
3901
|
foreach_layer(callback: PipelineLayerCallback): void;
|
|
3747
3902
|
|
|
3748
3903
|
/**
|
|
3749
3904
|
* @returns The alpha test function of `pipeline`.
|
|
3905
|
+
* @since 2.0
|
|
3750
3906
|
*/
|
|
3751
3907
|
get_alpha_test_function(): PipelineAlphaFunc;
|
|
3752
3908
|
|
|
3753
3909
|
/**
|
|
3754
3910
|
* @returns The alpha test reference value of `pipeline`.
|
|
3911
|
+
* @since 2.0
|
|
3755
3912
|
*/
|
|
3756
3913
|
get_alpha_test_reference(): number;
|
|
3757
3914
|
|
|
3758
3915
|
/**
|
|
3759
3916
|
* Retrieves the current pipeline color.
|
|
3917
|
+
* @since 2.0
|
|
3760
3918
|
*/
|
|
3761
3919
|
get_color(): Color;
|
|
3762
3920
|
|
|
3763
3921
|
/**
|
|
3764
3922
|
* @returns the cull face mode that was previously set with `cogl_pipeline_set_cull_face_mode()`. Status: Unstable
|
|
3923
|
+
* @since 2.0
|
|
3765
3924
|
*/
|
|
3766
3925
|
get_cull_face_mode(): PipelineCullFaceMode;
|
|
3767
3926
|
|
|
@@ -3774,6 +3933,7 @@ export namespace Cogl {
|
|
|
3774
3933
|
* {@link Cogl.Winding.CLOCKWISE} sets them to be clockwise. The default is
|
|
3775
3934
|
* {@link Cogl.Winding.COUNTER_CLOCKWISE}.
|
|
3776
3935
|
* @returns The `pipeline` front face winding Status: Unstable
|
|
3936
|
+
* @since 2.0
|
|
3777
3937
|
*/
|
|
3778
3938
|
get_front_face_winding(): Winding;
|
|
3779
3939
|
|
|
@@ -3786,6 +3946,7 @@ export namespace Cogl {
|
|
|
3786
3946
|
* changed using `cogl_pipeline_set_layer_filters()`.
|
|
3787
3947
|
* @param layer_index the layer number to change.
|
|
3788
3948
|
* @returns The magnification {@link Cogl.PipelineFilter} for the specified layer.
|
|
3949
|
+
* @since 1.10
|
|
3789
3950
|
*/
|
|
3790
3951
|
get_layer_mag_filter(layer_index: number): PipelineFilter;
|
|
3791
3952
|
|
|
@@ -3798,6 +3959,7 @@ export namespace Cogl {
|
|
|
3798
3959
|
* changed using `cogl_pipeline_set_layer_filters()`.
|
|
3799
3960
|
* @param layer_index the layer number to change.
|
|
3800
3961
|
* @returns The minification {@link Cogl.PipelineFilter} for the specified layer.
|
|
3962
|
+
* @since 1.10
|
|
3801
3963
|
*/
|
|
3802
3964
|
get_layer_min_filter(layer_index: number): PipelineFilter;
|
|
3803
3965
|
|
|
@@ -3806,12 +3968,14 @@ export namespace Cogl {
|
|
|
3806
3968
|
* texture layer.
|
|
3807
3969
|
* @param layer_index the layer number to check.
|
|
3808
3970
|
* @returns whether the texture coordinates will be replaced with point sprite coordinates.
|
|
3971
|
+
* @since 2.0
|
|
3809
3972
|
*/
|
|
3810
3973
|
get_layer_point_sprite_coords_enabled(layer_index: number): boolean;
|
|
3811
3974
|
|
|
3812
3975
|
/**
|
|
3813
3976
|
* @param layer_index the index of the layer
|
|
3814
3977
|
* @returns the texture that was set for the given layer of the pipeline or `null` if no texture was set.
|
|
3978
|
+
* @since 1.10
|
|
3815
3979
|
*/
|
|
3816
3980
|
get_layer_texture(layer_index: number): Texture;
|
|
3817
3981
|
|
|
@@ -3820,6 +3984,7 @@ export namespace Cogl {
|
|
|
3820
3984
|
* layer.
|
|
3821
3985
|
* @param layer_index the layer number to change.
|
|
3822
3986
|
* @returns the wrap mode for the 's' coordinate of texture lookups on this layer.
|
|
3987
|
+
* @since 1.6
|
|
3823
3988
|
*/
|
|
3824
3989
|
get_layer_wrap_mode_s(layer_index: number): PipelineWrapMode;
|
|
3825
3990
|
|
|
@@ -3828,17 +3993,20 @@ export namespace Cogl {
|
|
|
3828
3993
|
* layer.
|
|
3829
3994
|
* @param layer_index the layer number to change.
|
|
3830
3995
|
* @returns the wrap mode for the 't' coordinate of texture lookups on this layer.
|
|
3996
|
+
* @since 1.6
|
|
3831
3997
|
*/
|
|
3832
3998
|
get_layer_wrap_mode_t(layer_index: number): PipelineWrapMode;
|
|
3833
3999
|
|
|
3834
4000
|
/**
|
|
3835
4001
|
* Retrieves the number of layers defined for the given `pipeline`
|
|
3836
4002
|
* @returns the number of layers
|
|
4003
|
+
* @since 2.0
|
|
3837
4004
|
*/
|
|
3838
4005
|
get_n_layers(): number;
|
|
3839
4006
|
|
|
3840
4007
|
/**
|
|
3841
4008
|
* @returns `true` if the pipeline has per-vertex point size enabled or `false` otherwise. The per-vertex point size can be enabled with `cogl_pipeline_set_per_vertex_point_size()`.
|
|
4009
|
+
* @since 2.0
|
|
3842
4010
|
*/
|
|
3843
4011
|
get_per_vertex_point_size(): boolean;
|
|
3844
4012
|
|
|
@@ -3846,6 +4014,7 @@ export namespace Cogl {
|
|
|
3846
4014
|
* Get the size of points drawn when {@link Cogl.VerticesMode.POINTS} is
|
|
3847
4015
|
* used with the vertex buffer API.
|
|
3848
4016
|
* @returns the point size of the `pipeline`.
|
|
4017
|
+
* @since 2.0
|
|
3849
4018
|
*/
|
|
3850
4019
|
get_point_size(): number;
|
|
3851
4020
|
|
|
@@ -3861,6 +4030,7 @@ export namespace Cogl {
|
|
|
3861
4030
|
* before calling this function.
|
|
3862
4031
|
* @param uniform_name The name of a uniform
|
|
3863
4032
|
* @returns A integer representing the location of the given uniform.
|
|
4033
|
+
* @since 2.0
|
|
3864
4034
|
*/
|
|
3865
4035
|
get_uniform_location(uniform_name: string): number;
|
|
3866
4036
|
|
|
@@ -3868,12 +4038,14 @@ export namespace Cogl {
|
|
|
3868
4038
|
* Queries what user program has been associated with the given
|
|
3869
4039
|
* `pipeline` using `cogl_pipeline_set_user_program()`.
|
|
3870
4040
|
* @returns The current user program or `null`.
|
|
4041
|
+
* @since 2.0
|
|
3871
4042
|
*/
|
|
3872
4043
|
get_user_program(): Handle;
|
|
3873
4044
|
|
|
3874
4045
|
/**
|
|
3875
4046
|
* This function removes a layer from your pipeline
|
|
3876
4047
|
* @param layer_index Specifies the layer you want to remove
|
|
4048
|
+
* @since 1.10
|
|
3877
4049
|
*/
|
|
3878
4050
|
remove_layer(layer_index: number): void;
|
|
3879
4051
|
|
|
@@ -3887,6 +4059,7 @@ export namespace Cogl {
|
|
|
3887
4059
|
* The default is {@link Cogl.PipelineAlphaFunc.ALWAYS}
|
|
3888
4060
|
* @param alpha_func A `CoglPipelineAlphaFunc` constant
|
|
3889
4061
|
* @param alpha_reference A reference point that the chosen alpha function uses to compare incoming fragments to.
|
|
4062
|
+
* @since 2.0
|
|
3890
4063
|
*/
|
|
3891
4064
|
set_alpha_test_function(alpha_func: PipelineAlphaFunc, alpha_reference: number): void;
|
|
3892
4065
|
|
|
@@ -3958,6 +4131,8 @@ export namespace Cogl {
|
|
|
3958
4131
|
* is in premultiplied form.
|
|
3959
4132
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired blend function.
|
|
3960
4133
|
* @returns `true` if the blend string was successfully parsed, and the described blending is supported by the underlying driver/hardware. If there was an error, `false` is returned and `error` is set accordingly (if present).
|
|
4134
|
+
* @since 2.0
|
|
4135
|
+
* @throws GLib.Error
|
|
3961
4136
|
*/
|
|
3962
4137
|
set_blend(blend_string: string): boolean;
|
|
3963
4138
|
|
|
@@ -3965,6 +4140,7 @@ export namespace Cogl {
|
|
|
3965
4140
|
* When blending is setup to reference a CONSTANT blend factor then
|
|
3966
4141
|
* blending will depend on the constant set with this function.
|
|
3967
4142
|
* @param constant_color The constant color you want
|
|
4143
|
+
* @since 2.0
|
|
3968
4144
|
*/
|
|
3969
4145
|
set_blend_constant(constant_color: Color): void;
|
|
3970
4146
|
|
|
@@ -3978,6 +4154,7 @@ export namespace Cogl {
|
|
|
3978
4154
|
*
|
|
3979
4155
|
* The default value is (1.0, 1.0, 1.0, 1.0)
|
|
3980
4156
|
* @param color The components of the color
|
|
4157
|
+
* @since 2.0
|
|
3981
4158
|
*/
|
|
3982
4159
|
set_color(color: Color): void;
|
|
3983
4160
|
|
|
@@ -3989,6 +4166,7 @@ export namespace Cogl {
|
|
|
3989
4166
|
* @param green The green component
|
|
3990
4167
|
* @param blue The blue component
|
|
3991
4168
|
* @param alpha The alpha component
|
|
4169
|
+
* @since 2.0
|
|
3992
4170
|
*/
|
|
3993
4171
|
set_color4f(red: number, green: number, blue: number, alpha: number): void;
|
|
3994
4172
|
|
|
@@ -4000,6 +4178,7 @@ export namespace Cogl {
|
|
|
4000
4178
|
* @param green The green component
|
|
4001
4179
|
* @param blue The blue component
|
|
4002
4180
|
* @param alpha The alpha component
|
|
4181
|
+
* @since 2.0
|
|
4003
4182
|
*/
|
|
4004
4183
|
set_color4ub(red: number, green: number, blue: number, alpha: number): void;
|
|
4005
4184
|
|
|
@@ -4019,6 +4198,7 @@ export namespace Cogl {
|
|
|
4019
4198
|
*
|
|
4020
4199
|
* Status: Unstable
|
|
4021
4200
|
* @param cull_face_mode The new mode to set
|
|
4201
|
+
* @since 2.0
|
|
4022
4202
|
*/
|
|
4023
4203
|
set_cull_face_mode(cull_face_mode: PipelineCullFaceMode): void;
|
|
4024
4204
|
|
|
@@ -4033,6 +4213,7 @@ export namespace Cogl {
|
|
|
4033
4213
|
*
|
|
4034
4214
|
* Status: Unstable
|
|
4035
4215
|
* @param front_winding the winding order
|
|
4216
|
+
* @since 2.0
|
|
4036
4217
|
*/
|
|
4037
4218
|
set_front_face_winding(front_winding: Winding): void;
|
|
4038
4219
|
|
|
@@ -4116,6 +4297,8 @@ export namespace Cogl {
|
|
|
4116
4297
|
* @param layer_index Specifies the layer you want define a combine function for
|
|
4117
4298
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired texture combine function.
|
|
4118
4299
|
* @returns `true` if the blend string was successfully parsed, and the described texture combining is supported by the underlying driver and or hardware. On failure, `false` is returned and `error` is set
|
|
4300
|
+
* @since 2.0
|
|
4301
|
+
* @throws GLib.Error
|
|
4119
4302
|
*/
|
|
4120
4303
|
set_layer_combine(layer_index: number, blend_string: string): boolean;
|
|
4121
4304
|
|
|
@@ -4124,6 +4307,7 @@ export namespace Cogl {
|
|
|
4124
4307
|
* description then you can use this function to define its value.
|
|
4125
4308
|
* @param layer_index Specifies the layer you want to specify a constant used for texture combining
|
|
4126
4309
|
* @param constant The constant color you want
|
|
4310
|
+
* @since 2.0
|
|
4127
4311
|
*/
|
|
4128
4312
|
set_layer_combine_constant(layer_index: number, constant: Color): void;
|
|
4129
4313
|
|
|
@@ -4138,6 +4322,7 @@ export namespace Cogl {
|
|
|
4138
4322
|
* @param layer_index the layer number to change.
|
|
4139
4323
|
* @param min_filter the filter used when scaling a texture down.
|
|
4140
4324
|
* @param mag_filter the filter used when magnifying a texture.
|
|
4325
|
+
* @since 1.10
|
|
4141
4326
|
*/
|
|
4142
4327
|
set_layer_filters(layer_index: number, min_filter: PipelineFilter, mag_filter: PipelineFilter): void;
|
|
4143
4328
|
|
|
@@ -4146,6 +4331,7 @@ export namespace Cogl {
|
|
|
4146
4331
|
* and rotate a single layer of a pipeline used to fill your geometry.
|
|
4147
4332
|
* @param layer_index the index for the layer inside `pipeline`
|
|
4148
4333
|
* @param matrix the transformation matrix for the layer
|
|
4334
|
+
* @since 1.10
|
|
4149
4335
|
*/
|
|
4150
4336
|
set_layer_matrix(layer_index: number, matrix: Matrix): void;
|
|
4151
4337
|
|
|
@@ -4165,6 +4351,7 @@ export namespace Cogl {
|
|
|
4165
4351
|
* specify the texture type so that any pipeline copies can share the
|
|
4166
4352
|
* internal texture type state for efficiency.
|
|
4167
4353
|
* @param layer_index The layer number to modify
|
|
4354
|
+
* @since 1.10
|
|
4168
4355
|
*/
|
|
4169
4356
|
set_layer_null_texture(layer_index: number): void;
|
|
4170
4357
|
|
|
@@ -4178,6 +4365,8 @@ export namespace Cogl {
|
|
|
4178
4365
|
* @param layer_index the layer number to change.
|
|
4179
4366
|
* @param enable whether to enable point sprite coord generation.
|
|
4180
4367
|
* @returns `true` if the function succeeds, `false` otherwise.
|
|
4368
|
+
* @since 2.0
|
|
4369
|
+
* @throws GLib.Error
|
|
4181
4370
|
*/
|
|
4182
4371
|
set_layer_point_sprite_coords_enabled(layer_index: number, enable: boolean): boolean;
|
|
4183
4372
|
|
|
@@ -4194,6 +4383,7 @@ export namespace Cogl {
|
|
|
4194
4383
|
* `cogl_pipeline_set_layer_wrap_mode_t()` separately.
|
|
4195
4384
|
* @param layer_index the layer number to change.
|
|
4196
4385
|
* @param mode the new wrap mode
|
|
4386
|
+
* @since 2.0
|
|
4197
4387
|
*/
|
|
4198
4388
|
set_layer_wrap_mode(layer_index: number, mode: PipelineWrapMode): void;
|
|
4199
4389
|
|
|
@@ -4201,6 +4391,7 @@ export namespace Cogl {
|
|
|
4201
4391
|
* Sets the wrap mode for the 's' coordinate of texture lookups on this layer.
|
|
4202
4392
|
* @param layer_index the layer number to change.
|
|
4203
4393
|
* @param mode the new wrap mode
|
|
4394
|
+
* @since 2.0
|
|
4204
4395
|
*/
|
|
4205
4396
|
set_layer_wrap_mode_s(layer_index: number, mode: PipelineWrapMode): void;
|
|
4206
4397
|
|
|
@@ -4208,6 +4399,7 @@ export namespace Cogl {
|
|
|
4208
4399
|
* Sets the wrap mode for the 't' coordinate of texture lookups on this layer.
|
|
4209
4400
|
* @param layer_index the layer number to change.
|
|
4210
4401
|
* @param mode the new wrap mode
|
|
4402
|
+
* @since 2.0
|
|
4211
4403
|
*/
|
|
4212
4404
|
set_layer_wrap_mode_t(layer_index: number, mode: PipelineWrapMode): void;
|
|
4213
4405
|
|
|
@@ -4224,6 +4416,8 @@ export namespace Cogl {
|
|
|
4224
4416
|
* undefined.
|
|
4225
4417
|
* @param enable whether to enable per-vertex point size
|
|
4226
4418
|
* @returns `true` if the change suceeded or `false` otherwise
|
|
4419
|
+
* @since 2.0
|
|
4420
|
+
* @throws GLib.Error
|
|
4227
4421
|
*/
|
|
4228
4422
|
set_per_vertex_point_size(enable: boolean): boolean;
|
|
4229
4423
|
|
|
@@ -4241,6 +4435,7 @@ export namespace Cogl {
|
|
|
4241
4435
|
* if an application wants to draw points it must make sure to use a
|
|
4242
4436
|
* pipeline that has an explicit point size set on it.
|
|
4243
4437
|
* @param point_size the new point size.
|
|
4438
|
+
* @since 2.0
|
|
4244
4439
|
*/
|
|
4245
4440
|
set_point_size(point_size: number): void;
|
|
4246
4441
|
|
|
@@ -4257,6 +4452,7 @@ export namespace Cogl {
|
|
|
4257
4452
|
* uniform.
|
|
4258
4453
|
* @param uniform_location The uniform's location identifier
|
|
4259
4454
|
* @param value The new value for the uniform
|
|
4455
|
+
* @since 2.0
|
|
4260
4456
|
*/
|
|
4261
4457
|
set_uniform_1f(uniform_location: number, value: number): void;
|
|
4262
4458
|
|
|
@@ -4273,6 +4469,7 @@ export namespace Cogl {
|
|
|
4273
4469
|
* uniform or a sampler uniform.
|
|
4274
4470
|
* @param uniform_location The uniform's location identifier
|
|
4275
4471
|
* @param value The new value for the uniform
|
|
4472
|
+
* @since 2.0
|
|
4276
4473
|
*/
|
|
4277
4474
|
set_uniform_1i(uniform_location: number, value: number): void;
|
|
4278
4475
|
|
|
@@ -4293,6 +4490,7 @@ export namespace Cogl {
|
|
|
4293
4490
|
* @param n_components The number of components in the corresponding uniform's type
|
|
4294
4491
|
* @param count The number of values to set
|
|
4295
4492
|
* @param value Pointer to the new values to set
|
|
4493
|
+
* @since 2.0
|
|
4296
4494
|
*/
|
|
4297
4495
|
set_uniform_float(uniform_location: number, n_components: number, count: number, value: number): void;
|
|
4298
4496
|
|
|
@@ -4313,6 +4511,7 @@ export namespace Cogl {
|
|
|
4313
4511
|
* @param n_components The number of components in the corresponding uniform's type
|
|
4314
4512
|
* @param count The number of values to set
|
|
4315
4513
|
* @param value Pointer to the new values to set
|
|
4514
|
+
* @since 2.0
|
|
4316
4515
|
*/
|
|
4317
4516
|
set_uniform_int(uniform_location: number, n_components: number, count: number, value: number): void;
|
|
4318
4517
|
|
|
@@ -4339,6 +4538,7 @@ export namespace Cogl {
|
|
|
4339
4538
|
* @param count The number of values to set
|
|
4340
4539
|
* @param transpose Whether to transpose the matrix
|
|
4341
4540
|
* @param value Pointer to the new values to set
|
|
4541
|
+
* @since 2.0
|
|
4342
4542
|
*/
|
|
4343
4543
|
set_uniform_matrix(uniform_location: number, dimensions: number, count: number, transpose: boolean, value: number): void;
|
|
4344
4544
|
|
|
@@ -4379,6 +4579,7 @@ export namespace Cogl {
|
|
|
4379
4579
|
* meantime we hope this will handle most practical GLSL and ARBfp
|
|
4380
4580
|
* requirements.
|
|
4381
4581
|
* @param program A {@link Cogl.Handle} to a linked CoglProgram
|
|
4582
|
+
* @since 2.0
|
|
4382
4583
|
*/
|
|
4383
4584
|
set_user_program(program: Handle): void;
|
|
4384
4585
|
}
|
|
@@ -4434,6 +4635,7 @@ export namespace Cogl {
|
|
|
4434
4635
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
4435
4636
|
* framebuffer and rendered too.</note>
|
|
4436
4637
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
4638
|
+
* @throws GLib.Error
|
|
4437
4639
|
*/
|
|
4438
4640
|
allocate(): boolean;
|
|
4439
4641
|
|
|
@@ -4445,6 +4647,7 @@ export namespace Cogl {
|
|
|
4445
4647
|
* is {@link Cogl.TextureComponents.RGBA}. The other constructors which take
|
|
4446
4648
|
* a %CoglBitmap or a data pointer default to the same components as
|
|
4447
4649
|
* the pixel format of the data.
|
|
4650
|
+
* @since 1.18
|
|
4448
4651
|
*/
|
|
4449
4652
|
get_components(): TextureComponents;
|
|
4450
4653
|
|
|
@@ -4491,6 +4694,7 @@ export namespace Cogl {
|
|
|
4491
4694
|
*
|
|
4492
4695
|
* By default the pre-multipled state is `TRUE`.
|
|
4493
4696
|
* @returns `true` if red, green and blue components are internally stored pre-multiplied by the alpha value or `false` if not.
|
|
4697
|
+
* @since 1.18
|
|
4494
4698
|
*/
|
|
4495
4699
|
get_premultiplied(): boolean;
|
|
4496
4700
|
|
|
@@ -4523,6 +4727,8 @@ export namespace Cogl {
|
|
|
4523
4727
|
* @param sub_width Width in pixels of the subregion
|
|
4524
4728
|
* @param sub_height Height in pixels of the subregion
|
|
4525
4729
|
* @returns A newly created {@link Cogl.Texture} or `null` on failure
|
|
4730
|
+
* @since 1.2
|
|
4731
|
+
* @deprecated since 1.18: Use `cogl_sub_texture_new()`
|
|
4526
4732
|
*/
|
|
4527
4733
|
new_from_sub_texture(sub_x: number, sub_y: number, sub_width: number, sub_height: number): Texture;
|
|
4528
4734
|
|
|
@@ -4547,6 +4753,7 @@ export namespace Cogl {
|
|
|
4547
4753
|
* an image format as long as {@link Cogl.TextureComponents.RG} isn't used
|
|
4548
4754
|
* as the texture's components.
|
|
4549
4755
|
* @param components
|
|
4756
|
+
* @since 1.18
|
|
4550
4757
|
*/
|
|
4551
4758
|
set_components(components: TextureComponents): void;
|
|
4552
4759
|
|
|
@@ -4598,6 +4805,7 @@ export namespace Cogl {
|
|
|
4598
4805
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
4599
4806
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
4600
4807
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
4808
|
+
* @throws GLib.Error
|
|
4601
4809
|
*/
|
|
4602
4810
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
4603
4811
|
|
|
@@ -4624,6 +4832,7 @@ export namespace Cogl {
|
|
|
4624
4832
|
*
|
|
4625
4833
|
* By default the `premultipled` state is `TRUE`.
|
|
4626
4834
|
* @param premultiplied Whether any internally stored red, green or blue components are pre-multiplied by an alpha component.
|
|
4835
|
+
* @since 1.18
|
|
4627
4836
|
*/
|
|
4628
4837
|
set_premultiplied(premultiplied: boolean): void;
|
|
4629
4838
|
|
|
@@ -4661,6 +4870,7 @@ export namespace Cogl {
|
|
|
4661
4870
|
* @param dst_height height of destination region to write. (Must be less than or equal to the bitmap height)
|
|
4662
4871
|
* @param bitmap The source bitmap to read from
|
|
4663
4872
|
* @returns `true` if the subregion upload was successful, and `false` otherwise
|
|
4873
|
+
* @since 1.8
|
|
4664
4874
|
*/
|
|
4665
4875
|
set_region_from_bitmap(src_x: number, src_y: number, dst_x: number, dst_y: number, dst_width: number, dst_height: number, bitmap: Bitmap): boolean;
|
|
4666
4876
|
}
|
|
@@ -4708,6 +4918,7 @@ export namespace Cogl {
|
|
|
4708
4918
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
4709
4919
|
* framebuffer and rendered too.</note>
|
|
4710
4920
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
4921
|
+
* @throws GLib.Error
|
|
4711
4922
|
*/
|
|
4712
4923
|
allocate(): boolean;
|
|
4713
4924
|
|
|
@@ -4719,6 +4930,7 @@ export namespace Cogl {
|
|
|
4719
4930
|
* is {@link Cogl.TextureComponents.RGBA}. The other constructors which take
|
|
4720
4931
|
* a %CoglBitmap or a data pointer default to the same components as
|
|
4721
4932
|
* the pixel format of the data.
|
|
4933
|
+
* @since 1.18
|
|
4722
4934
|
*/
|
|
4723
4935
|
get_components(): TextureComponents;
|
|
4724
4936
|
|
|
@@ -4765,6 +4977,7 @@ export namespace Cogl {
|
|
|
4765
4977
|
*
|
|
4766
4978
|
* By default the pre-multipled state is `TRUE`.
|
|
4767
4979
|
* @returns `true` if red, green and blue components are internally stored pre-multiplied by the alpha value or `false` if not.
|
|
4980
|
+
* @since 1.18
|
|
4768
4981
|
*/
|
|
4769
4982
|
get_premultiplied(): boolean;
|
|
4770
4983
|
|
|
@@ -4797,6 +5010,8 @@ export namespace Cogl {
|
|
|
4797
5010
|
* @param sub_width Width in pixels of the subregion
|
|
4798
5011
|
* @param sub_height Height in pixels of the subregion
|
|
4799
5012
|
* @returns A newly created {@link Cogl.Texture} or `null` on failure
|
|
5013
|
+
* @since 1.2
|
|
5014
|
+
* @deprecated since 1.18: Use `cogl_sub_texture_new()`
|
|
4800
5015
|
*/
|
|
4801
5016
|
new_from_sub_texture(sub_x: number, sub_y: number, sub_width: number, sub_height: number): Texture;
|
|
4802
5017
|
|
|
@@ -4821,6 +5036,7 @@ export namespace Cogl {
|
|
|
4821
5036
|
* an image format as long as {@link Cogl.TextureComponents.RG} isn't used
|
|
4822
5037
|
* as the texture's components.
|
|
4823
5038
|
* @param components
|
|
5039
|
+
* @since 1.18
|
|
4824
5040
|
*/
|
|
4825
5041
|
set_components(components: TextureComponents): void;
|
|
4826
5042
|
|
|
@@ -4872,6 +5088,7 @@ export namespace Cogl {
|
|
|
4872
5088
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
4873
5089
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
4874
5090
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
5091
|
+
* @throws GLib.Error
|
|
4875
5092
|
*/
|
|
4876
5093
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
4877
5094
|
|
|
@@ -4898,6 +5115,7 @@ export namespace Cogl {
|
|
|
4898
5115
|
*
|
|
4899
5116
|
* By default the `premultipled` state is `TRUE`.
|
|
4900
5117
|
* @param premultiplied Whether any internally stored red, green or blue components are pre-multiplied by an alpha component.
|
|
5118
|
+
* @since 1.18
|
|
4901
5119
|
*/
|
|
4902
5120
|
set_premultiplied(premultiplied: boolean): void;
|
|
4903
5121
|
|
|
@@ -4935,6 +5153,7 @@ export namespace Cogl {
|
|
|
4935
5153
|
* @param dst_height height of destination region to write. (Must be less than or equal to the bitmap height)
|
|
4936
5154
|
* @param bitmap The source bitmap to read from
|
|
4937
5155
|
* @returns `true` if the subregion upload was successful, and `false` otherwise
|
|
5156
|
+
* @since 1.8
|
|
4938
5157
|
*/
|
|
4939
5158
|
set_region_from_bitmap(src_x: number, src_y: number, dst_x: number, dst_y: number, dst_width: number, dst_height: number, bitmap: Bitmap): boolean;
|
|
4940
5159
|
}
|
|
@@ -4963,6 +5182,7 @@ export namespace Cogl {
|
|
|
4963
5182
|
* parameter, when using {@link Cogl.Color}<!-- -->s as keys in a {@link GLib.HashTable}.
|
|
4964
5183
|
* @param v1 a {@link Cogl.Color}
|
|
4965
5184
|
* @param v2 a {@link Cogl.Color}
|
|
5185
|
+
* @since 1.0
|
|
4966
5186
|
*/
|
|
4967
5187
|
static equal(v1: null, v2: null): boolean;
|
|
4968
5188
|
|
|
@@ -4972,6 +5192,7 @@ export namespace Cogl {
|
|
|
4972
5192
|
* @param hue hue value, in the 0 .. 360 range
|
|
4973
5193
|
* @param saturation saturation value, in the 0 .. 1 range
|
|
4974
5194
|
* @param luminance luminance value, in the 0 .. 1 range
|
|
5195
|
+
* @since 1.16
|
|
4975
5196
|
*/
|
|
4976
5197
|
static init_from_hsl(hue: number, saturation: number, luminance: number): Color;
|
|
4977
5198
|
|
|
@@ -4979,11 +5200,13 @@ export namespace Cogl {
|
|
|
4979
5200
|
/**
|
|
4980
5201
|
* Creates a copy of `color`
|
|
4981
5202
|
* @returns a newly-allocated {@link Cogl.Color}. Use `cogl_color_free()` to free the allocate resources
|
|
5203
|
+
* @since 1.0
|
|
4982
5204
|
*/
|
|
4983
5205
|
copy(): Color;
|
|
4984
5206
|
|
|
4985
5207
|
/**
|
|
4986
5208
|
* Frees the resources allocated by `cogl_color_new()` and `cogl_color_copy()`
|
|
5209
|
+
* @since 1.0
|
|
4987
5210
|
*/
|
|
4988
5211
|
free(): void;
|
|
4989
5212
|
|
|
@@ -4991,6 +5214,7 @@ export namespace Cogl {
|
|
|
4991
5214
|
* Retrieves the alpha channel of `color` as a fixed point
|
|
4992
5215
|
* value between 0 and 1.0.
|
|
4993
5216
|
* @returns the alpha channel of the passed color
|
|
5217
|
+
* @since 1.0
|
|
4994
5218
|
*/
|
|
4995
5219
|
get_alpha(): number;
|
|
4996
5220
|
|
|
@@ -4998,6 +5222,7 @@ export namespace Cogl {
|
|
|
4998
5222
|
* Retrieves the alpha channel of `color` as a byte value
|
|
4999
5223
|
* between 0 and 255
|
|
5000
5224
|
* @returns the alpha channel of the passed color
|
|
5225
|
+
* @since 1.0
|
|
5001
5226
|
*/
|
|
5002
5227
|
get_alpha_byte(): number;
|
|
5003
5228
|
|
|
@@ -5005,6 +5230,7 @@ export namespace Cogl {
|
|
|
5005
5230
|
* Retrieves the alpha channel of `color` as a floating point
|
|
5006
5231
|
* value between 0.0 and 1.0
|
|
5007
5232
|
* @returns the alpha channel of the passed color
|
|
5233
|
+
* @since 1.0
|
|
5008
5234
|
*/
|
|
5009
5235
|
get_alpha_float(): number;
|
|
5010
5236
|
|
|
@@ -5012,6 +5238,7 @@ export namespace Cogl {
|
|
|
5012
5238
|
* Retrieves the blue channel of `color` as a fixed point
|
|
5013
5239
|
* value between 0 and 1.0.
|
|
5014
5240
|
* @returns the blue channel of the passed color
|
|
5241
|
+
* @since 1.0
|
|
5015
5242
|
*/
|
|
5016
5243
|
get_blue(): number;
|
|
5017
5244
|
|
|
@@ -5019,6 +5246,7 @@ export namespace Cogl {
|
|
|
5019
5246
|
* Retrieves the blue channel of `color` as a byte value
|
|
5020
5247
|
* between 0 and 255
|
|
5021
5248
|
* @returns the blue channel of the passed color
|
|
5249
|
+
* @since 1.0
|
|
5022
5250
|
*/
|
|
5023
5251
|
get_blue_byte(): number;
|
|
5024
5252
|
|
|
@@ -5026,6 +5254,7 @@ export namespace Cogl {
|
|
|
5026
5254
|
* Retrieves the blue channel of `color` as a floating point
|
|
5027
5255
|
* value between 0.0 and 1.0
|
|
5028
5256
|
* @returns the blue channel of the passed color
|
|
5257
|
+
* @since 1.0
|
|
5029
5258
|
*/
|
|
5030
5259
|
get_blue_float(): number;
|
|
5031
5260
|
|
|
@@ -5033,6 +5262,7 @@ export namespace Cogl {
|
|
|
5033
5262
|
* Retrieves the green channel of `color` as a fixed point
|
|
5034
5263
|
* value between 0 and 1.0.
|
|
5035
5264
|
* @returns the green channel of the passed color
|
|
5265
|
+
* @since 1.0
|
|
5036
5266
|
*/
|
|
5037
5267
|
get_green(): number;
|
|
5038
5268
|
|
|
@@ -5040,6 +5270,7 @@ export namespace Cogl {
|
|
|
5040
5270
|
* Retrieves the green channel of `color` as a byte value
|
|
5041
5271
|
* between 0 and 255
|
|
5042
5272
|
* @returns the green channel of the passed color
|
|
5273
|
+
* @since 1.0
|
|
5043
5274
|
*/
|
|
5044
5275
|
get_green_byte(): number;
|
|
5045
5276
|
|
|
@@ -5047,6 +5278,7 @@ export namespace Cogl {
|
|
|
5047
5278
|
* Retrieves the green channel of `color` as a floating point
|
|
5048
5279
|
* value between 0.0 and 1.0
|
|
5049
5280
|
* @returns the green channel of the passed color
|
|
5281
|
+
* @since 1.0
|
|
5050
5282
|
*/
|
|
5051
5283
|
get_green_float(): number;
|
|
5052
5284
|
|
|
@@ -5054,6 +5286,7 @@ export namespace Cogl {
|
|
|
5054
5286
|
* Retrieves the red channel of `color` as a fixed point
|
|
5055
5287
|
* value between 0 and 1.0.
|
|
5056
5288
|
* @returns the red channel of the passed color
|
|
5289
|
+
* @since 1.0
|
|
5057
5290
|
*/
|
|
5058
5291
|
get_red(): number;
|
|
5059
5292
|
|
|
@@ -5061,6 +5294,7 @@ export namespace Cogl {
|
|
|
5061
5294
|
* Retrieves the red channel of `color` as a byte value
|
|
5062
5295
|
* between 0 and 255
|
|
5063
5296
|
* @returns the red channel of the passed color
|
|
5297
|
+
* @since 1.0
|
|
5064
5298
|
*/
|
|
5065
5299
|
get_red_byte(): number;
|
|
5066
5300
|
|
|
@@ -5068,6 +5302,7 @@ export namespace Cogl {
|
|
|
5068
5302
|
* Retrieves the red channel of `color` as a floating point
|
|
5069
5303
|
* value between 0.0 and 1.0
|
|
5070
5304
|
* @returns the red channel of the passed color
|
|
5305
|
+
* @since 1.0
|
|
5071
5306
|
*/
|
|
5072
5307
|
get_red_float(): number;
|
|
5073
5308
|
|
|
@@ -5077,12 +5312,14 @@ export namespace Cogl {
|
|
|
5077
5312
|
* @param green value of the green channel, between 0 and 1.0
|
|
5078
5313
|
* @param blue value of the blue channel, between 0 and 1.0
|
|
5079
5314
|
* @param alpha value of the alpha channel, between 0 and 1.0
|
|
5315
|
+
* @since 1.4
|
|
5080
5316
|
*/
|
|
5081
5317
|
init_from_4f(red: number, green: number, blue: number, alpha: number): void;
|
|
5082
5318
|
|
|
5083
5319
|
/**
|
|
5084
5320
|
* Sets the values of the passed channels into a {@link Cogl.Color}
|
|
5085
5321
|
* @param color_array a pointer to an array of 4 float color components
|
|
5322
|
+
* @since 1.4
|
|
5086
5323
|
*/
|
|
5087
5324
|
init_from_4fv(color_array: number): void;
|
|
5088
5325
|
|
|
@@ -5092,6 +5329,7 @@ export namespace Cogl {
|
|
|
5092
5329
|
* @param green value of the green channel, between 0 and 255
|
|
5093
5330
|
* @param blue value of the blue channel, between 0 and 255
|
|
5094
5331
|
* @param alpha value of the alpha channel, between 0 and 255
|
|
5332
|
+
* @since 1.4
|
|
5095
5333
|
*/
|
|
5096
5334
|
init_from_4ub(red: number, green: number, blue: number, alpha: number): void;
|
|
5097
5335
|
|
|
@@ -5099,78 +5337,91 @@ export namespace Cogl {
|
|
|
5099
5337
|
* Converts a non-premultiplied color to a pre-multiplied color. For
|
|
5100
5338
|
* example, semi-transparent red is (1.0, 0, 0, 0.5) when non-premultiplied
|
|
5101
5339
|
* and (0.5, 0, 0, 0.5) when premultiplied.
|
|
5340
|
+
* @since 1.0
|
|
5102
5341
|
*/
|
|
5103
5342
|
premultiply(): void;
|
|
5104
5343
|
|
|
5105
5344
|
/**
|
|
5106
5345
|
* Sets the alpha channel of `color` to `alpha`.
|
|
5107
5346
|
* @param alpha a float value between 0.0f and 1.0f
|
|
5347
|
+
* @since 1.4
|
|
5108
5348
|
*/
|
|
5109
5349
|
set_alpha(alpha: number): void;
|
|
5110
5350
|
|
|
5111
5351
|
/**
|
|
5112
5352
|
* Sets the alpha channel of `color` to `alpha`.
|
|
5113
5353
|
* @param alpha a byte value between 0 and 255
|
|
5354
|
+
* @since 1.4
|
|
5114
5355
|
*/
|
|
5115
5356
|
set_alpha_byte(alpha: number): void;
|
|
5116
5357
|
|
|
5117
5358
|
/**
|
|
5118
5359
|
* Sets the alpha channel of `color` to `alpha`.
|
|
5119
5360
|
* @param alpha a float value between 0.0f and 1.0f
|
|
5361
|
+
* @since 1.4
|
|
5120
5362
|
*/
|
|
5121
5363
|
set_alpha_float(alpha: number): void;
|
|
5122
5364
|
|
|
5123
5365
|
/**
|
|
5124
5366
|
* Sets the blue channel of `color` to `blue`.
|
|
5125
5367
|
* @param blue a float value between 0.0f and 1.0f
|
|
5368
|
+
* @since 1.4
|
|
5126
5369
|
*/
|
|
5127
5370
|
set_blue(blue: number): void;
|
|
5128
5371
|
|
|
5129
5372
|
/**
|
|
5130
5373
|
* Sets the blue channel of `color` to `blue`.
|
|
5131
5374
|
* @param blue a byte value between 0 and 255
|
|
5375
|
+
* @since 1.4
|
|
5132
5376
|
*/
|
|
5133
5377
|
set_blue_byte(blue: number): void;
|
|
5134
5378
|
|
|
5135
5379
|
/**
|
|
5136
5380
|
* Sets the blue channel of `color` to `blue`.
|
|
5137
5381
|
* @param blue a float value between 0.0f and 1.0f
|
|
5382
|
+
* @since 1.4
|
|
5138
5383
|
*/
|
|
5139
5384
|
set_blue_float(blue: number): void;
|
|
5140
5385
|
|
|
5141
5386
|
/**
|
|
5142
5387
|
* Sets the green channel of `color` to `green`.
|
|
5143
5388
|
* @param green a float value between 0.0f and 1.0f
|
|
5389
|
+
* @since 1.4
|
|
5144
5390
|
*/
|
|
5145
5391
|
set_green(green: number): void;
|
|
5146
5392
|
|
|
5147
5393
|
/**
|
|
5148
5394
|
* Sets the green channel of `color` to `green`.
|
|
5149
5395
|
* @param green a byte value between 0 and 255
|
|
5396
|
+
* @since 1.4
|
|
5150
5397
|
*/
|
|
5151
5398
|
set_green_byte(green: number): void;
|
|
5152
5399
|
|
|
5153
5400
|
/**
|
|
5154
5401
|
* Sets the green channel of `color` to `green`.
|
|
5155
5402
|
* @param green a float value between 0.0f and 1.0f
|
|
5403
|
+
* @since 1.4
|
|
5156
5404
|
*/
|
|
5157
5405
|
set_green_float(green: number): void;
|
|
5158
5406
|
|
|
5159
5407
|
/**
|
|
5160
5408
|
* Sets the red channel of `color` to `red`.
|
|
5161
5409
|
* @param red a float value between 0.0f and 1.0f
|
|
5410
|
+
* @since 1.4
|
|
5162
5411
|
*/
|
|
5163
5412
|
set_red(red: number): void;
|
|
5164
5413
|
|
|
5165
5414
|
/**
|
|
5166
5415
|
* Sets the red channel of `color` to `red`.
|
|
5167
5416
|
* @param red a byte value between 0 and 255
|
|
5417
|
+
* @since 1.4
|
|
5168
5418
|
*/
|
|
5169
5419
|
set_red_byte(red: number): void;
|
|
5170
5420
|
|
|
5171
5421
|
/**
|
|
5172
5422
|
* Sets the red channel of `color` to `red`.
|
|
5173
5423
|
* @param red a float value between 0.0f and 1.0f
|
|
5424
|
+
* @since 1.4
|
|
5174
5425
|
*/
|
|
5175
5426
|
set_red_float(red: number): void;
|
|
5176
5427
|
|
|
@@ -5179,6 +5430,7 @@ export namespace Cogl {
|
|
|
5179
5430
|
*
|
|
5180
5431
|
* The `hue` value is in the 0 .. 360 range. The `luminance` and
|
|
5181
5432
|
* `saturation` values are in the 0 .. 1 range.
|
|
5433
|
+
* @since 1.16
|
|
5182
5434
|
*/
|
|
5183
5435
|
to_hsl(): [number, number, number];
|
|
5184
5436
|
|
|
@@ -5186,6 +5438,7 @@ export namespace Cogl {
|
|
|
5186
5438
|
* Converts a pre-multiplied color to a non-premultiplied color. For
|
|
5187
5439
|
* example, semi-transparent red is (0.5, 0, 0, 0.5) when premultiplied
|
|
5188
5440
|
* and (1.0, 0, 0, 0.5) when non-premultiplied.
|
|
5441
|
+
* @since 1.4
|
|
5189
5442
|
*/
|
|
5190
5443
|
unpremultiply(): void;
|
|
5191
5444
|
}
|
|
@@ -5242,6 +5495,8 @@ export namespace Cogl {
|
|
|
5242
5495
|
* The default is {@link Cogl.MaterialAlphaFunc.ALWAYS}
|
|
5243
5496
|
* @param alpha_func A `CoglMaterialAlphaFunc` constant
|
|
5244
5497
|
* @param alpha_reference A reference point that the chosen alpha function uses to compare incoming fragments to.
|
|
5498
|
+
* @since 1.0
|
|
5499
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_alpha_test_function()` instead
|
|
5245
5500
|
*/
|
|
5246
5501
|
set_alpha_test_function(alpha_func: MaterialAlphaFunc, alpha_reference: number): void;
|
|
5247
5502
|
|
|
@@ -5316,6 +5571,9 @@ export namespace Cogl {
|
|
|
5316
5571
|
* is in premultiplied form.
|
|
5317
5572
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired blend function.
|
|
5318
5573
|
* @returns `true` if the blend string was successfully parsed, and the described blending is supported by the underlying driver/hardware. If there was an error, `false` is returned and `error` is set accordingly (if present).
|
|
5574
|
+
* @since 1.0
|
|
5575
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_blend()` instead
|
|
5576
|
+
* @throws GLib.Error
|
|
5319
5577
|
*/
|
|
5320
5578
|
set_blend(blend_string: string): boolean;
|
|
5321
5579
|
|
|
@@ -5323,6 +5581,8 @@ export namespace Cogl {
|
|
|
5323
5581
|
* When blending is setup to reference a CONSTANT blend factor then
|
|
5324
5582
|
* blending will depend on the constant set with this function.
|
|
5325
5583
|
* @param constant_color The constant color you want
|
|
5584
|
+
* @since 1.0
|
|
5585
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_blend_constant()` instead
|
|
5326
5586
|
*/
|
|
5327
5587
|
set_blend_constant(constant_color: Color): void;
|
|
5328
5588
|
|
|
@@ -5336,6 +5596,8 @@ export namespace Cogl {
|
|
|
5336
5596
|
*
|
|
5337
5597
|
* The default value is (1.0, 1.0, 1.0, 1.0)
|
|
5338
5598
|
* @param color The components of the color
|
|
5599
|
+
* @since 1.0
|
|
5600
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_color()` instead
|
|
5339
5601
|
*/
|
|
5340
5602
|
set_color(color: Color): void;
|
|
5341
5603
|
|
|
@@ -5347,6 +5609,8 @@ export namespace Cogl {
|
|
|
5347
5609
|
* @param green The green component
|
|
5348
5610
|
* @param blue The blue component
|
|
5349
5611
|
* @param alpha The alpha component
|
|
5612
|
+
* @since 1.0
|
|
5613
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_color4ub()` instead
|
|
5350
5614
|
*/
|
|
5351
5615
|
set_color4ub(red: number, green: number, blue: number, alpha: number): void;
|
|
5352
5616
|
|
|
@@ -5363,6 +5627,8 @@ export namespace Cogl {
|
|
|
5363
5627
|
* as purely GLSL based layers.</note>
|
|
5364
5628
|
* @param layer_index the index of the layer
|
|
5365
5629
|
* @param texture a {@link Cogl.Handle} for the layer object
|
|
5630
|
+
* @since 1.0
|
|
5631
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer()` instead
|
|
5366
5632
|
*/
|
|
5367
5633
|
set_layer(layer_index: number, texture: Handle): void;
|
|
5368
5634
|
|
|
@@ -5445,6 +5711,9 @@ export namespace Cogl {
|
|
|
5445
5711
|
* @param layer_index Specifies the layer you want define a combine function for
|
|
5446
5712
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired texture combine function.
|
|
5447
5713
|
* @returns `true` if the blend string was successfully parsed, and the described texture combining is supported by the underlying driver and or hardware. On failure, `false` is returned and `error` is set
|
|
5714
|
+
* @since 1.0
|
|
5715
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_combine()` instead
|
|
5716
|
+
* @throws GLib.Error
|
|
5448
5717
|
*/
|
|
5449
5718
|
set_layer_combine(layer_index: number, blend_string: string): boolean;
|
|
5450
5719
|
|
|
@@ -5453,6 +5722,8 @@ export namespace Cogl {
|
|
|
5453
5722
|
* description then you can use this function to define its value.
|
|
5454
5723
|
* @param layer_index Specifies the layer you want to specify a constant used for texture combining
|
|
5455
5724
|
* @param constant The constant color you want
|
|
5725
|
+
* @since 1.0
|
|
5726
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_combine_constant()` instead
|
|
5456
5727
|
*/
|
|
5457
5728
|
set_layer_combine_constant(layer_index: number, constant: Color): void;
|
|
5458
5729
|
|
|
@@ -5462,6 +5733,7 @@ export namespace Cogl {
|
|
|
5462
5733
|
* @param layer_index the layer number to change.
|
|
5463
5734
|
* @param min_filter the filter used when scaling a texture down.
|
|
5464
5735
|
* @param mag_filter the filter used when magnifying a texture.
|
|
5736
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_filters()` instead
|
|
5465
5737
|
*/
|
|
5466
5738
|
set_layer_filters(layer_index: number, min_filter: MaterialFilter, mag_filter: MaterialFilter): void;
|
|
5467
5739
|
|
|
@@ -5470,6 +5742,7 @@ export namespace Cogl {
|
|
|
5470
5742
|
* and rotate a single layer of a material used to fill your geometry.
|
|
5471
5743
|
* @param layer_index the index for the layer inside `material`
|
|
5472
5744
|
* @param matrix the transformation matrix for the layer
|
|
5745
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_matrix()` instead
|
|
5473
5746
|
*/
|
|
5474
5747
|
set_layer_matrix(layer_index: number, matrix: Matrix): void;
|
|
5475
5748
|
|
|
@@ -5483,6 +5756,9 @@ export namespace Cogl {
|
|
|
5483
5756
|
* @param layer_index the layer number to change.
|
|
5484
5757
|
* @param enable whether to enable point sprite coord generation.
|
|
5485
5758
|
* @returns `true` if the function succeeds, `false` otherwise.
|
|
5759
|
+
* @since 1.4
|
|
5760
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_point_sprite_coords_enabled()` instead
|
|
5761
|
+
* @throws GLib.Error
|
|
5486
5762
|
*/
|
|
5487
5763
|
set_layer_point_sprite_coords_enabled(layer_index: number, enable: boolean): boolean;
|
|
5488
5764
|
|
|
@@ -5495,6 +5771,8 @@ export namespace Cogl {
|
|
|
5495
5771
|
* screen space so it will be the same regardless of any
|
|
5496
5772
|
* transformations. The default point size is 1.0.
|
|
5497
5773
|
* @param point_size the new point size.
|
|
5774
|
+
* @since 1.4
|
|
5775
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_point_size()` instead
|
|
5498
5776
|
*/
|
|
5499
5777
|
set_point_size(point_size: number): void;
|
|
5500
5778
|
|
|
@@ -5535,6 +5813,8 @@ export namespace Cogl {
|
|
|
5535
5813
|
* meantime we hope this will handle most practical GLSL and ARBfp
|
|
5536
5814
|
* requirements.
|
|
5537
5815
|
* @param program A {@link Cogl.Handle} to a linked CoglProgram
|
|
5816
|
+
* @since 1.4
|
|
5817
|
+
* @deprecated since 1.16: Use `CoglSnippet` api instead instead
|
|
5538
5818
|
*/
|
|
5539
5819
|
set_user_program(program: Handle): void;
|
|
5540
5820
|
}
|
|
@@ -5621,6 +5901,7 @@ export namespace Cogl {
|
|
|
5621
5901
|
* inverse matrix these are not considered in the comparison.
|
|
5622
5902
|
* @param v1 A 4x4 transformation matrix
|
|
5623
5903
|
* @param v2 A 4x4 transformation matrix
|
|
5904
|
+
* @since 1.4
|
|
5624
5905
|
*/
|
|
5625
5906
|
static equal(v1: null, v2: null): boolean;
|
|
5626
5907
|
|
|
@@ -5629,12 +5910,14 @@ export namespace Cogl {
|
|
|
5629
5910
|
* Allocates a new {@link Cogl.Matrix} on the heap and initializes it with
|
|
5630
5911
|
* the same values as `matrix`.
|
|
5631
5912
|
* @returns A newly allocated {@link Cogl.Matrix} which should be freed using `cogl_matrix_free()`
|
|
5913
|
+
* @since 1.6
|
|
5632
5914
|
*/
|
|
5633
5915
|
copy(): Matrix;
|
|
5634
5916
|
|
|
5635
5917
|
/**
|
|
5636
5918
|
* Frees a {@link Cogl.Matrix} that was previously allocated via a call to
|
|
5637
5919
|
* `cogl_matrix_copy()`.
|
|
5920
|
+
* @since 1.6
|
|
5638
5921
|
*/
|
|
5639
5922
|
free(): void;
|
|
5640
5923
|
|
|
@@ -5665,6 +5948,7 @@ export namespace Cogl {
|
|
|
5665
5948
|
* {@link Cogl.Matrix} so that subsequent requests for the inverse transform may
|
|
5666
5949
|
* avoid costly inversion calculations.</note>
|
|
5667
5950
|
* @returns `true` if the inverse was successfully calculated or `false` for degenerate transformations that can't be inverted (in this case the `inverse` matrix will simply be initialized with the identity matrix)
|
|
5951
|
+
* @since 1.2
|
|
5668
5952
|
*/
|
|
5669
5953
|
get_inverse(): [boolean, Matrix];
|
|
5670
5954
|
|
|
@@ -5708,12 +5992,14 @@ export namespace Cogl {
|
|
|
5708
5992
|
* @param tx x coordinate of the translation vector
|
|
5709
5993
|
* @param ty y coordinate of the translation vector
|
|
5710
5994
|
* @param tz z coordinate of the translation vector
|
|
5995
|
+
* @since 2.0
|
|
5711
5996
|
*/
|
|
5712
5997
|
init_translation(tx: number, ty: number, tz: number): void;
|
|
5713
5998
|
|
|
5714
5999
|
/**
|
|
5715
6000
|
* Determines if the given matrix is an identity matrix.
|
|
5716
6001
|
* @returns `true` if `matrix` is an identity matrix else `false`
|
|
6002
|
+
* @since 1.8
|
|
5717
6003
|
*/
|
|
5718
6004
|
is_identity(): boolean;
|
|
5719
6005
|
|
|
@@ -5753,6 +6039,7 @@ export namespace Cogl {
|
|
|
5753
6039
|
* @param world_up_x The X component of the world's up direction vector
|
|
5754
6040
|
* @param world_up_y The Y component of the world's up direction vector
|
|
5755
6041
|
* @param world_up_z The Z component of the world's up direction vector
|
|
6042
|
+
* @since 1.8
|
|
5756
6043
|
*/
|
|
5757
6044
|
look_at(eye_position_x: number, eye_position_y: number, eye_position_z: number, object_x: number, object_y: number, object_z: number, world_up_x: number, world_up_y: number, world_up_z: number): void;
|
|
5758
6045
|
|
|
@@ -5775,6 +6062,7 @@ export namespace Cogl {
|
|
|
5775
6062
|
* @param y_2 The y coordinate for the second horizontal clipping plane
|
|
5776
6063
|
* @param near The <emphasis>distance</emphasis> to the near clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
5777
6064
|
* @param far The <emphasis>distance</emphasis> to the far clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
6065
|
+
* @since 1.10
|
|
5778
6066
|
*/
|
|
5779
6067
|
orthographic(x_1: number, y_1: number, x_2: number, y_2: number, near: number, far: number): void;
|
|
5780
6068
|
|
|
@@ -5850,6 +6138,7 @@ export namespace Cogl {
|
|
|
5850
6138
|
* Multiplies `matrix` with a rotation transformation described by the
|
|
5851
6139
|
* given {@link Graphene.Euler}.
|
|
5852
6140
|
* @param euler A euler describing a rotation
|
|
6141
|
+
* @since 2.0
|
|
5853
6142
|
*/
|
|
5854
6143
|
rotate_euler(euler: Graphene.Euler): void;
|
|
5855
6144
|
|
|
@@ -5931,6 +6220,7 @@ export namespace Cogl {
|
|
|
5931
6220
|
/**
|
|
5932
6221
|
* Replaces `matrix` with its transpose. Ie, every element (i,j) in the
|
|
5933
6222
|
* new matrix is taken from element (j,i) in the old matrix.
|
|
6223
|
+
* @since 1.10
|
|
5934
6224
|
*/
|
|
5935
6225
|
transpose(): void;
|
|
5936
6226
|
|
|
@@ -5954,6 +6244,7 @@ export namespace Cogl {
|
|
|
5954
6244
|
* @param z_2d The distance to the 2D plane. (Should always be positive and be between `z_near` and the z_far value that was passed to `cogl_matrix_frustum()`)
|
|
5955
6245
|
* @param width_2d The width of the 2D coordinate system
|
|
5956
6246
|
* @param height_2d The height of the 2D coordinate system
|
|
6247
|
+
* @since 1.8
|
|
5957
6248
|
*/
|
|
5958
6249
|
view_2d_in_frustum(left: number, right: number, bottom: number, top: number, z_near: number, z_2d: number, width_2d: number, height_2d: number): void;
|
|
5959
6250
|
|
|
@@ -5975,6 +6266,7 @@ export namespace Cogl {
|
|
|
5975
6266
|
* @param z_2d The distance to the 2D plane. (Should always be positive and be between `z_near` and the z_far value that was passed to `cogl_matrix_frustum()`)
|
|
5976
6267
|
* @param width_2d The width of the 2D coordinate system
|
|
5977
6268
|
* @param height_2d The height of the 2D coordinate system
|
|
6269
|
+
* @since 1.8
|
|
5978
6270
|
*/
|
|
5979
6271
|
view_2d_in_perspective(fov_y: number, aspect: number, z_near: number, z_2d: number, width_2d: number, height_2d: number): void;
|
|
5980
6272
|
}
|
|
@@ -6197,6 +6489,8 @@ export namespace Cogl {
|
|
|
6197
6489
|
* program will abort with an error message if there is an error during
|
|
6198
6490
|
* automatic allocation.</note>
|
|
6199
6491
|
* @returns `true` if there were no error allocating the framebuffer, else `false`.
|
|
6492
|
+
* @since 1.8
|
|
6493
|
+
* @throws GLib.Error
|
|
6200
6494
|
*/
|
|
6201
6495
|
allocate(): boolean;
|
|
6202
6496
|
|
|
@@ -6205,6 +6499,7 @@ export namespace Cogl {
|
|
|
6205
6499
|
* that includes the color buffer then the specified `color` is used.
|
|
6206
6500
|
* @param buffers A mask of {@link Cogl.BufferBit}<!-- -->'s identifying which auxiliary buffers to clear
|
|
6207
6501
|
* @param color The color to clear the color buffer too if specified in `buffers`.
|
|
6502
|
+
* @since 1.8
|
|
6208
6503
|
*/
|
|
6209
6504
|
clear(buffers: bigint | number, color: Color): void;
|
|
6210
6505
|
|
|
@@ -6216,6 +6511,7 @@ export namespace Cogl {
|
|
|
6216
6511
|
* @param green The green component of color to clear the color buffer too if specified in `buffers`.
|
|
6217
6512
|
* @param blue The blue component of color to clear the color buffer too if specified in `buffers`.
|
|
6218
6513
|
* @param alpha The alpha component of color to clear the color buffer too if specified in `buffers`.
|
|
6514
|
+
* @since 1.8
|
|
6219
6515
|
*/
|
|
6220
6516
|
clear4f(buffers: bigint | number, red: number, green: number, blue: number, alpha: number): void;
|
|
6221
6517
|
|
|
@@ -6237,6 +6533,7 @@ export namespace Cogl {
|
|
|
6237
6533
|
* framebuffer, and it's not meaningful to try and discard the color buffer of
|
|
6238
6534
|
* a {@link Cogl.Offscreen} framebuffer since they are single-buffered.
|
|
6239
6535
|
* @param buffers A {@link Cogl.BufferBit} mask of which ancillary buffers you want to discard.
|
|
6536
|
+
* @since 1.8
|
|
6240
6537
|
*/
|
|
6241
6538
|
discard_buffers(buffers: bigint | number): void;
|
|
6242
6539
|
|
|
@@ -6286,6 +6583,7 @@ export namespace Cogl {
|
|
|
6286
6583
|
* @param y_2 y coordinate lower right on screen.
|
|
6287
6584
|
* @param tex_coords An array containing groups of 4 float values: [s_1, t_1, s_2, t_2] that are interpreted as two texture coordinates; one for the top left texel, and one for the bottom right texel. Each value should be between 0.0 and 1.0, where the coordinate (0.0, 0.0) represents the top left of the texture, and (1.0, 1.0) the bottom right.
|
|
6288
6585
|
* @param tex_coords_len The length of the `tex_coords` array. (For one layer and one group of texture coordinates, this would be 4)
|
|
6586
|
+
* @since 1.10
|
|
6289
6587
|
*/
|
|
6290
6588
|
draw_multitextured_rectangle(pipeline: Pipeline, x_1: number, y_1: number, x_2: number, y_2: number, tex_coords: number[], tex_coords_len: number): void;
|
|
6291
6589
|
|
|
@@ -6306,6 +6604,7 @@ export namespace Cogl {
|
|
|
6306
6604
|
* @param y_1 Y coordinate of the top-left corner
|
|
6307
6605
|
* @param x_2 X coordinate of the bottom-right corner
|
|
6308
6606
|
* @param y_2 Y coordinate of the bottom-right corner
|
|
6607
|
+
* @since 1.10
|
|
6309
6608
|
*/
|
|
6310
6609
|
draw_rectangle(pipeline: Pipeline, x_1: number, y_1: number, x_2: number, y_2: number): void;
|
|
6311
6610
|
|
|
@@ -6332,6 +6631,7 @@ export namespace Cogl {
|
|
|
6332
6631
|
* @param pipeline A {@link Cogl.Pipeline} state object
|
|
6333
6632
|
* @param coordinates an array of coordinates containing groups of 4 float values: [x_1, y_1, x_2, y_2] that are interpreted as two position coordinates; one for the top left of the rectangle (x1, y1), and one for the bottom right of the rectangle (x2, y2).
|
|
6334
6633
|
* @param n_rectangles number of rectangles defined in `coordinates`.
|
|
6634
|
+
* @since 1.10
|
|
6335
6635
|
*/
|
|
6336
6636
|
draw_rectangles(pipeline: Pipeline, coordinates: number[], n_rectangles: number): void;
|
|
6337
6637
|
|
|
@@ -6371,6 +6671,7 @@ export namespace Cogl {
|
|
|
6371
6671
|
* @param t_1 T texture coordinate of the top-left coorner
|
|
6372
6672
|
* @param s_2 S texture coordinate of the bottom-right coorner
|
|
6373
6673
|
* @param t_2 T texture coordinate of the bottom-right coorner
|
|
6674
|
+
* @since 1.10
|
|
6374
6675
|
*/
|
|
6375
6676
|
draw_textured_rectangle(pipeline: Pipeline, x_1: number, y_1: number, x_2: number, y_2: number, s_1: number, t_1: number, s_2: number, t_2: number): void;
|
|
6376
6677
|
|
|
@@ -6412,6 +6713,7 @@ export namespace Cogl {
|
|
|
6412
6713
|
* @param pipeline A {@link Cogl.Pipeline} state object
|
|
6413
6714
|
* @param coordinates an array containing groups of 8 float values: [x_1, y_1, x_2, y_2, s_1, t_1, s_2, t_2] that have the same meaning as the arguments for `cogl_framebuffer_draw_textured_rectangle()`.
|
|
6414
6715
|
* @param n_rectangles number of rectangles to `coordinates` to draw
|
|
6716
|
+
* @since 1.10
|
|
6415
6717
|
*/
|
|
6416
6718
|
draw_textured_rectangles(pipeline: Pipeline, coordinates: number[], n_rectangles: number): void;
|
|
6417
6719
|
|
|
@@ -6425,6 +6727,7 @@ export namespace Cogl {
|
|
|
6425
6727
|
* One example might be for benchmarking purposes to be sure timing
|
|
6426
6728
|
* measurements reflect the time that the GPU is busy for not just the time it
|
|
6427
6729
|
* takes to queue rendering commands.
|
|
6730
|
+
* @since 1.10
|
|
6428
6731
|
*/
|
|
6429
6732
|
finish(): void;
|
|
6430
6733
|
|
|
@@ -6446,18 +6749,21 @@ export namespace Cogl {
|
|
|
6446
6749
|
* @param top Y position of the top clipping plane where it intersects the near clipping plane
|
|
6447
6750
|
* @param z_near The distance to the near clipping plane (Must be positive)
|
|
6448
6751
|
* @param z_far The distance to the far clipping plane (Must be positive)
|
|
6752
|
+
* @since 1.10
|
|
6449
6753
|
*/
|
|
6450
6754
|
frustum(left: number, right: number, bottom: number, top: number, z_near: number, z_far: number): void;
|
|
6451
6755
|
|
|
6452
6756
|
/**
|
|
6453
6757
|
* Retrieves the number of alpha bits of `framebuffer`
|
|
6454
6758
|
* @returns the number of bits
|
|
6759
|
+
* @since 1.8
|
|
6455
6760
|
*/
|
|
6456
6761
|
get_alpha_bits(): number;
|
|
6457
6762
|
|
|
6458
6763
|
/**
|
|
6459
6764
|
* Retrieves the number of blue bits of `framebuffer`
|
|
6460
6765
|
* @returns the number of bits
|
|
6766
|
+
* @since 1.8
|
|
6461
6767
|
*/
|
|
6462
6768
|
get_blue_bits(): number;
|
|
6463
6769
|
|
|
@@ -6466,12 +6772,14 @@ export namespace Cogl {
|
|
|
6466
6772
|
* instantiated within. This is the {@link Cogl.Context} that was passed to
|
|
6467
6773
|
* `cogl_onscreen_new()` for example.
|
|
6468
6774
|
* @returns The {@link Cogl.Context} that the given `framebuffer` was instantiated within.
|
|
6775
|
+
* @since 1.8
|
|
6469
6776
|
*/
|
|
6470
6777
|
get_context(): Context;
|
|
6471
6778
|
|
|
6472
6779
|
/**
|
|
6473
6780
|
* Retrieves the number of depth bits of `framebuffer`
|
|
6474
6781
|
* @returns the number of bits
|
|
6782
|
+
* @since 2.0
|
|
6475
6783
|
*/
|
|
6476
6784
|
get_depth_bits(): number;
|
|
6477
6785
|
|
|
@@ -6479,6 +6787,7 @@ export namespace Cogl {
|
|
|
6479
6787
|
* Queries whether depth buffer writing is enabled for `framebuffer`. This
|
|
6480
6788
|
* can be controlled via `cogl_framebuffer_set_depth_write_enabled()`.
|
|
6481
6789
|
* @returns `true` if depth writing is enabled or `false` if not.
|
|
6790
|
+
* @since 1.18
|
|
6482
6791
|
*/
|
|
6483
6792
|
get_depth_write_enabled(): boolean;
|
|
6484
6793
|
|
|
@@ -6490,18 +6799,21 @@ export namespace Cogl {
|
|
|
6490
6799
|
* display pipeline does not support dithering. This value only represents
|
|
6491
6800
|
* the user's request for dithering.</note>
|
|
6492
6801
|
* @returns `true` if dithering has been requested or `false` if not.
|
|
6802
|
+
* @since 1.8
|
|
6493
6803
|
*/
|
|
6494
6804
|
get_dither_enabled(): boolean;
|
|
6495
6805
|
|
|
6496
6806
|
/**
|
|
6497
6807
|
* Retrieves the number of green bits of `framebuffer`
|
|
6498
6808
|
* @returns the number of bits
|
|
6809
|
+
* @since 1.8
|
|
6499
6810
|
*/
|
|
6500
6811
|
get_green_bits(): number;
|
|
6501
6812
|
|
|
6502
6813
|
/**
|
|
6503
6814
|
* Queries the current height of the given `framebuffer`.
|
|
6504
6815
|
* @returns The height of `framebuffer`.
|
|
6816
|
+
* @since 1.8
|
|
6505
6817
|
*/
|
|
6506
6818
|
get_height(): number;
|
|
6507
6819
|
|
|
@@ -6509,17 +6821,20 @@ export namespace Cogl {
|
|
|
6509
6821
|
|
|
6510
6822
|
/**
|
|
6511
6823
|
* Stores the current model-view matrix in `matrix`.
|
|
6824
|
+
* @since 1.10
|
|
6512
6825
|
*/
|
|
6513
6826
|
get_modelview_matrix(): Matrix;
|
|
6514
6827
|
|
|
6515
6828
|
/**
|
|
6516
6829
|
* Stores the current projection matrix in `matrix`.
|
|
6830
|
+
* @since 1.10
|
|
6517
6831
|
*/
|
|
6518
6832
|
get_projection_matrix(): Matrix;
|
|
6519
6833
|
|
|
6520
6834
|
/**
|
|
6521
6835
|
* Retrieves the number of red bits of `framebuffer`
|
|
6522
6836
|
* @returns the number of bits
|
|
6837
|
+
* @since 1.8
|
|
6523
6838
|
*/
|
|
6524
6839
|
get_red_bits(): number;
|
|
6525
6840
|
|
|
@@ -6537,6 +6852,7 @@ export namespace Cogl {
|
|
|
6537
6852
|
* framebuffer has been allocated the value will reflect the actual
|
|
6538
6853
|
* number of samples that will be made by the GPU.
|
|
6539
6854
|
* @returns The number of point samples made per pixel when rasterizing geometry or 0 if single-sample rendering has been chosen.
|
|
6855
|
+
* @since 1.10
|
|
6540
6856
|
*/
|
|
6541
6857
|
get_samples_per_pixel(): number;
|
|
6542
6858
|
|
|
@@ -6544,6 +6860,7 @@ export namespace Cogl {
|
|
|
6544
6860
|
* Gets the current {@link Cogl.StereoMode}, which defines which stereo buffers
|
|
6545
6861
|
* should be drawn to. See `cogl_framebuffer_set_stereo_mode()`.
|
|
6546
6862
|
* @returns A {@link Cogl.StereoMode}
|
|
6863
|
+
* @since 1.20
|
|
6547
6864
|
*/
|
|
6548
6865
|
get_stereo_mode(): StereoMode;
|
|
6549
6866
|
|
|
@@ -6552,6 +6869,7 @@ export namespace Cogl {
|
|
|
6552
6869
|
* using `cogl_framebuffer_set_viewport()` or the default values which are 0, 0,
|
|
6553
6870
|
* framebuffer_width and framebuffer_height. The values are written into the
|
|
6554
6871
|
* given `viewport` array.
|
|
6872
|
+
* @since 1.8
|
|
6555
6873
|
*/
|
|
6556
6874
|
get_viewport4fv(): number[];
|
|
6557
6875
|
|
|
@@ -6559,6 +6877,7 @@ export namespace Cogl {
|
|
|
6559
6877
|
* Queries the height of the viewport as set using `cogl_framebuffer_set_viewport()`
|
|
6560
6878
|
* or the default value which is the height of the framebuffer.
|
|
6561
6879
|
* @returns The height of the viewport.
|
|
6880
|
+
* @since 1.8
|
|
6562
6881
|
*/
|
|
6563
6882
|
get_viewport_height(): number;
|
|
6564
6883
|
|
|
@@ -6566,6 +6885,7 @@ export namespace Cogl {
|
|
|
6566
6885
|
* Queries the width of the viewport as set using `cogl_framebuffer_set_viewport()`
|
|
6567
6886
|
* or the default value which is the width of the framebuffer.
|
|
6568
6887
|
* @returns The width of the viewport.
|
|
6888
|
+
* @since 1.8
|
|
6569
6889
|
*/
|
|
6570
6890
|
get_viewport_width(): number;
|
|
6571
6891
|
|
|
@@ -6573,6 +6893,7 @@ export namespace Cogl {
|
|
|
6573
6893
|
* Queries the x coordinate of the viewport origin as set using `cogl_framebuffer_set_viewport()`
|
|
6574
6894
|
* or the default value which is 0.
|
|
6575
6895
|
* @returns The x coordinate of the viewport origin.
|
|
6896
|
+
* @since 1.8
|
|
6576
6897
|
*/
|
|
6577
6898
|
get_viewport_x(): number;
|
|
6578
6899
|
|
|
@@ -6580,17 +6901,20 @@ export namespace Cogl {
|
|
|
6580
6901
|
* Queries the y coordinate of the viewport origin as set using `cogl_framebuffer_set_viewport()`
|
|
6581
6902
|
* or the default value which is 0.
|
|
6582
6903
|
* @returns The y coordinate of the viewport origin.
|
|
6904
|
+
* @since 1.8
|
|
6583
6905
|
*/
|
|
6584
6906
|
get_viewport_y(): number;
|
|
6585
6907
|
|
|
6586
6908
|
/**
|
|
6587
6909
|
* Queries the current width of the given `framebuffer`.
|
|
6588
6910
|
* @returns The width of `framebuffer`.
|
|
6911
|
+
* @since 1.8
|
|
6589
6912
|
*/
|
|
6590
6913
|
get_width(): number;
|
|
6591
6914
|
|
|
6592
6915
|
/**
|
|
6593
6916
|
* Resets the current model-view matrix to the identity matrix.
|
|
6917
|
+
* @since 1.10
|
|
6594
6918
|
*/
|
|
6595
6919
|
identity_matrix(): void;
|
|
6596
6920
|
|
|
@@ -6603,6 +6927,7 @@ export namespace Cogl {
|
|
|
6603
6927
|
* @param y_2 The y coordinate for the second horizontal clipping plane
|
|
6604
6928
|
* @param near The <emphasis>distance</emphasis> to the near clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
6605
6929
|
* @param far The <emphasis>distance</emphasis> to the far clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
6930
|
+
* @since 1.10
|
|
6606
6931
|
*/
|
|
6607
6932
|
orthographic(x_1: number, y_1: number, x_2: number, y_2: number, near: number, far: number): void;
|
|
6608
6933
|
|
|
@@ -6618,6 +6943,7 @@ export namespace Cogl {
|
|
|
6618
6943
|
* @param aspect The (width over height) aspect ratio for display
|
|
6619
6944
|
* @param z_near The distance to the near clipping plane (Must be positive, and must not be 0)
|
|
6620
6945
|
* @param z_far The distance to the far clipping plane (Must be positive)
|
|
6946
|
+
* @since 1.10
|
|
6621
6947
|
*/
|
|
6622
6948
|
perspective(fov_y: number, aspect: number, z_near: number, z_far: number): void;
|
|
6623
6949
|
|
|
@@ -6625,17 +6951,20 @@ export namespace Cogl {
|
|
|
6625
6951
|
* Reverts the clipping region to the state before the last call to
|
|
6626
6952
|
* `cogl_framebuffer_push_scissor_clip()`, `cogl_framebuffer_push_rectangle_clip()`
|
|
6627
6953
|
* `cogl_framebuffer_push_path_clip()`, or `cogl_framebuffer_push_primitive_clip()`.
|
|
6954
|
+
* @since 1.10
|
|
6628
6955
|
*/
|
|
6629
6956
|
pop_clip(): void;
|
|
6630
6957
|
|
|
6631
6958
|
/**
|
|
6632
6959
|
* Restores the model-view matrix on the top of the matrix stack.
|
|
6960
|
+
* @since 1.10
|
|
6633
6961
|
*/
|
|
6634
6962
|
pop_matrix(): void;
|
|
6635
6963
|
|
|
6636
6964
|
/**
|
|
6637
6965
|
* Copies the current model-view matrix onto the matrix stack. The matrix
|
|
6638
6966
|
* can later be restored with `cogl_framebuffer_pop_matrix()`.
|
|
6967
|
+
* @since 1.10
|
|
6639
6968
|
*/
|
|
6640
6969
|
push_matrix(): void;
|
|
6641
6970
|
|
|
@@ -6652,6 +6981,7 @@ export namespace Cogl {
|
|
|
6652
6981
|
* @param y_1 y coordinate for top left corner of the clip rectangle
|
|
6653
6982
|
* @param x_2 x coordinate for bottom right corner of the clip rectangle
|
|
6654
6983
|
* @param y_2 y coordinate for bottom right corner of the clip rectangle
|
|
6984
|
+
* @since 1.10
|
|
6655
6985
|
*/
|
|
6656
6986
|
push_rectangle_clip(x_1: number, y_1: number, x_2: number, y_2: number): void;
|
|
6657
6987
|
|
|
@@ -6673,6 +7003,7 @@ export namespace Cogl {
|
|
|
6673
7003
|
* @param y top edge of the clip rectangle in window coordinates
|
|
6674
7004
|
* @param width width of the clip rectangle
|
|
6675
7005
|
* @param height height of the clip rectangle
|
|
7006
|
+
* @since 1.10
|
|
6676
7007
|
*/
|
|
6677
7008
|
push_scissor_clip(x: number, y: number, width: number, height: number): void;
|
|
6678
7009
|
|
|
@@ -6710,6 +7041,7 @@ export namespace Cogl {
|
|
|
6710
7041
|
* @param format The pixel format to store the data in
|
|
6711
7042
|
* @param pixels The address of the buffer to store the data in
|
|
6712
7043
|
* @returns `true` if the read succeeded or `false` otherwise.
|
|
7044
|
+
* @since 1.10
|
|
6713
7045
|
*/
|
|
6714
7046
|
read_pixels(x: number, y: number, width: number, height: number, format: PixelFormat, pixels: number): boolean;
|
|
6715
7047
|
|
|
@@ -6729,6 +7061,7 @@ export namespace Cogl {
|
|
|
6729
7061
|
* @param source Identifies which auxillary buffer you want to read (only COGL_READ_PIXELS_COLOR_BUFFER supported currently)
|
|
6730
7062
|
* @param bitmap The bitmap to store the results in.
|
|
6731
7063
|
* @returns `true` if the read succeeded or `false` otherwise. The function is only likely to fail if the bitmap points to a pixel buffer and it could not be mapped.
|
|
7064
|
+
* @since 1.10
|
|
6732
7065
|
*/
|
|
6733
7066
|
read_pixels_into_bitmap(x: number, y: number, source: ReadPixelsFlags, bitmap: Bitmap): boolean;
|
|
6734
7067
|
|
|
@@ -6753,6 +7086,7 @@ export namespace Cogl {
|
|
|
6753
7086
|
* If you are performing incremental updates to a framebuffer you
|
|
6754
7087
|
* should consider using `cogl_framebuffer_resolve_samples_region()`
|
|
6755
7088
|
* instead to avoid resolving redundant pixels.
|
|
7089
|
+
* @since 1.8
|
|
6756
7090
|
*/
|
|
6757
7091
|
resolve_samples(): void;
|
|
6758
7092
|
|
|
@@ -6782,6 +7116,7 @@ export namespace Cogl {
|
|
|
6782
7116
|
* @param y top-left y coordinate of region to resolve
|
|
6783
7117
|
* @param width width of region to resolve
|
|
6784
7118
|
* @param height height of region to resolve
|
|
7119
|
+
* @since 1.8
|
|
6785
7120
|
*/
|
|
6786
7121
|
resolve_samples_region(x: number, y: number, width: number, height: number): void;
|
|
6787
7122
|
|
|
@@ -6795,6 +7130,7 @@ export namespace Cogl {
|
|
|
6795
7130
|
* @param x X-component of vertex to rotate around.
|
|
6796
7131
|
* @param y Y-component of vertex to rotate around.
|
|
6797
7132
|
* @param z Z-component of vertex to rotate around.
|
|
7133
|
+
* @since 1.10
|
|
6798
7134
|
*/
|
|
6799
7135
|
rotate(angle: number, x: number, y: number, z: number): void;
|
|
6800
7136
|
|
|
@@ -6802,6 +7138,7 @@ export namespace Cogl {
|
|
|
6802
7138
|
* Multiplies the current model-view matrix by one that rotates
|
|
6803
7139
|
* according to the rotation described by `euler`.
|
|
6804
7140
|
* @param euler A {@link Graphene.Euler}
|
|
7141
|
+
* @since 2.0
|
|
6805
7142
|
*/
|
|
6806
7143
|
rotate_euler(euler: Graphene.Euler): void;
|
|
6807
7144
|
|
|
@@ -6811,6 +7148,7 @@ export namespace Cogl {
|
|
|
6811
7148
|
* @param x Amount to scale along the x-axis
|
|
6812
7149
|
* @param y Amount to scale along the y-axis
|
|
6813
7150
|
* @param z Amount to scale along the z-axis
|
|
7151
|
+
* @since 1.10
|
|
6814
7152
|
*/
|
|
6815
7153
|
scale(x: number, y: number, z: number): void;
|
|
6816
7154
|
|
|
@@ -6822,6 +7160,7 @@ export namespace Cogl {
|
|
|
6822
7160
|
*
|
|
6823
7161
|
* Depth buffer writing is enabled by default.
|
|
6824
7162
|
* @param depth_write_enabled `true` to enable depth writing or `false` to disable
|
|
7163
|
+
* @since 1.18
|
|
6825
7164
|
*/
|
|
6826
7165
|
set_depth_write_enabled(depth_write_enabled: boolean): void;
|
|
6827
7166
|
|
|
@@ -6840,18 +7179,21 @@ export namespace Cogl {
|
|
|
6840
7179
|
*
|
|
6841
7180
|
* Dithering is enabled by default.
|
|
6842
7181
|
* @param dither_enabled `true` to enable dithering or `false` to disable
|
|
7182
|
+
* @since 1.8
|
|
6843
7183
|
*/
|
|
6844
7184
|
set_dither_enabled(dither_enabled: boolean): void;
|
|
6845
7185
|
|
|
6846
7186
|
/**
|
|
6847
7187
|
* Sets `matrix` as the new model-view matrix.
|
|
6848
7188
|
* @param matrix the new model-view matrix
|
|
7189
|
+
* @since 1.10
|
|
6849
7190
|
*/
|
|
6850
7191
|
set_modelview_matrix(matrix: Matrix): void;
|
|
6851
7192
|
|
|
6852
7193
|
/**
|
|
6853
7194
|
* Sets `matrix` as the new projection matrix.
|
|
6854
7195
|
* @param matrix the new projection matrix
|
|
7196
|
+
* @since 1.10
|
|
6855
7197
|
*/
|
|
6856
7198
|
set_projection_matrix(matrix: Matrix): void;
|
|
6857
7199
|
|
|
@@ -6889,6 +7231,7 @@ export namespace Cogl {
|
|
|
6889
7231
|
* framebuffer has changed this can lead to redundant work being
|
|
6890
7232
|
* done.</note>
|
|
6891
7233
|
* @param samples_per_pixel The minimum number of samples per pixel
|
|
7234
|
+
* @since 1.8
|
|
6892
7235
|
*/
|
|
6893
7236
|
set_samples_per_pixel(samples_per_pixel: number): void;
|
|
6894
7237
|
|
|
@@ -6901,6 +7244,7 @@ export namespace Cogl {
|
|
|
6901
7244
|
* enabled. (See `cogl_onscreen_template_set_stereo_enabled()`,
|
|
6902
7245
|
* `cogl_framebuffer_get_is_stereo()`.)
|
|
6903
7246
|
* @param stereo_mode A {@link Cogl.StereoMode} specifying which stereo buffers should be drawn tow.
|
|
7247
|
+
* @since 1.20
|
|
6904
7248
|
*/
|
|
6905
7249
|
set_stereo_mode(stereo_mode: StereoMode): void;
|
|
6906
7250
|
|
|
@@ -6924,12 +7268,14 @@ export namespace Cogl {
|
|
|
6924
7268
|
* @param y The top-left y coordinate of the viewport origin (only integers supported currently)
|
|
6925
7269
|
* @param width The width of the viewport (only integers supported currently)
|
|
6926
7270
|
* @param height The height of the viewport (only integers supported currently)
|
|
7271
|
+
* @since 1.8
|
|
6927
7272
|
*/
|
|
6928
7273
|
set_viewport(x: number, y: number, width: number, height: number): void;
|
|
6929
7274
|
|
|
6930
7275
|
/**
|
|
6931
7276
|
* Multiplies the current model-view matrix by the given matrix.
|
|
6932
7277
|
* @param matrix the matrix to multiply with the current model-view
|
|
7278
|
+
* @since 1.10
|
|
6933
7279
|
*/
|
|
6934
7280
|
transform(matrix: Matrix): void;
|
|
6935
7281
|
|
|
@@ -6939,6 +7285,7 @@ export namespace Cogl {
|
|
|
6939
7285
|
* @param x Distance to translate along the x-axis
|
|
6940
7286
|
* @param y Distance to translate along the y-axis
|
|
6941
7287
|
* @param z Distance to translate along the z-axis
|
|
7288
|
+
* @since 1.10
|
|
6942
7289
|
*/
|
|
6943
7290
|
translate(x: number, y: number, z: number): void;
|
|
6944
7291
|
}
|
|
@@ -7001,6 +7348,7 @@ export namespace Cogl {
|
|
|
7001
7348
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
7002
7349
|
* framebuffer and rendered too.</note>
|
|
7003
7350
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
7351
|
+
* @throws GLib.Error
|
|
7004
7352
|
*/
|
|
7005
7353
|
allocate(): boolean;
|
|
7006
7354
|
|
|
@@ -7012,6 +7360,7 @@ export namespace Cogl {
|
|
|
7012
7360
|
* is {@link Cogl.TextureComponents.RGBA}. The other constructors which take
|
|
7013
7361
|
* a %CoglBitmap or a data pointer default to the same components as
|
|
7014
7362
|
* the pixel format of the data.
|
|
7363
|
+
* @since 1.18
|
|
7015
7364
|
*/
|
|
7016
7365
|
get_components(): TextureComponents;
|
|
7017
7366
|
|
|
@@ -7058,6 +7407,7 @@ export namespace Cogl {
|
|
|
7058
7407
|
*
|
|
7059
7408
|
* By default the pre-multipled state is `TRUE`.
|
|
7060
7409
|
* @returns `true` if red, green and blue components are internally stored pre-multiplied by the alpha value or `false` if not.
|
|
7410
|
+
* @since 1.18
|
|
7061
7411
|
*/
|
|
7062
7412
|
get_premultiplied(): boolean;
|
|
7063
7413
|
|
|
@@ -7090,6 +7440,8 @@ export namespace Cogl {
|
|
|
7090
7440
|
* @param sub_width Width in pixels of the subregion
|
|
7091
7441
|
* @param sub_height Height in pixels of the subregion
|
|
7092
7442
|
* @returns A newly created {@link Cogl.Texture} or `null` on failure
|
|
7443
|
+
* @since 1.2
|
|
7444
|
+
* @deprecated since 1.18: Use `cogl_sub_texture_new()`
|
|
7093
7445
|
*/
|
|
7094
7446
|
new_from_sub_texture(sub_x: number, sub_y: number, sub_width: number, sub_height: number): Texture;
|
|
7095
7447
|
|
|
@@ -7114,6 +7466,7 @@ export namespace Cogl {
|
|
|
7114
7466
|
* an image format as long as {@link Cogl.TextureComponents.RG} isn't used
|
|
7115
7467
|
* as the texture's components.
|
|
7116
7468
|
* @param components
|
|
7469
|
+
* @since 1.18
|
|
7117
7470
|
*/
|
|
7118
7471
|
set_components(components: TextureComponents): void;
|
|
7119
7472
|
|
|
@@ -7165,6 +7518,7 @@ export namespace Cogl {
|
|
|
7165
7518
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
7166
7519
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
7167
7520
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
7521
|
+
* @throws GLib.Error
|
|
7168
7522
|
*/
|
|
7169
7523
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
7170
7524
|
|
|
@@ -7191,6 +7545,7 @@ export namespace Cogl {
|
|
|
7191
7545
|
*
|
|
7192
7546
|
* By default the `premultipled` state is `TRUE`.
|
|
7193
7547
|
* @param premultiplied Whether any internally stored red, green or blue components are pre-multiplied by an alpha component.
|
|
7548
|
+
* @since 1.18
|
|
7194
7549
|
*/
|
|
7195
7550
|
set_premultiplied(premultiplied: boolean): void;
|
|
7196
7551
|
|
|
@@ -7228,6 +7583,7 @@ export namespace Cogl {
|
|
|
7228
7583
|
* @param dst_height height of destination region to write. (Must be less than or equal to the bitmap height)
|
|
7229
7584
|
* @param bitmap The source bitmap to read from
|
|
7230
7585
|
* @returns `true` if the subregion upload was successful, and `false` otherwise
|
|
7586
|
+
* @since 1.8
|
|
7231
7587
|
*/
|
|
7232
7588
|
set_region_from_bitmap(src_x: number, src_y: number, dst_x: number, dst_y: number, dst_width: number, dst_height: number, bitmap: Bitmap): boolean;
|
|
7233
7589
|
}
|