@girs/cogl-8 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-8.d.ts +407 -169
- package/package.json +7 -7
package/cogl-8.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,36 +172,36 @@ 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,
|
|
186
|
-
OGL_FEATURE_ID_FENCE,
|
|
185
|
+
OGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE = 2,
|
|
186
|
+
OGL_FEATURE_ID_FENCE = 3,
|
|
187
187
|
/**
|
|
188
188
|
* Support for
|
|
189
189
|
* {@link Cogl.TextureComponents.RG} as the internal components of a
|
|
190
190
|
* texture.
|
|
191
191
|
*/
|
|
192
|
-
OGL_FEATURE_ID_TEXTURE_RG,
|
|
192
|
+
OGL_FEATURE_ID_TEXTURE_RG = 4,
|
|
193
193
|
/**
|
|
194
194
|
* Available if the age of {@link Cogl.Onscreen} back
|
|
195
195
|
* buffers are tracked and so `cogl_onscreen_get_buffer_age()` can be
|
|
196
196
|
* expected to return age values other than 0.
|
|
197
197
|
*/
|
|
198
|
-
OGL_FEATURE_ID_BUFFER_AGE,
|
|
199
|
-
OGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL,
|
|
198
|
+
OGL_FEATURE_ID_BUFFER_AGE = 5,
|
|
199
|
+
OGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL = 6,
|
|
200
200
|
/**
|
|
201
201
|
* Whether blitting using
|
|
202
202
|
* `cogl_blit_framebuffer()` is supported.
|
|
203
203
|
*/
|
|
204
|
-
OGL_FEATURE_ID_BLIT_FRAMEBUFFER,
|
|
204
|
+
OGL_FEATURE_ID_BLIT_FRAMEBUFFER = 7,
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
|
|
@@ -214,11 +214,11 @@ export namespace Cogl {
|
|
|
214
214
|
* The event was not handled, continues the
|
|
215
215
|
* processing
|
|
216
216
|
*/
|
|
217
|
-
CONTINUE,
|
|
217
|
+
CONTINUE = 0,
|
|
218
218
|
/**
|
|
219
219
|
* Remove the event, stops the processing
|
|
220
220
|
*/
|
|
221
|
-
REMOVE,
|
|
221
|
+
REMOVE = 1,
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
|
|
@@ -246,7 +246,7 @@ export namespace Cogl {
|
|
|
246
246
|
* acknowledged a frame and is ready for a
|
|
247
247
|
* new frame to be created.
|
|
248
248
|
*/
|
|
249
|
-
SYNC,
|
|
249
|
+
SYNC = 1,
|
|
250
250
|
/**
|
|
251
251
|
* Notifies that a frame has ended. This
|
|
252
252
|
* is a good time for applications to
|
|
@@ -256,7 +256,7 @@ export namespace Cogl {
|
|
|
256
256
|
* events should be expected after a
|
|
257
257
|
* `COGL_FRAME_EVENT_COMPLETE` event.
|
|
258
258
|
*/
|
|
259
|
-
COMPLETE,
|
|
259
|
+
COMPLETE = 2,
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
|
|
@@ -264,7 +264,7 @@ export namespace Cogl {
|
|
|
264
264
|
* @gir-type Enum
|
|
265
265
|
*/
|
|
266
266
|
enum FramebufferError {
|
|
267
|
-
FRAMEBUFFER_ERROR_ALLOCATE,
|
|
267
|
+
FRAMEBUFFER_ERROR_ALLOCATE = 0,
|
|
268
268
|
}
|
|
269
269
|
|
|
270
270
|
|
|
@@ -276,11 +276,11 @@ export namespace Cogl {
|
|
|
276
276
|
* @gir-type Enum
|
|
277
277
|
*/
|
|
278
278
|
enum GraphicsResetStatus {
|
|
279
|
-
NO_ERROR,
|
|
280
|
-
GUILTY_CONTEXT_RESET,
|
|
281
|
-
INNOCENT_CONTEXT_RESET,
|
|
282
|
-
UNKNOWN_CONTEXT_RESET,
|
|
283
|
-
PURGED_CONTEXT_RESET,
|
|
279
|
+
NO_ERROR = 0,
|
|
280
|
+
GUILTY_CONTEXT_RESET = 1,
|
|
281
|
+
INNOCENT_CONTEXT_RESET = 2,
|
|
282
|
+
UNKNOWN_CONTEXT_RESET = 3,
|
|
283
|
+
PURGED_CONTEXT_RESET = 4,
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
|
|
@@ -300,15 +300,15 @@ export namespace Cogl {
|
|
|
300
300
|
/**
|
|
301
301
|
* Your indices are unsigned bytes
|
|
302
302
|
*/
|
|
303
|
-
BYTE,
|
|
303
|
+
BYTE = 0,
|
|
304
304
|
/**
|
|
305
305
|
* Your indices are unsigned shorts
|
|
306
306
|
*/
|
|
307
|
-
SHORT,
|
|
307
|
+
SHORT = 1,
|
|
308
308
|
/**
|
|
309
309
|
* Your indices are unsigned ints
|
|
310
310
|
*/
|
|
311
|
-
INT,
|
|
311
|
+
INT = 2,
|
|
312
312
|
}
|
|
313
313
|
|
|
314
314
|
|
|
@@ -323,41 +323,41 @@ export namespace Cogl {
|
|
|
323
323
|
/**
|
|
324
324
|
* Never let the fragment through.
|
|
325
325
|
*/
|
|
326
|
-
NEVER,
|
|
326
|
+
NEVER = 512,
|
|
327
327
|
/**
|
|
328
328
|
* Let the fragment through if the incoming
|
|
329
329
|
* alpha value is less than the reference alpha value
|
|
330
330
|
*/
|
|
331
|
-
LESS,
|
|
331
|
+
LESS = 513,
|
|
332
332
|
/**
|
|
333
333
|
* Let the fragment through if the incoming
|
|
334
334
|
* alpha value equals the reference alpha value
|
|
335
335
|
*/
|
|
336
|
-
EQUAL,
|
|
336
|
+
EQUAL = 514,
|
|
337
337
|
/**
|
|
338
338
|
* Let the fragment through if the incoming
|
|
339
339
|
* alpha value is less than or equal to the reference alpha value
|
|
340
340
|
*/
|
|
341
|
-
LEQUAL,
|
|
341
|
+
LEQUAL = 515,
|
|
342
342
|
/**
|
|
343
343
|
* Let the fragment through if the incoming
|
|
344
344
|
* alpha value is greater than the reference alpha value
|
|
345
345
|
*/
|
|
346
|
-
GREATER,
|
|
346
|
+
GREATER = 516,
|
|
347
347
|
/**
|
|
348
348
|
* Let the fragment through if the incoming
|
|
349
349
|
* alpha value does not equal the reference alpha value
|
|
350
350
|
*/
|
|
351
|
-
NOTEQUAL,
|
|
351
|
+
NOTEQUAL = 517,
|
|
352
352
|
/**
|
|
353
353
|
* Let the fragment through if the incoming
|
|
354
354
|
* alpha value is greater than or equal to the reference alpha value.
|
|
355
355
|
*/
|
|
356
|
-
GEQUAL,
|
|
356
|
+
GEQUAL = 518,
|
|
357
357
|
/**
|
|
358
358
|
* Always let the fragment through.
|
|
359
359
|
*/
|
|
360
|
-
ALWAYS,
|
|
360
|
+
ALWAYS = 519,
|
|
361
361
|
}
|
|
362
362
|
|
|
363
363
|
|
|
@@ -374,38 +374,38 @@ export namespace Cogl {
|
|
|
374
374
|
* Measuring in manhatten distance from the,
|
|
375
375
|
* current pixel center, use the nearest texture texel
|
|
376
376
|
*/
|
|
377
|
-
NEAREST,
|
|
377
|
+
NEAREST = 9728,
|
|
378
378
|
/**
|
|
379
379
|
* Use the weighted average of the 4 texels
|
|
380
380
|
* nearest the current pixel center
|
|
381
381
|
*/
|
|
382
|
-
LINEAR,
|
|
382
|
+
LINEAR = 9729,
|
|
383
383
|
/**
|
|
384
384
|
* Select the mimap level whose
|
|
385
385
|
* texel size most closely matches the current pixel, and use the
|
|
386
386
|
* {@link Cogl.MaterialFilter.NEAREST} criterion
|
|
387
387
|
*/
|
|
388
|
-
NEAREST_MIPMAP_NEAREST,
|
|
388
|
+
NEAREST_MIPMAP_NEAREST = 9984,
|
|
389
389
|
/**
|
|
390
390
|
* Select the mimap level whose
|
|
391
391
|
* texel size most closely matches the current pixel, and use the
|
|
392
392
|
* {@link Cogl.MaterialFilter.LINEAR} criterion
|
|
393
393
|
*/
|
|
394
|
-
LINEAR_MIPMAP_NEAREST,
|
|
394
|
+
LINEAR_MIPMAP_NEAREST = 9985,
|
|
395
395
|
/**
|
|
396
396
|
* Select the two mimap levels
|
|
397
397
|
* whose texel size most closely matches the current pixel, use
|
|
398
398
|
* the {@link Cogl.MaterialFilter.NEAREST} criterion on each one and take
|
|
399
399
|
* their weighted average
|
|
400
400
|
*/
|
|
401
|
-
NEAREST_MIPMAP_LINEAR,
|
|
401
|
+
NEAREST_MIPMAP_LINEAR = 9986,
|
|
402
402
|
/**
|
|
403
403
|
* Select the two mimap levels
|
|
404
404
|
* whose texel size most closely matches the current pixel, use
|
|
405
405
|
* the {@link Cogl.MaterialFilter.LINEAR} criterion on each one and take
|
|
406
406
|
* their weighted average
|
|
407
407
|
*/
|
|
408
|
-
LINEAR_MIPMAP_LINEAR,
|
|
408
|
+
LINEAR_MIPMAP_LINEAR = 9987,
|
|
409
409
|
}
|
|
410
410
|
|
|
411
411
|
|
|
@@ -426,14 +426,14 @@ export namespace Cogl {
|
|
|
426
426
|
* The texture will be repeated. This
|
|
427
427
|
* is useful for example to draw a tiled background.
|
|
428
428
|
*/
|
|
429
|
-
REPEAT,
|
|
429
|
+
REPEAT = 10497,
|
|
430
430
|
/**
|
|
431
431
|
* The coordinates outside the
|
|
432
432
|
* range 0→1 will sample copies of the edge pixels of the
|
|
433
433
|
* texture. This is useful to avoid artifacts if only one copy of
|
|
434
434
|
* the texture is being rendered.
|
|
435
435
|
*/
|
|
436
|
-
CLAMP_TO_EDGE,
|
|
436
|
+
CLAMP_TO_EDGE = 33071,
|
|
437
437
|
/**
|
|
438
438
|
* Cogl will try to automatically
|
|
439
439
|
* decide which of the above two to use. For `cogl_rectangle()`, it
|
|
@@ -444,7 +444,7 @@ export namespace Cogl {
|
|
|
444
444
|
* layers that have point sprite coordinate generation enabled. This
|
|
445
445
|
* is the default value.
|
|
446
446
|
*/
|
|
447
|
-
AUTOMATIC,
|
|
447
|
+
AUTOMATIC = 519,
|
|
448
448
|
}
|
|
449
449
|
|
|
450
450
|
|
|
@@ -459,41 +459,41 @@ export namespace Cogl {
|
|
|
459
459
|
/**
|
|
460
460
|
* Never let the fragment through.
|
|
461
461
|
*/
|
|
462
|
-
NEVER,
|
|
462
|
+
NEVER = 512,
|
|
463
463
|
/**
|
|
464
464
|
* Let the fragment through if the incoming
|
|
465
465
|
* alpha value is less than the reference alpha value
|
|
466
466
|
*/
|
|
467
|
-
LESS,
|
|
467
|
+
LESS = 513,
|
|
468
468
|
/**
|
|
469
469
|
* Let the fragment through if the incoming
|
|
470
470
|
* alpha value equals the reference alpha value
|
|
471
471
|
*/
|
|
472
|
-
EQUAL,
|
|
472
|
+
EQUAL = 514,
|
|
473
473
|
/**
|
|
474
474
|
* Let the fragment through if the incoming
|
|
475
475
|
* alpha value is less than or equal to the reference alpha value
|
|
476
476
|
*/
|
|
477
|
-
LEQUAL,
|
|
477
|
+
LEQUAL = 515,
|
|
478
478
|
/**
|
|
479
479
|
* Let the fragment through if the incoming
|
|
480
480
|
* alpha value is greater than the reference alpha value
|
|
481
481
|
*/
|
|
482
|
-
GREATER,
|
|
482
|
+
GREATER = 516,
|
|
483
483
|
/**
|
|
484
484
|
* Let the fragment through if the incoming
|
|
485
485
|
* alpha value does not equal the reference alpha value
|
|
486
486
|
*/
|
|
487
|
-
NOTEQUAL,
|
|
487
|
+
NOTEQUAL = 517,
|
|
488
488
|
/**
|
|
489
489
|
* Let the fragment through if the incoming
|
|
490
490
|
* alpha value is greater than or equal to the reference alpha value.
|
|
491
491
|
*/
|
|
492
|
-
GEQUAL,
|
|
492
|
+
GEQUAL = 518,
|
|
493
493
|
/**
|
|
494
494
|
* Always let the fragment through.
|
|
495
495
|
*/
|
|
496
|
-
ALWAYS,
|
|
496
|
+
ALWAYS = 519,
|
|
497
497
|
}
|
|
498
498
|
|
|
499
499
|
|
|
@@ -507,19 +507,19 @@ export namespace Cogl {
|
|
|
507
507
|
* Neither face will be
|
|
508
508
|
* culled. This is the default.
|
|
509
509
|
*/
|
|
510
|
-
NONE,
|
|
510
|
+
NONE = 0,
|
|
511
511
|
/**
|
|
512
512
|
* Front faces will be culled.
|
|
513
513
|
*/
|
|
514
|
-
FRONT,
|
|
514
|
+
FRONT = 1,
|
|
515
515
|
/**
|
|
516
516
|
* Back faces will be culled.
|
|
517
517
|
*/
|
|
518
|
-
BACK,
|
|
518
|
+
BACK = 2,
|
|
519
519
|
/**
|
|
520
520
|
* All faces will be culled.
|
|
521
521
|
*/
|
|
522
|
-
BOTH,
|
|
522
|
+
BOTH = 3,
|
|
523
523
|
}
|
|
524
524
|
|
|
525
525
|
|
|
@@ -536,38 +536,38 @@ export namespace Cogl {
|
|
|
536
536
|
* Measuring in manhatten distance from the,
|
|
537
537
|
* current pixel center, use the nearest texture texel
|
|
538
538
|
*/
|
|
539
|
-
NEAREST,
|
|
539
|
+
NEAREST = 9728,
|
|
540
540
|
/**
|
|
541
541
|
* Use the weighted average of the 4 texels
|
|
542
542
|
* nearest the current pixel center
|
|
543
543
|
*/
|
|
544
|
-
LINEAR,
|
|
544
|
+
LINEAR = 9729,
|
|
545
545
|
/**
|
|
546
546
|
* Select the mimap level whose
|
|
547
547
|
* texel size most closely matches the current pixel, and use the
|
|
548
548
|
* {@link Cogl.PipelineFilter.NEAREST} criterion
|
|
549
549
|
*/
|
|
550
|
-
NEAREST_MIPMAP_NEAREST,
|
|
550
|
+
NEAREST_MIPMAP_NEAREST = 9984,
|
|
551
551
|
/**
|
|
552
552
|
* Select the mimap level whose
|
|
553
553
|
* texel size most closely matches the current pixel, and use the
|
|
554
554
|
* {@link Cogl.PipelineFilter.LINEAR} criterion
|
|
555
555
|
*/
|
|
556
|
-
LINEAR_MIPMAP_NEAREST,
|
|
556
|
+
LINEAR_MIPMAP_NEAREST = 9985,
|
|
557
557
|
/**
|
|
558
558
|
* Select the two mimap levels
|
|
559
559
|
* whose texel size most closely matches the current pixel, use
|
|
560
560
|
* the {@link Cogl.PipelineFilter.NEAREST} criterion on each one and take
|
|
561
561
|
* their weighted average
|
|
562
562
|
*/
|
|
563
|
-
NEAREST_MIPMAP_LINEAR,
|
|
563
|
+
NEAREST_MIPMAP_LINEAR = 9986,
|
|
564
564
|
/**
|
|
565
565
|
* Select the two mimap levels
|
|
566
566
|
* whose texel size most closely matches the current pixel, use
|
|
567
567
|
* the {@link Cogl.PipelineFilter.LINEAR} criterion on each one and take
|
|
568
568
|
* their weighted average
|
|
569
569
|
*/
|
|
570
|
-
LINEAR_MIPMAP_LINEAR,
|
|
570
|
+
LINEAR_MIPMAP_LINEAR = 9987,
|
|
571
571
|
}
|
|
572
572
|
|
|
573
573
|
|
|
@@ -588,15 +588,15 @@ export namespace Cogl {
|
|
|
588
588
|
* The texture will be repeated. This
|
|
589
589
|
* is useful for example to draw a tiled background.
|
|
590
590
|
*/
|
|
591
|
-
REPEAT,
|
|
592
|
-
MIRRORED_REPEAT,
|
|
591
|
+
REPEAT = 10497,
|
|
592
|
+
MIRRORED_REPEAT = 33648,
|
|
593
593
|
/**
|
|
594
594
|
* The coordinates outside the
|
|
595
595
|
* range 0→1 will sample copies of the edge pixels of the
|
|
596
596
|
* texture. This is useful to avoid artifacts if only one copy of
|
|
597
597
|
* the texture is being rendered.
|
|
598
598
|
*/
|
|
599
|
-
CLAMP_TO_EDGE,
|
|
599
|
+
CLAMP_TO_EDGE = 33071,
|
|
600
600
|
/**
|
|
601
601
|
* Cogl will try to automatically
|
|
602
602
|
* decide which of the above two to use. For `cogl_rectangle()`, it
|
|
@@ -607,7 +607,7 @@ export namespace Cogl {
|
|
|
607
607
|
* layers that have point sprite coordinate generation enabled. This
|
|
608
608
|
* is the default value.
|
|
609
609
|
*/
|
|
610
|
-
AUTOMATIC,
|
|
610
|
+
AUTOMATIC = 519,
|
|
611
611
|
}
|
|
612
612
|
|
|
613
613
|
|
|
@@ -615,8 +615,8 @@ export namespace Cogl {
|
|
|
615
615
|
* @gir-type Enum
|
|
616
616
|
*/
|
|
617
617
|
enum RendererError {
|
|
618
|
-
XLIB_DISPLAY_OPEN,
|
|
619
|
-
BAD_CONSTRAINT,
|
|
618
|
+
XLIB_DISPLAY_OPEN = 0,
|
|
619
|
+
BAD_CONSTRAINT = 1,
|
|
620
620
|
}
|
|
621
621
|
|
|
622
622
|
|
|
@@ -643,11 +643,11 @@ export namespace Cogl {
|
|
|
643
643
|
/**
|
|
644
644
|
* A program for processing vertices
|
|
645
645
|
*/
|
|
646
|
-
VERTEX,
|
|
646
|
+
VERTEX = 0,
|
|
647
647
|
/**
|
|
648
648
|
* A program for processing fragments
|
|
649
649
|
*/
|
|
650
|
-
FRAGMENT,
|
|
650
|
+
FRAGMENT = 1,
|
|
651
651
|
}
|
|
652
652
|
|
|
653
653
|
|
|
@@ -660,15 +660,15 @@ export namespace Cogl {
|
|
|
660
660
|
/**
|
|
661
661
|
* draw to both stereo buffers
|
|
662
662
|
*/
|
|
663
|
-
BOTH,
|
|
663
|
+
BOTH = 0,
|
|
664
664
|
/**
|
|
665
665
|
* draw only to the left stereo buffer
|
|
666
666
|
*/
|
|
667
|
-
LEFT,
|
|
667
|
+
LEFT = 1,
|
|
668
668
|
/**
|
|
669
669
|
* draw only to the left stereo buffer
|
|
670
670
|
*/
|
|
671
|
-
RIGHT,
|
|
671
|
+
RIGHT = 2,
|
|
672
672
|
}
|
|
673
673
|
|
|
674
674
|
|
|
@@ -698,12 +698,12 @@ export namespace Cogl {
|
|
|
698
698
|
* You tried to use a feature or
|
|
699
699
|
* configuration not currently available.
|
|
700
700
|
*/
|
|
701
|
-
UNSUPPORTED,
|
|
701
|
+
UNSUPPORTED = 0,
|
|
702
702
|
/**
|
|
703
703
|
* You tried to allocate a resource
|
|
704
704
|
* such as a texture and there wasn't enough memory.
|
|
705
705
|
*/
|
|
706
|
-
NO_MEMORY,
|
|
706
|
+
NO_MEMORY = 1,
|
|
707
707
|
}
|
|
708
708
|
|
|
709
709
|
|
|
@@ -716,25 +716,25 @@ export namespace Cogl {
|
|
|
716
716
|
/**
|
|
717
717
|
* Only the alpha component
|
|
718
718
|
*/
|
|
719
|
-
A,
|
|
719
|
+
A = 1,
|
|
720
720
|
/**
|
|
721
721
|
* Red and green components. Note that
|
|
722
722
|
* this can only be used if the {@link Cogl.FeatureID.OGL_FEATURE_ID_TEXTURE_RG} feature
|
|
723
723
|
* is advertised.
|
|
724
724
|
*/
|
|
725
|
-
RG,
|
|
725
|
+
RG = 2,
|
|
726
726
|
/**
|
|
727
727
|
* Red, green and blue components
|
|
728
728
|
*/
|
|
729
|
-
RGB,
|
|
729
|
+
RGB = 3,
|
|
730
730
|
/**
|
|
731
731
|
* Red, green, blue and alpha components
|
|
732
732
|
*/
|
|
733
|
-
RGBA,
|
|
733
|
+
RGBA = 4,
|
|
734
734
|
/**
|
|
735
735
|
* Only a depth component
|
|
736
736
|
*/
|
|
737
|
-
DEPTH,
|
|
737
|
+
DEPTH = 5,
|
|
738
738
|
}
|
|
739
739
|
|
|
740
740
|
|
|
@@ -747,17 +747,17 @@ export namespace Cogl {
|
|
|
747
747
|
/**
|
|
748
748
|
* Unsupported size
|
|
749
749
|
*/
|
|
750
|
-
SIZE,
|
|
750
|
+
SIZE = 0,
|
|
751
751
|
/**
|
|
752
752
|
* Unsupported format
|
|
753
753
|
*/
|
|
754
|
-
FORMAT,
|
|
755
|
-
BAD_PARAMETER,
|
|
754
|
+
FORMAT = 1,
|
|
755
|
+
BAD_PARAMETER = 2,
|
|
756
756
|
/**
|
|
757
757
|
* A primitive texture type that is
|
|
758
758
|
* unsupported by the driver was used
|
|
759
759
|
*/
|
|
760
|
-
TYPE,
|
|
760
|
+
TYPE = 3,
|
|
761
761
|
}
|
|
762
762
|
|
|
763
763
|
|
|
@@ -771,35 +771,35 @@ export namespace Cogl {
|
|
|
771
771
|
* FIXME, equivalent to
|
|
772
772
|
* <constant>GL_POINTS</constant>
|
|
773
773
|
*/
|
|
774
|
-
POINTS,
|
|
774
|
+
POINTS = 0,
|
|
775
775
|
/**
|
|
776
776
|
* FIXME, equivalent to <constant>GL_LINES</constant>
|
|
777
777
|
*/
|
|
778
|
-
LINES,
|
|
778
|
+
LINES = 1,
|
|
779
779
|
/**
|
|
780
780
|
* FIXME, equivalent to
|
|
781
781
|
* <constant>GL_LINE_LOOP</constant>
|
|
782
782
|
*/
|
|
783
|
-
LINE_LOOP,
|
|
783
|
+
LINE_LOOP = 2,
|
|
784
784
|
/**
|
|
785
785
|
* FIXME, equivalent to
|
|
786
786
|
* <constant>GL_LINE_STRIP</constant>
|
|
787
787
|
*/
|
|
788
|
-
LINE_STRIP,
|
|
788
|
+
LINE_STRIP = 3,
|
|
789
789
|
/**
|
|
790
790
|
* FIXME, equivalent to
|
|
791
791
|
* <constant>GL_TRIANGLES</constant>
|
|
792
792
|
*/
|
|
793
|
-
TRIANGLES,
|
|
793
|
+
TRIANGLES = 4,
|
|
794
794
|
/**
|
|
795
795
|
* FIXME, equivalent to
|
|
796
796
|
* <constant>GL_TRIANGLE_STRIP</constant>
|
|
797
797
|
*/
|
|
798
|
-
TRIANGLE_STRIP,
|
|
798
|
+
TRIANGLE_STRIP = 5,
|
|
799
799
|
/**
|
|
800
800
|
* FIXME, equivalent to <constant>GL_TRIANGLE_FAN</constant>
|
|
801
801
|
*/
|
|
802
|
-
TRIANGLE_FAN,
|
|
802
|
+
TRIANGLE_FAN = 6,
|
|
803
803
|
}
|
|
804
804
|
|
|
805
805
|
|
|
@@ -813,11 +813,11 @@ export namespace Cogl {
|
|
|
813
813
|
/**
|
|
814
814
|
* Vertices are in a clockwise order
|
|
815
815
|
*/
|
|
816
|
-
CLOCKWISE,
|
|
816
|
+
CLOCKWISE = 0,
|
|
817
817
|
/**
|
|
818
818
|
* Vertices are in a counter-clockwise order
|
|
819
819
|
*/
|
|
820
|
-
COUNTER_CLOCKWISE,
|
|
820
|
+
COUNTER_CLOCKWISE = 1,
|
|
821
821
|
}
|
|
822
822
|
|
|
823
823
|
|
|
@@ -825,38 +825,60 @@ export namespace Cogl {
|
|
|
825
825
|
* @gir-type Enum
|
|
826
826
|
*/
|
|
827
827
|
enum WinsysFeature {
|
|
828
|
-
MULTIPLE_ONSCREEN,
|
|
829
|
-
VBLANK_COUNTER,
|
|
830
|
-
VBLANK_WAIT,
|
|
831
|
-
TEXTURE_FROM_PIXMAP,
|
|
832
|
-
SWAP_BUFFERS_EVENT,
|
|
833
|
-
SWAP_REGION,
|
|
834
|
-
SWAP_REGION_THROTTLE,
|
|
835
|
-
SWAP_REGION_SYNCHRONIZED,
|
|
836
|
-
BUFFER_AGE,
|
|
837
|
-
SYNC_AND_COMPLETE_EVENT,
|
|
838
|
-
N_FEATURES,
|
|
828
|
+
MULTIPLE_ONSCREEN = 0,
|
|
829
|
+
VBLANK_COUNTER = 1,
|
|
830
|
+
VBLANK_WAIT = 2,
|
|
831
|
+
TEXTURE_FROM_PIXMAP = 3,
|
|
832
|
+
SWAP_BUFFERS_EVENT = 4,
|
|
833
|
+
SWAP_REGION = 5,
|
|
834
|
+
SWAP_REGION_THROTTLE = 6,
|
|
835
|
+
SWAP_REGION_SYNCHRONIZED = 7,
|
|
836
|
+
BUFFER_AGE = 8,
|
|
837
|
+
SYNC_AND_COMPLETE_EVENT = 9,
|
|
838
|
+
N_FEATURES = 10,
|
|
839
839
|
}
|
|
840
840
|
|
|
841
841
|
|
|
842
|
+
/**
|
|
843
|
+
* @default 64
|
|
844
|
+
*/
|
|
842
845
|
const AFIRST_BIT: number;
|
|
843
846
|
|
|
847
|
+
/**
|
|
848
|
+
* @default 16
|
|
849
|
+
*/
|
|
844
850
|
const A_BIT: number;
|
|
845
851
|
|
|
852
|
+
/**
|
|
853
|
+
* @default 32
|
|
854
|
+
*/
|
|
846
855
|
const BGR_BIT: number;
|
|
847
856
|
|
|
857
|
+
/**
|
|
858
|
+
* @default 256
|
|
859
|
+
*/
|
|
848
860
|
const DEPTH_BIT: number;
|
|
849
861
|
|
|
850
862
|
/**
|
|
851
863
|
* The maximum number of planes of a pixel format (see also
|
|
852
864
|
* `cogl_pixel_format_get_planes()`).
|
|
865
|
+
* @default 4
|
|
853
866
|
*/
|
|
854
867
|
const PIXEL_FORMAT_MAX_PLANES: number;
|
|
855
868
|
|
|
869
|
+
/**
|
|
870
|
+
* @default 128
|
|
871
|
+
*/
|
|
856
872
|
const PREMULT_BIT: number;
|
|
857
873
|
|
|
874
|
+
/**
|
|
875
|
+
* @default 512
|
|
876
|
+
*/
|
|
858
877
|
const STENCIL_BIT: number;
|
|
859
878
|
|
|
879
|
+
/**
|
|
880
|
+
* @default 127
|
|
881
|
+
*/
|
|
860
882
|
const TEXTURE_MAX_WASTE: number;
|
|
861
883
|
|
|
862
884
|
function blend_string_error_quark(): number;
|
|
@@ -909,6 +931,7 @@ export namespace Cogl {
|
|
|
909
931
|
* @param dst_y Destination y position
|
|
910
932
|
* @param width Width of region to copy
|
|
911
933
|
* @param height Height of region to copy
|
|
934
|
+
* @throws GLib.Error
|
|
912
935
|
*/
|
|
913
936
|
function blit_framebuffer(framebuffer: Framebuffer, dst: Framebuffer, src_x: number, src_y: number, dst_x: number, dst_y: number, width: number, height: number): boolean;
|
|
914
937
|
|
|
@@ -1357,6 +1380,7 @@ export namespace Cogl {
|
|
|
1357
1380
|
* @returns A newly created {@link Cogl.Texture} or `null` on failure
|
|
1358
1381
|
* @since 0.8
|
|
1359
1382
|
* @deprecated since 1.18: Use specific constructors such as `cogl_texture_2d_new_from_file()`
|
|
1383
|
+
* @throws GLib.Error
|
|
1360
1384
|
*/
|
|
1361
1385
|
function texture_new_from_file(filename: string, flags: TextureFlags, internal_format: PixelFormat): Texture;
|
|
1362
1386
|
|
|
@@ -1428,15 +1452,15 @@ export namespace Cogl {
|
|
|
1428
1452
|
/**
|
|
1429
1453
|
* Selects the primary color buffer
|
|
1430
1454
|
*/
|
|
1431
|
-
COLOR,
|
|
1455
|
+
COLOR = 1,
|
|
1432
1456
|
/**
|
|
1433
1457
|
* Selects the depth buffer
|
|
1434
1458
|
*/
|
|
1435
|
-
DEPTH,
|
|
1459
|
+
DEPTH = 2,
|
|
1436
1460
|
/**
|
|
1437
1461
|
* Selects the stencil buffer
|
|
1438
1462
|
*/
|
|
1439
|
-
STENCIL,
|
|
1463
|
+
STENCIL = 4,
|
|
1440
1464
|
}
|
|
1441
1465
|
|
|
1442
1466
|
|
|
@@ -1449,11 +1473,11 @@ export namespace Cogl {
|
|
|
1449
1473
|
/**
|
|
1450
1474
|
* FIXME
|
|
1451
1475
|
*/
|
|
1452
|
-
WINDOW_BUFFER,
|
|
1476
|
+
WINDOW_BUFFER = 2,
|
|
1453
1477
|
/**
|
|
1454
1478
|
* FIXME
|
|
1455
1479
|
*/
|
|
1456
|
-
OFFSCREEN_BUFFER,
|
|
1480
|
+
OFFSCREEN_BUFFER = 4,
|
|
1457
1481
|
}
|
|
1458
1482
|
|
|
1459
1483
|
|
|
@@ -1461,8 +1485,8 @@ export namespace Cogl {
|
|
|
1461
1485
|
* @gir-type Flags
|
|
1462
1486
|
*/
|
|
1463
1487
|
enum EglImageFlags {
|
|
1464
|
-
NONE,
|
|
1465
|
-
NO_GET_DATA,
|
|
1488
|
+
NONE = 0,
|
|
1489
|
+
NO_GET_DATA = 1,
|
|
1466
1490
|
}
|
|
1467
1491
|
|
|
1468
1492
|
|
|
@@ -1492,152 +1516,152 @@ export namespace Cogl {
|
|
|
1492
1516
|
/**
|
|
1493
1517
|
* Any format
|
|
1494
1518
|
*/
|
|
1495
|
-
ANY,
|
|
1519
|
+
ANY = 0,
|
|
1496
1520
|
/**
|
|
1497
1521
|
* 8 bits alpha mask
|
|
1498
1522
|
*/
|
|
1499
|
-
A_8,
|
|
1523
|
+
A_8 = 17,
|
|
1500
1524
|
/**
|
|
1501
1525
|
* RGB, 16 bits
|
|
1502
1526
|
*/
|
|
1503
|
-
RGB_565,
|
|
1527
|
+
RGB_565 = 4,
|
|
1504
1528
|
/**
|
|
1505
1529
|
* RGBA, 16 bits
|
|
1506
1530
|
*/
|
|
1507
|
-
RGBA_4444,
|
|
1531
|
+
RGBA_4444 = 21,
|
|
1508
1532
|
/**
|
|
1509
1533
|
* RGBA, 16 bits
|
|
1510
1534
|
*/
|
|
1511
|
-
RGBA_5551,
|
|
1535
|
+
RGBA_5551 = 22,
|
|
1512
1536
|
/**
|
|
1513
1537
|
* Not currently supported
|
|
1514
1538
|
*/
|
|
1515
|
-
YUV,
|
|
1539
|
+
YUV = 7,
|
|
1516
1540
|
/**
|
|
1517
1541
|
* Single luminance component
|
|
1518
1542
|
*/
|
|
1519
|
-
G_8,
|
|
1543
|
+
G_8 = 8,
|
|
1520
1544
|
/**
|
|
1521
1545
|
* RG, 16 bits. Note that red-green textures
|
|
1522
1546
|
* are only available if {@link Cogl.FeatureID.OGL_FEATURE_ID_TEXTURE_RG} is advertised.
|
|
1523
1547
|
* See `cogl_texture_set_components()` for details.
|
|
1524
1548
|
*/
|
|
1525
|
-
RG_88,
|
|
1549
|
+
RG_88 = 9,
|
|
1526
1550
|
/**
|
|
1527
1551
|
* RGB, 24 bits
|
|
1528
1552
|
*/
|
|
1529
|
-
RGB_888,
|
|
1553
|
+
RGB_888 = 2,
|
|
1530
1554
|
/**
|
|
1531
1555
|
* BGR, 24 bits
|
|
1532
1556
|
*/
|
|
1533
|
-
BGR_888,
|
|
1557
|
+
BGR_888 = 34,
|
|
1534
1558
|
/**
|
|
1535
1559
|
* RGBA, 32 bits
|
|
1536
1560
|
*/
|
|
1537
|
-
RGBA_8888,
|
|
1561
|
+
RGBA_8888 = 19,
|
|
1538
1562
|
/**
|
|
1539
1563
|
* BGRA, 32 bits
|
|
1540
1564
|
*/
|
|
1541
|
-
BGRA_8888,
|
|
1565
|
+
BGRA_8888 = 51,
|
|
1542
1566
|
/**
|
|
1543
1567
|
* ARGB, 32 bits
|
|
1544
1568
|
*/
|
|
1545
|
-
ARGB_8888,
|
|
1569
|
+
ARGB_8888 = 83,
|
|
1546
1570
|
/**
|
|
1547
1571
|
* ABGR, 32 bits
|
|
1548
1572
|
*/
|
|
1549
|
-
ABGR_8888,
|
|
1573
|
+
ABGR_8888 = 115,
|
|
1550
1574
|
/**
|
|
1551
1575
|
* RGBA, 32 bits, 10 bpc
|
|
1552
1576
|
*/
|
|
1553
|
-
RGBA_1010102,
|
|
1577
|
+
RGBA_1010102 = 29,
|
|
1554
1578
|
/**
|
|
1555
1579
|
* BGRA, 32 bits, 10 bpc
|
|
1556
1580
|
*/
|
|
1557
|
-
BGRA_1010102,
|
|
1581
|
+
BGRA_1010102 = 61,
|
|
1558
1582
|
/**
|
|
1559
1583
|
* ARGB, 32 bits, 10 bpc
|
|
1560
1584
|
*/
|
|
1561
|
-
ARGB_2101010,
|
|
1585
|
+
ARGB_2101010 = 93,
|
|
1562
1586
|
/**
|
|
1563
1587
|
* ABGR, 32 bits, 10 bpc
|
|
1564
1588
|
*/
|
|
1565
|
-
ABGR_2101010,
|
|
1589
|
+
ABGR_2101010 = 125,
|
|
1566
1590
|
/**
|
|
1567
1591
|
* RGBA half floating point, 64 bit
|
|
1568
1592
|
*/
|
|
1569
|
-
RGBA_FP_16161616,
|
|
1593
|
+
RGBA_FP_16161616 = 27,
|
|
1570
1594
|
/**
|
|
1571
1595
|
* BGRA half floating point, 64 bit
|
|
1572
1596
|
*/
|
|
1573
|
-
BGRA_FP_16161616,
|
|
1597
|
+
BGRA_FP_16161616 = 59,
|
|
1574
1598
|
/**
|
|
1575
1599
|
* ARGB half floating point, 64 bit
|
|
1576
1600
|
*/
|
|
1577
|
-
ARGB_FP_16161616,
|
|
1601
|
+
ARGB_FP_16161616 = 91,
|
|
1578
1602
|
/**
|
|
1579
1603
|
* ABGR half floating point, 64 bit
|
|
1580
1604
|
*/
|
|
1581
|
-
ABGR_FP_16161616,
|
|
1605
|
+
ABGR_FP_16161616 = 123,
|
|
1582
1606
|
/**
|
|
1583
1607
|
* Premultiplied RGBA, 32 bits
|
|
1584
1608
|
*/
|
|
1585
|
-
RGBA_8888_PRE,
|
|
1609
|
+
RGBA_8888_PRE = 147,
|
|
1586
1610
|
/**
|
|
1587
1611
|
* Premultiplied BGRA, 32 bits
|
|
1588
1612
|
*/
|
|
1589
|
-
BGRA_8888_PRE,
|
|
1613
|
+
BGRA_8888_PRE = 179,
|
|
1590
1614
|
/**
|
|
1591
1615
|
* Premultiplied ARGB, 32 bits
|
|
1592
1616
|
*/
|
|
1593
|
-
ARGB_8888_PRE,
|
|
1617
|
+
ARGB_8888_PRE = 211,
|
|
1594
1618
|
/**
|
|
1595
1619
|
* Premultiplied ABGR, 32 bits
|
|
1596
1620
|
*/
|
|
1597
|
-
ABGR_8888_PRE,
|
|
1621
|
+
ABGR_8888_PRE = 243,
|
|
1598
1622
|
/**
|
|
1599
1623
|
* Premultiplied RGBA, 16 bits
|
|
1600
1624
|
*/
|
|
1601
|
-
RGBA_4444_PRE,
|
|
1625
|
+
RGBA_4444_PRE = 149,
|
|
1602
1626
|
/**
|
|
1603
1627
|
* Premultiplied RGBA, 16 bits
|
|
1604
1628
|
*/
|
|
1605
|
-
RGBA_5551_PRE,
|
|
1629
|
+
RGBA_5551_PRE = 150,
|
|
1606
1630
|
/**
|
|
1607
1631
|
* Premultiplied RGBA, 32 bits, 10 bpc
|
|
1608
1632
|
*/
|
|
1609
|
-
RGBA_1010102_PRE,
|
|
1633
|
+
RGBA_1010102_PRE = 157,
|
|
1610
1634
|
/**
|
|
1611
1635
|
* Premultiplied BGRA, 32 bits, 10 bpc
|
|
1612
1636
|
*/
|
|
1613
|
-
BGRA_1010102_PRE,
|
|
1637
|
+
BGRA_1010102_PRE = 189,
|
|
1614
1638
|
/**
|
|
1615
1639
|
* Premultiplied ARGB, 32 bits, 10 bpc
|
|
1616
1640
|
*/
|
|
1617
|
-
ARGB_2101010_PRE,
|
|
1641
|
+
ARGB_2101010_PRE = 221,
|
|
1618
1642
|
/**
|
|
1619
1643
|
* Premultiplied ABGR, 32 bits, 10 bpc
|
|
1620
1644
|
*/
|
|
1621
|
-
ABGR_2101010_PRE,
|
|
1645
|
+
ABGR_2101010_PRE = 253,
|
|
1622
1646
|
/**
|
|
1623
1647
|
* Premultiplied RGBA half floating point, 64 bit
|
|
1624
1648
|
*/
|
|
1625
|
-
RGBA_FP_16161616_PRE,
|
|
1649
|
+
RGBA_FP_16161616_PRE = 155,
|
|
1626
1650
|
/**
|
|
1627
1651
|
* Premultiplied BGRA half floating point, 64 bit
|
|
1628
1652
|
*/
|
|
1629
|
-
BGRA_FP_16161616_PRE,
|
|
1653
|
+
BGRA_FP_16161616_PRE = 187,
|
|
1630
1654
|
/**
|
|
1631
1655
|
* Premultiplied ARGB half floating point, 64 bit
|
|
1632
1656
|
*/
|
|
1633
|
-
ARGB_FP_16161616_PRE,
|
|
1657
|
+
ARGB_FP_16161616_PRE = 219,
|
|
1634
1658
|
/**
|
|
1635
1659
|
* Premultiplied ABGR half floating point, 64 bit
|
|
1636
1660
|
*/
|
|
1637
|
-
ABGR_FP_16161616_PRE,
|
|
1638
|
-
DEPTH_16,
|
|
1639
|
-
DEPTH_32,
|
|
1640
|
-
DEPTH_24_STENCIL_8,
|
|
1661
|
+
ABGR_FP_16161616_PRE = 251,
|
|
1662
|
+
DEPTH_16 = 265,
|
|
1663
|
+
DEPTH_32 = 259,
|
|
1664
|
+
DEPTH_24_STENCIL_8 = 771,
|
|
1641
1665
|
}
|
|
1642
1666
|
|
|
1643
1667
|
|
|
@@ -1650,7 +1674,7 @@ export namespace Cogl {
|
|
|
1650
1674
|
/**
|
|
1651
1675
|
* Read from the color buffer
|
|
1652
1676
|
*/
|
|
1653
|
-
READ_PIXELS_COLOR_BUFFER,
|
|
1677
|
+
READ_PIXELS_COLOR_BUFFER = 1,
|
|
1654
1678
|
}
|
|
1655
1679
|
|
|
1656
1680
|
|
|
@@ -1663,7 +1687,7 @@ export namespace Cogl {
|
|
|
1663
1687
|
/**
|
|
1664
1688
|
* No flags specified
|
|
1665
1689
|
*/
|
|
1666
|
-
NONE,
|
|
1690
|
+
NONE = 0,
|
|
1667
1691
|
/**
|
|
1668
1692
|
* Disables the automatic generation of
|
|
1669
1693
|
* the mipmap pyramid from the base level image whenever it is
|
|
@@ -1671,16 +1695,16 @@ export namespace Cogl {
|
|
|
1671
1695
|
* rendered with a mipmap filter so it should be free to leave out
|
|
1672
1696
|
* this flag when using other filtering modes
|
|
1673
1697
|
*/
|
|
1674
|
-
NO_AUTO_MIPMAP,
|
|
1698
|
+
NO_AUTO_MIPMAP = 1,
|
|
1675
1699
|
/**
|
|
1676
1700
|
* Disables the slicing of the texture
|
|
1677
1701
|
*/
|
|
1678
|
-
NO_SLICING,
|
|
1702
|
+
NO_SLICING = 2,
|
|
1679
1703
|
/**
|
|
1680
1704
|
* Disables the insertion of the texture inside
|
|
1681
1705
|
* the texture atlas used by Cogl
|
|
1682
1706
|
*/
|
|
1683
|
-
NO_ATLAS,
|
|
1707
|
+
NO_ATLAS = 4,
|
|
1684
1708
|
}
|
|
1685
1709
|
|
|
1686
1710
|
|
|
@@ -1720,27 +1744,32 @@ export namespace Cogl {
|
|
|
1720
1744
|
* Parses an image file enough to extract the width and height
|
|
1721
1745
|
* of the bitmap.
|
|
1722
1746
|
* @param filename the file to check
|
|
1747
|
+
* @since 1.0
|
|
1723
1748
|
*/
|
|
1724
1749
|
static get_size_from_file(filename: string): [boolean, number, number];
|
|
1725
1750
|
|
|
1726
1751
|
// Methods
|
|
1727
1752
|
/**
|
|
1728
1753
|
* @returns the {@link Cogl.PixelFormat} that the data for the bitmap is in.
|
|
1754
|
+
* @since 1.10
|
|
1729
1755
|
*/
|
|
1730
1756
|
get_format(): PixelFormat;
|
|
1731
1757
|
|
|
1732
1758
|
/**
|
|
1733
1759
|
* @returns the height of the bitmap
|
|
1760
|
+
* @since 1.10
|
|
1734
1761
|
*/
|
|
1735
1762
|
get_height(): number;
|
|
1736
1763
|
|
|
1737
1764
|
/**
|
|
1738
1765
|
* @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.
|
|
1766
|
+
* @since 1.10
|
|
1739
1767
|
*/
|
|
1740
1768
|
get_rowstride(): number;
|
|
1741
1769
|
|
|
1742
1770
|
/**
|
|
1743
1771
|
* @returns the width of the bitmap
|
|
1772
|
+
* @since 1.10
|
|
1744
1773
|
*/
|
|
1745
1774
|
get_width(): number;
|
|
1746
1775
|
}
|
|
@@ -1830,6 +1859,7 @@ export namespace Cogl {
|
|
|
1830
1859
|
* Gets the frame counter for the {@link Cogl.Onscreen} that corresponds
|
|
1831
1860
|
* to this frame.
|
|
1832
1861
|
* @returns The frame counter value
|
|
1862
|
+
* @since 1.14
|
|
1833
1863
|
*/
|
|
1834
1864
|
get_frame_counter(): number;
|
|
1835
1865
|
|
|
@@ -1845,6 +1875,7 @@ export namespace Cogl {
|
|
|
1845
1875
|
* <note>Some buggy Mesa drivers up to 9.0.1 may
|
|
1846
1876
|
* incorrectly report non-monotonic timestamps.</note>
|
|
1847
1877
|
* @returns the presentation time for the frame
|
|
1878
|
+
* @since 1.14
|
|
1848
1879
|
*/
|
|
1849
1880
|
get_presentation_time_us(): number;
|
|
1850
1881
|
|
|
@@ -1858,6 +1889,7 @@ export namespace Cogl {
|
|
|
1858
1889
|
* more reliable than using `cogl_frame_info_get_output()` followed by
|
|
1859
1890
|
* `cogl_output_get_refresh_rate()`.</note>
|
|
1860
1891
|
* @returns the refresh rate in Hertz
|
|
1892
|
+
* @since 1.14
|
|
1861
1893
|
*/
|
|
1862
1894
|
get_refresh_rate(): number;
|
|
1863
1895
|
|
|
@@ -1958,6 +1990,7 @@ export namespace Cogl {
|
|
|
1958
1990
|
* used. The disadvantage of relying on automatic allocation is that the
|
|
1959
1991
|
* program will abort with an error message if there is an error during
|
|
1960
1992
|
* automatic allocation.</note>
|
|
1993
|
+
* @since 1.8
|
|
1961
1994
|
* @virtual
|
|
1962
1995
|
*/
|
|
1963
1996
|
vfunc_allocate(): boolean;
|
|
@@ -1980,6 +2013,8 @@ export namespace Cogl {
|
|
|
1980
2013
|
* program will abort with an error message if there is an error during
|
|
1981
2014
|
* automatic allocation.</note>
|
|
1982
2015
|
* @returns `true` if there were no error allocating the framebuffer, else `false`.
|
|
2016
|
+
* @since 1.8
|
|
2017
|
+
* @throws GLib.Error
|
|
1983
2018
|
*/
|
|
1984
2019
|
allocate(): boolean;
|
|
1985
2020
|
|
|
@@ -1988,6 +2023,7 @@ export namespace Cogl {
|
|
|
1988
2023
|
* that includes the color buffer then the specified `color` is used.
|
|
1989
2024
|
* @param buffers A mask of {@link Cogl.BufferBit}<!-- -->'s identifying which auxiliary buffers to clear
|
|
1990
2025
|
* @param color The color to clear the color buffer too if specified in `buffers`.
|
|
2026
|
+
* @since 1.8
|
|
1991
2027
|
*/
|
|
1992
2028
|
clear(buffers: bigint | number, color: Color): void;
|
|
1993
2029
|
|
|
@@ -1999,6 +2035,7 @@ export namespace Cogl {
|
|
|
1999
2035
|
* @param green The green component of color to clear the color buffer too if specified in `buffers`.
|
|
2000
2036
|
* @param blue The blue component of color to clear the color buffer too if specified in `buffers`.
|
|
2001
2037
|
* @param alpha The alpha component of color to clear the color buffer too if specified in `buffers`.
|
|
2038
|
+
* @since 1.8
|
|
2002
2039
|
*/
|
|
2003
2040
|
clear4f(buffers: bigint | number, red: number, green: number, blue: number, alpha: number): void;
|
|
2004
2041
|
|
|
@@ -2020,6 +2057,7 @@ export namespace Cogl {
|
|
|
2020
2057
|
* framebuffer, and it's not meaningful to try and discard the color buffer of
|
|
2021
2058
|
* a {@link Cogl.Offscreen} framebuffer since they are single-buffered.
|
|
2022
2059
|
* @param buffers A {@link Cogl.BufferBit} mask of which ancillary buffers you want to discard.
|
|
2060
|
+
* @since 1.8
|
|
2023
2061
|
*/
|
|
2024
2062
|
discard_buffers(buffers: bigint | number): void;
|
|
2025
2063
|
|
|
@@ -2069,6 +2107,7 @@ export namespace Cogl {
|
|
|
2069
2107
|
* @param y_2 y coordinate lower right on screen.
|
|
2070
2108
|
* @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.
|
|
2071
2109
|
* @param tex_coords_len The length of the `tex_coords` array. (For one layer and one group of texture coordinates, this would be 4)
|
|
2110
|
+
* @since 1.10
|
|
2072
2111
|
*/
|
|
2073
2112
|
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;
|
|
2074
2113
|
|
|
@@ -2089,6 +2128,7 @@ export namespace Cogl {
|
|
|
2089
2128
|
* @param y_1 Y coordinate of the top-left corner
|
|
2090
2129
|
* @param x_2 X coordinate of the bottom-right corner
|
|
2091
2130
|
* @param y_2 Y coordinate of the bottom-right corner
|
|
2131
|
+
* @since 1.10
|
|
2092
2132
|
*/
|
|
2093
2133
|
draw_rectangle(pipeline: Pipeline, x_1: number, y_1: number, x_2: number, y_2: number): void;
|
|
2094
2134
|
|
|
@@ -2115,6 +2155,7 @@ export namespace Cogl {
|
|
|
2115
2155
|
* @param pipeline A {@link Cogl.Pipeline} state object
|
|
2116
2156
|
* @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).
|
|
2117
2157
|
* @param n_rectangles number of rectangles defined in `coordinates`.
|
|
2158
|
+
* @since 1.10
|
|
2118
2159
|
*/
|
|
2119
2160
|
draw_rectangles(pipeline: Pipeline, coordinates: number[], n_rectangles: number): void;
|
|
2120
2161
|
|
|
@@ -2154,6 +2195,7 @@ export namespace Cogl {
|
|
|
2154
2195
|
* @param t_1 T texture coordinate of the top-left coorner
|
|
2155
2196
|
* @param s_2 S texture coordinate of the bottom-right coorner
|
|
2156
2197
|
* @param t_2 T texture coordinate of the bottom-right coorner
|
|
2198
|
+
* @since 1.10
|
|
2157
2199
|
*/
|
|
2158
2200
|
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;
|
|
2159
2201
|
|
|
@@ -2195,6 +2237,7 @@ export namespace Cogl {
|
|
|
2195
2237
|
* @param pipeline A {@link Cogl.Pipeline} state object
|
|
2196
2238
|
* @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()`.
|
|
2197
2239
|
* @param n_rectangles number of rectangles to `coordinates` to draw
|
|
2240
|
+
* @since 1.10
|
|
2198
2241
|
*/
|
|
2199
2242
|
draw_textured_rectangles(pipeline: Pipeline, coordinates: number[], n_rectangles: number): void;
|
|
2200
2243
|
|
|
@@ -2208,6 +2251,7 @@ export namespace Cogl {
|
|
|
2208
2251
|
* One example might be for benchmarking purposes to be sure timing
|
|
2209
2252
|
* measurements reflect the time that the GPU is busy for not just the time it
|
|
2210
2253
|
* takes to queue rendering commands.
|
|
2254
|
+
* @since 1.10
|
|
2211
2255
|
*/
|
|
2212
2256
|
finish(): void;
|
|
2213
2257
|
|
|
@@ -2229,18 +2273,21 @@ export namespace Cogl {
|
|
|
2229
2273
|
* @param top Y position of the top clipping plane where it intersects the near clipping plane
|
|
2230
2274
|
* @param z_near The distance to the near clipping plane (Must be positive)
|
|
2231
2275
|
* @param z_far The distance to the far clipping plane (Must be positive)
|
|
2276
|
+
* @since 1.10
|
|
2232
2277
|
*/
|
|
2233
2278
|
frustum(left: number, right: number, bottom: number, top: number, z_near: number, z_far: number): void;
|
|
2234
2279
|
|
|
2235
2280
|
/**
|
|
2236
2281
|
* Retrieves the number of alpha bits of `framebuffer`
|
|
2237
2282
|
* @returns the number of bits
|
|
2283
|
+
* @since 1.8
|
|
2238
2284
|
*/
|
|
2239
2285
|
get_alpha_bits(): number;
|
|
2240
2286
|
|
|
2241
2287
|
/**
|
|
2242
2288
|
* Retrieves the number of blue bits of `framebuffer`
|
|
2243
2289
|
* @returns the number of bits
|
|
2290
|
+
* @since 1.8
|
|
2244
2291
|
*/
|
|
2245
2292
|
get_blue_bits(): number;
|
|
2246
2293
|
|
|
@@ -2249,12 +2296,14 @@ export namespace Cogl {
|
|
|
2249
2296
|
* instantiated within. This is the {@link Cogl.Context} that was passed to
|
|
2250
2297
|
* `cogl_onscreen_new()` for example.
|
|
2251
2298
|
* @returns The {@link Cogl.Context} that the given `framebuffer` was instantiated within.
|
|
2299
|
+
* @since 1.8
|
|
2252
2300
|
*/
|
|
2253
2301
|
get_context(): Context;
|
|
2254
2302
|
|
|
2255
2303
|
/**
|
|
2256
2304
|
* Retrieves the number of depth bits of `framebuffer`
|
|
2257
2305
|
* @returns the number of bits
|
|
2306
|
+
* @since 2.0
|
|
2258
2307
|
*/
|
|
2259
2308
|
get_depth_bits(): number;
|
|
2260
2309
|
|
|
@@ -2262,6 +2311,7 @@ export namespace Cogl {
|
|
|
2262
2311
|
* Queries whether depth buffer writing is enabled for `framebuffer`. This
|
|
2263
2312
|
* can be controlled via `cogl_framebuffer_set_depth_write_enabled()`.
|
|
2264
2313
|
* @returns `true` if depth writing is enabled or `false` if not.
|
|
2314
|
+
* @since 1.18
|
|
2265
2315
|
*/
|
|
2266
2316
|
get_depth_write_enabled(): boolean;
|
|
2267
2317
|
|
|
@@ -2273,18 +2323,21 @@ export namespace Cogl {
|
|
|
2273
2323
|
* display pipeline does not support dithering. This value only represents
|
|
2274
2324
|
* the user's request for dithering.</note>
|
|
2275
2325
|
* @returns `true` if dithering has been requested or `false` if not.
|
|
2326
|
+
* @since 1.8
|
|
2276
2327
|
*/
|
|
2277
2328
|
get_dither_enabled(): boolean;
|
|
2278
2329
|
|
|
2279
2330
|
/**
|
|
2280
2331
|
* Retrieves the number of green bits of `framebuffer`
|
|
2281
2332
|
* @returns the number of bits
|
|
2333
|
+
* @since 1.8
|
|
2282
2334
|
*/
|
|
2283
2335
|
get_green_bits(): number;
|
|
2284
2336
|
|
|
2285
2337
|
/**
|
|
2286
2338
|
* Queries the current height of the given `framebuffer`.
|
|
2287
2339
|
* @returns The height of `framebuffer`.
|
|
2340
|
+
* @since 1.8
|
|
2288
2341
|
*/
|
|
2289
2342
|
get_height(): number;
|
|
2290
2343
|
|
|
@@ -2292,17 +2345,20 @@ export namespace Cogl {
|
|
|
2292
2345
|
|
|
2293
2346
|
/**
|
|
2294
2347
|
* Stores the current model-view matrix in `matrix`.
|
|
2348
|
+
* @since 1.10
|
|
2295
2349
|
*/
|
|
2296
2350
|
get_modelview_matrix(): Graphene.Matrix;
|
|
2297
2351
|
|
|
2298
2352
|
/**
|
|
2299
2353
|
* Stores the current projection matrix in `matrix`.
|
|
2354
|
+
* @since 1.10
|
|
2300
2355
|
*/
|
|
2301
2356
|
get_projection_matrix(): Graphene.Matrix;
|
|
2302
2357
|
|
|
2303
2358
|
/**
|
|
2304
2359
|
* Retrieves the number of red bits of `framebuffer`
|
|
2305
2360
|
* @returns the number of bits
|
|
2361
|
+
* @since 1.8
|
|
2306
2362
|
*/
|
|
2307
2363
|
get_red_bits(): number;
|
|
2308
2364
|
|
|
@@ -2320,6 +2376,7 @@ export namespace Cogl {
|
|
|
2320
2376
|
* framebuffer has been allocated the value will reflect the actual
|
|
2321
2377
|
* number of samples that will be made by the GPU.
|
|
2322
2378
|
* @returns The number of point samples made per pixel when rasterizing geometry or 0 if single-sample rendering has been chosen.
|
|
2379
|
+
* @since 1.10
|
|
2323
2380
|
*/
|
|
2324
2381
|
get_samples_per_pixel(): number;
|
|
2325
2382
|
|
|
@@ -2327,6 +2384,7 @@ export namespace Cogl {
|
|
|
2327
2384
|
* Gets the current {@link Cogl.StereoMode}, which defines which stereo buffers
|
|
2328
2385
|
* should be drawn to. See `cogl_framebuffer_set_stereo_mode()`.
|
|
2329
2386
|
* @returns A {@link Cogl.StereoMode}
|
|
2387
|
+
* @since 1.20
|
|
2330
2388
|
*/
|
|
2331
2389
|
get_stereo_mode(): StereoMode;
|
|
2332
2390
|
|
|
@@ -2335,6 +2393,7 @@ export namespace Cogl {
|
|
|
2335
2393
|
* using `cogl_framebuffer_set_viewport()` or the default values which are 0, 0,
|
|
2336
2394
|
* framebuffer_width and framebuffer_height. The values are written into the
|
|
2337
2395
|
* given `viewport` array.
|
|
2396
|
+
* @since 1.8
|
|
2338
2397
|
*/
|
|
2339
2398
|
get_viewport4fv(): number[];
|
|
2340
2399
|
|
|
@@ -2342,6 +2401,7 @@ export namespace Cogl {
|
|
|
2342
2401
|
* Queries the height of the viewport as set using `cogl_framebuffer_set_viewport()`
|
|
2343
2402
|
* or the default value which is the height of the framebuffer.
|
|
2344
2403
|
* @returns The height of the viewport.
|
|
2404
|
+
* @since 1.8
|
|
2345
2405
|
*/
|
|
2346
2406
|
get_viewport_height(): number;
|
|
2347
2407
|
|
|
@@ -2349,6 +2409,7 @@ export namespace Cogl {
|
|
|
2349
2409
|
* Queries the width of the viewport as set using `cogl_framebuffer_set_viewport()`
|
|
2350
2410
|
* or the default value which is the width of the framebuffer.
|
|
2351
2411
|
* @returns The width of the viewport.
|
|
2412
|
+
* @since 1.8
|
|
2352
2413
|
*/
|
|
2353
2414
|
get_viewport_width(): number;
|
|
2354
2415
|
|
|
@@ -2356,6 +2417,7 @@ export namespace Cogl {
|
|
|
2356
2417
|
* Queries the x coordinate of the viewport origin as set using `cogl_framebuffer_set_viewport()`
|
|
2357
2418
|
* or the default value which is 0.
|
|
2358
2419
|
* @returns The x coordinate of the viewport origin.
|
|
2420
|
+
* @since 1.8
|
|
2359
2421
|
*/
|
|
2360
2422
|
get_viewport_x(): number;
|
|
2361
2423
|
|
|
@@ -2363,17 +2425,20 @@ export namespace Cogl {
|
|
|
2363
2425
|
* Queries the y coordinate of the viewport origin as set using `cogl_framebuffer_set_viewport()`
|
|
2364
2426
|
* or the default value which is 0.
|
|
2365
2427
|
* @returns The y coordinate of the viewport origin.
|
|
2428
|
+
* @since 1.8
|
|
2366
2429
|
*/
|
|
2367
2430
|
get_viewport_y(): number;
|
|
2368
2431
|
|
|
2369
2432
|
/**
|
|
2370
2433
|
* Queries the current width of the given `framebuffer`.
|
|
2371
2434
|
* @returns The width of `framebuffer`.
|
|
2435
|
+
* @since 1.8
|
|
2372
2436
|
*/
|
|
2373
2437
|
get_width(): number;
|
|
2374
2438
|
|
|
2375
2439
|
/**
|
|
2376
2440
|
* Resets the current model-view matrix to the identity matrix.
|
|
2441
|
+
* @since 1.10
|
|
2377
2442
|
*/
|
|
2378
2443
|
identity_matrix(): void;
|
|
2379
2444
|
|
|
@@ -2386,6 +2451,7 @@ export namespace Cogl {
|
|
|
2386
2451
|
* @param y_2 The y coordinate for the second horizontal clipping plane
|
|
2387
2452
|
* @param near The <emphasis>distance</emphasis> to the near clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
2388
2453
|
* @param far The <emphasis>distance</emphasis> to the far clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
2454
|
+
* @since 1.10
|
|
2389
2455
|
*/
|
|
2390
2456
|
orthographic(x_1: number, y_1: number, x_2: number, y_2: number, near: number, far: number): void;
|
|
2391
2457
|
|
|
@@ -2401,6 +2467,7 @@ export namespace Cogl {
|
|
|
2401
2467
|
* @param aspect The (width over height) aspect ratio for display
|
|
2402
2468
|
* @param z_near The distance to the near clipping plane (Must be positive, and must not be 0)
|
|
2403
2469
|
* @param z_far The distance to the far clipping plane (Must be positive)
|
|
2470
|
+
* @since 1.10
|
|
2404
2471
|
*/
|
|
2405
2472
|
perspective(fov_y: number, aspect: number, z_near: number, z_far: number): void;
|
|
2406
2473
|
|
|
@@ -2408,17 +2475,20 @@ export namespace Cogl {
|
|
|
2408
2475
|
* Reverts the clipping region to the state before the last call to
|
|
2409
2476
|
* `cogl_framebuffer_push_scissor_clip()`, `cogl_framebuffer_push_rectangle_clip()`
|
|
2410
2477
|
* `cogl_framebuffer_push_path_clip()`, or `cogl_framebuffer_push_primitive_clip()`.
|
|
2478
|
+
* @since 1.10
|
|
2411
2479
|
*/
|
|
2412
2480
|
pop_clip(): void;
|
|
2413
2481
|
|
|
2414
2482
|
/**
|
|
2415
2483
|
* Restores the model-view matrix on the top of the matrix stack.
|
|
2484
|
+
* @since 1.10
|
|
2416
2485
|
*/
|
|
2417
2486
|
pop_matrix(): void;
|
|
2418
2487
|
|
|
2419
2488
|
/**
|
|
2420
2489
|
* Copies the current model-view matrix onto the matrix stack. The matrix
|
|
2421
2490
|
* can later be restored with `cogl_framebuffer_pop_matrix()`.
|
|
2491
|
+
* @since 1.10
|
|
2422
2492
|
*/
|
|
2423
2493
|
push_matrix(): void;
|
|
2424
2494
|
|
|
@@ -2435,6 +2505,7 @@ export namespace Cogl {
|
|
|
2435
2505
|
* @param y_1 y coordinate for top left corner of the clip rectangle
|
|
2436
2506
|
* @param x_2 x coordinate for bottom right corner of the clip rectangle
|
|
2437
2507
|
* @param y_2 y coordinate for bottom right corner of the clip rectangle
|
|
2508
|
+
* @since 1.10
|
|
2438
2509
|
*/
|
|
2439
2510
|
push_rectangle_clip(x_1: number, y_1: number, x_2: number, y_2: number): void;
|
|
2440
2511
|
|
|
@@ -2456,6 +2527,7 @@ export namespace Cogl {
|
|
|
2456
2527
|
* @param y top edge of the clip rectangle in window coordinates
|
|
2457
2528
|
* @param width width of the clip rectangle
|
|
2458
2529
|
* @param height height of the clip rectangle
|
|
2530
|
+
* @since 1.10
|
|
2459
2531
|
*/
|
|
2460
2532
|
push_scissor_clip(x: number, y: number, width: number, height: number): void;
|
|
2461
2533
|
|
|
@@ -2493,6 +2565,7 @@ export namespace Cogl {
|
|
|
2493
2565
|
* @param format The pixel format to store the data in
|
|
2494
2566
|
* @param pixels The address of the buffer to store the data in
|
|
2495
2567
|
* @returns `true` if the read succeeded or `false` otherwise.
|
|
2568
|
+
* @since 1.10
|
|
2496
2569
|
*/
|
|
2497
2570
|
read_pixels(x: number, y: number, width: number, height: number, format: PixelFormat, pixels: number): boolean;
|
|
2498
2571
|
|
|
@@ -2512,6 +2585,7 @@ export namespace Cogl {
|
|
|
2512
2585
|
* @param source Identifies which auxiliary buffer you want to read (only COGL_READ_PIXELS_COLOR_BUFFER supported currently)
|
|
2513
2586
|
* @param bitmap The bitmap to store the results in.
|
|
2514
2587
|
* @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.
|
|
2588
|
+
* @since 1.10
|
|
2515
2589
|
*/
|
|
2516
2590
|
read_pixels_into_bitmap(x: number, y: number, source: ReadPixelsFlags, bitmap: Bitmap): boolean;
|
|
2517
2591
|
|
|
@@ -2536,6 +2610,7 @@ export namespace Cogl {
|
|
|
2536
2610
|
* If you are performing incremental updates to a framebuffer you
|
|
2537
2611
|
* should consider using `cogl_framebuffer_resolve_samples_region()`
|
|
2538
2612
|
* instead to avoid resolving redundant pixels.
|
|
2613
|
+
* @since 1.8
|
|
2539
2614
|
*/
|
|
2540
2615
|
resolve_samples(): void;
|
|
2541
2616
|
|
|
@@ -2565,6 +2640,7 @@ export namespace Cogl {
|
|
|
2565
2640
|
* @param y top-left y coordinate of region to resolve
|
|
2566
2641
|
* @param width width of region to resolve
|
|
2567
2642
|
* @param height height of region to resolve
|
|
2643
|
+
* @since 1.8
|
|
2568
2644
|
*/
|
|
2569
2645
|
resolve_samples_region(x: number, y: number, width: number, height: number): void;
|
|
2570
2646
|
|
|
@@ -2578,6 +2654,7 @@ export namespace Cogl {
|
|
|
2578
2654
|
* @param x X-component of vertex to rotate around.
|
|
2579
2655
|
* @param y Y-component of vertex to rotate around.
|
|
2580
2656
|
* @param z Z-component of vertex to rotate around.
|
|
2657
|
+
* @since 1.10
|
|
2581
2658
|
*/
|
|
2582
2659
|
rotate(angle: number, x: number, y: number, z: number): void;
|
|
2583
2660
|
|
|
@@ -2585,6 +2662,7 @@ export namespace Cogl {
|
|
|
2585
2662
|
* Multiplies the current model-view matrix by one that rotates
|
|
2586
2663
|
* according to the rotation described by `euler`.
|
|
2587
2664
|
* @param euler A {@link Graphene.Euler}
|
|
2665
|
+
* @since 2.0
|
|
2588
2666
|
*/
|
|
2589
2667
|
rotate_euler(euler: Graphene.Euler): void;
|
|
2590
2668
|
|
|
@@ -2594,6 +2672,7 @@ export namespace Cogl {
|
|
|
2594
2672
|
* @param x Amount to scale along the x-axis
|
|
2595
2673
|
* @param y Amount to scale along the y-axis
|
|
2596
2674
|
* @param z Amount to scale along the z-axis
|
|
2675
|
+
* @since 1.10
|
|
2597
2676
|
*/
|
|
2598
2677
|
scale(x: number, y: number, z: number): void;
|
|
2599
2678
|
|
|
@@ -2605,6 +2684,7 @@ export namespace Cogl {
|
|
|
2605
2684
|
*
|
|
2606
2685
|
* Depth buffer writing is enabled by default.
|
|
2607
2686
|
* @param depth_write_enabled `true` to enable depth writing or `false` to disable
|
|
2687
|
+
* @since 1.18
|
|
2608
2688
|
*/
|
|
2609
2689
|
set_depth_write_enabled(depth_write_enabled: boolean): void;
|
|
2610
2690
|
|
|
@@ -2623,18 +2703,21 @@ export namespace Cogl {
|
|
|
2623
2703
|
*
|
|
2624
2704
|
* Dithering is enabled by default.
|
|
2625
2705
|
* @param dither_enabled `true` to enable dithering or `false` to disable
|
|
2706
|
+
* @since 1.8
|
|
2626
2707
|
*/
|
|
2627
2708
|
set_dither_enabled(dither_enabled: boolean): void;
|
|
2628
2709
|
|
|
2629
2710
|
/**
|
|
2630
2711
|
* Sets `matrix` as the new model-view matrix.
|
|
2631
2712
|
* @param matrix the new model-view matrix
|
|
2713
|
+
* @since 1.10
|
|
2632
2714
|
*/
|
|
2633
2715
|
set_modelview_matrix(matrix: Graphene.Matrix): void;
|
|
2634
2716
|
|
|
2635
2717
|
/**
|
|
2636
2718
|
* Sets `matrix` as the new projection matrix.
|
|
2637
2719
|
* @param matrix the new projection matrix
|
|
2720
|
+
* @since 1.10
|
|
2638
2721
|
*/
|
|
2639
2722
|
set_projection_matrix(matrix: Graphene.Matrix): void;
|
|
2640
2723
|
|
|
@@ -2672,6 +2755,7 @@ export namespace Cogl {
|
|
|
2672
2755
|
* framebuffer has changed this can lead to redundant work being
|
|
2673
2756
|
* done.</note>
|
|
2674
2757
|
* @param samples_per_pixel The minimum number of samples per pixel
|
|
2758
|
+
* @since 1.8
|
|
2675
2759
|
*/
|
|
2676
2760
|
set_samples_per_pixel(samples_per_pixel: number): void;
|
|
2677
2761
|
|
|
@@ -2684,6 +2768,7 @@ export namespace Cogl {
|
|
|
2684
2768
|
* enabled. (See `cogl_onscreen_template_set_stereo_enabled()`,
|
|
2685
2769
|
* `cogl_framebuffer_get_is_stereo()`.)
|
|
2686
2770
|
* @param stereo_mode A {@link Cogl.StereoMode} specifying which stereo buffers should be drawn tow.
|
|
2771
|
+
* @since 1.20
|
|
2687
2772
|
*/
|
|
2688
2773
|
set_stereo_mode(stereo_mode: StereoMode): void;
|
|
2689
2774
|
|
|
@@ -2707,12 +2792,14 @@ export namespace Cogl {
|
|
|
2707
2792
|
* @param y The top-left y coordinate of the viewport origin (only integers supported currently)
|
|
2708
2793
|
* @param width The width of the viewport (only integers supported currently)
|
|
2709
2794
|
* @param height The height of the viewport (only integers supported currently)
|
|
2795
|
+
* @since 1.8
|
|
2710
2796
|
*/
|
|
2711
2797
|
set_viewport(x: number, y: number, width: number, height: number): void;
|
|
2712
2798
|
|
|
2713
2799
|
/**
|
|
2714
2800
|
* Multiplies the current model-view matrix by the given matrix.
|
|
2715
2801
|
* @param matrix the matrix to multiply with the current model-view
|
|
2802
|
+
* @since 1.10
|
|
2716
2803
|
*/
|
|
2717
2804
|
transform(matrix: Graphene.Matrix): void;
|
|
2718
2805
|
|
|
@@ -2722,6 +2809,7 @@ export namespace Cogl {
|
|
|
2722
2809
|
* @param x Distance to translate along the x-axis
|
|
2723
2810
|
* @param y Distance to translate along the y-axis
|
|
2724
2811
|
* @param z Distance to translate along the z-axis
|
|
2812
|
+
* @since 1.10
|
|
2725
2813
|
*/
|
|
2726
2814
|
translate(x: number, y: number, z: number): void;
|
|
2727
2815
|
}
|
|
@@ -2895,6 +2983,7 @@ export namespace Cogl {
|
|
|
2895
2983
|
* explicitly checked to determine if Cogl is currently tracking the
|
|
2896
2984
|
* age of {@link Cogl.Onscreen} back buffer contents. If this feature is
|
|
2897
2985
|
* missing then this function will always return 0.</note>
|
|
2986
|
+
* @since 1.14
|
|
2898
2987
|
* @virtual
|
|
2899
2988
|
*/
|
|
2900
2989
|
vfunc_get_buffer_age(): number;
|
|
@@ -2940,6 +3029,7 @@ export namespace Cogl {
|
|
|
2940
3029
|
* @param rectangles An array of integer 4-tuples representing damaged rectangles as (x, y, width, height) tuples.
|
|
2941
3030
|
* @param n_rectangles The number of 4-tuples to be read from `rectangles`
|
|
2942
3031
|
* @param info
|
|
3032
|
+
* @since 1.16
|
|
2943
3033
|
* @virtual
|
|
2944
3034
|
*/
|
|
2945
3035
|
vfunc_swap_buffers_with_damage(rectangles: number, n_rectangles: number, info: FrameInfo): void;
|
|
@@ -2957,6 +3047,7 @@ export namespace Cogl {
|
|
|
2957
3047
|
* @param rectangles An array of integer 4-tuples representing rectangles as (x, y, width, height) tuples.
|
|
2958
3048
|
* @param n_rectangles The number of 4-tuples to be read from `rectangles`
|
|
2959
3049
|
* @param info
|
|
3050
|
+
* @since 1.10
|
|
2960
3051
|
* @virtual
|
|
2961
3052
|
*/
|
|
2962
3053
|
vfunc_swap_region(rectangles: number, n_rectangles: number, info: FrameInfo): void;
|
|
@@ -2982,6 +3073,7 @@ export namespace Cogl {
|
|
|
2982
3073
|
* @param callback A callback function to call for dirty events
|
|
2983
3074
|
* @param destroy An optional callback to destroy `user_data` when the `callback` is removed or `onscreen` is freed.
|
|
2984
3075
|
* @returns a {@link Cogl.OnscreenDirtyClosure} pointer that can be used to remove the callback and associated `user_data` later.
|
|
3076
|
+
* @since 1.16
|
|
2985
3077
|
*/
|
|
2986
3078
|
add_dirty_callback(callback: OnscreenDirtyCallback, destroy: UserDataDestroyCallback | null): OnscreenDirtyClosure;
|
|
2987
3079
|
|
|
@@ -3012,6 +3104,7 @@ export namespace Cogl {
|
|
|
3012
3104
|
* @param callback A callback function to call for frame events
|
|
3013
3105
|
* @param destroy An optional callback to destroy `user_data` when the `callback` is removed or `onscreen` is freed.
|
|
3014
3106
|
* @returns a {@link Cogl.FrameClosure} pointer that can be used to remove the callback and associated `user_data` later.
|
|
3107
|
+
* @since 1.14
|
|
3015
3108
|
*/
|
|
3016
3109
|
add_frame_callback(callback: FrameCallback, destroy: UserDataDestroyCallback | null): FrameClosure;
|
|
3017
3110
|
|
|
@@ -3055,6 +3148,7 @@ export namespace Cogl {
|
|
|
3055
3148
|
* age of {@link Cogl.Onscreen} back buffer contents. If this feature is
|
|
3056
3149
|
* missing then this function will always return 0.</note>
|
|
3057
3150
|
* @returns The age of the buffer contents or 0 when the buffer contents are undefined.
|
|
3151
|
+
* @since 1.14
|
|
3058
3152
|
*/
|
|
3059
3153
|
get_buffer_age(): number;
|
|
3060
3154
|
|
|
@@ -3064,6 +3158,7 @@ export namespace Cogl {
|
|
|
3064
3158
|
* `cogl_onscreen_swap_buffers()` or `cogl_onscreen_swap_region()`
|
|
3065
3159
|
* is called.
|
|
3066
3160
|
* @returns the current frame counter value
|
|
3161
|
+
* @since 1.14
|
|
3067
3162
|
*/
|
|
3068
3163
|
get_frame_counter(): number;
|
|
3069
3164
|
|
|
@@ -3082,6 +3177,7 @@ export namespace Cogl {
|
|
|
3082
3177
|
* requests e.g. to show an already visible window. This also means
|
|
3083
3178
|
* that it's acceptable to alternatively use native APIs to show and
|
|
3084
3179
|
* hide windows without confusing Cogl.</note>
|
|
3180
|
+
* @since 2.0
|
|
3085
3181
|
*/
|
|
3086
3182
|
hide(): void;
|
|
3087
3183
|
|
|
@@ -3093,6 +3189,7 @@ export namespace Cogl {
|
|
|
3093
3189
|
* `cogl_onscreen_add_dirty_callback()` to destroy the user data then
|
|
3094
3190
|
* this will also get called.
|
|
3095
3191
|
* @param closure A {@link Cogl.OnscreenDirtyClosure} returned from `cogl_onscreen_add_dirty_callback()`
|
|
3192
|
+
* @since 1.16
|
|
3096
3193
|
*/
|
|
3097
3194
|
remove_dirty_callback(closure: OnscreenDirtyClosure): void;
|
|
3098
3195
|
|
|
@@ -3104,6 +3201,7 @@ export namespace Cogl {
|
|
|
3104
3201
|
* `cogl_onscreen_add_frame_callback()` to destroy the user data then
|
|
3105
3202
|
* this will get called.
|
|
3106
3203
|
* @param closure A {@link Cogl.FrameClosure} returned from `cogl_onscreen_add_frame_callback()`
|
|
3204
|
+
* @since 1.14
|
|
3107
3205
|
*/
|
|
3108
3206
|
remove_frame_callback(closure: FrameClosure): void;
|
|
3109
3207
|
|
|
@@ -3128,6 +3226,7 @@ export namespace Cogl {
|
|
|
3128
3226
|
* requests e.g. to show an already visible window. This also means
|
|
3129
3227
|
* that it's acceptable to alternatively use native APIs to show and
|
|
3130
3228
|
* hide windows without confusing Cogl.</note>
|
|
3229
|
+
* @since 2.0
|
|
3131
3230
|
*/
|
|
3132
3231
|
show(): void;
|
|
3133
3232
|
|
|
@@ -3147,6 +3246,7 @@ export namespace Cogl {
|
|
|
3147
3246
|
* render a full buffer for every frame.</note>
|
|
3148
3247
|
* @param frame_info
|
|
3149
3248
|
* @param user_data
|
|
3249
|
+
* @since 1.10
|
|
3150
3250
|
*/
|
|
3151
3251
|
swap_buffers(frame_info: FrameInfo, user_data: null): void;
|
|
3152
3252
|
|
|
@@ -3192,6 +3292,7 @@ export namespace Cogl {
|
|
|
3192
3292
|
* @param n_rectangles The number of 4-tuples to be read from `rectangles`
|
|
3193
3293
|
* @param info
|
|
3194
3294
|
* @param user_data
|
|
3295
|
+
* @since 1.16
|
|
3195
3296
|
*/
|
|
3196
3297
|
swap_buffers_with_damage(rectangles: number, n_rectangles: number, info: FrameInfo, user_data: null): void;
|
|
3197
3298
|
|
|
@@ -3209,6 +3310,7 @@ export namespace Cogl {
|
|
|
3209
3310
|
* @param n_rectangles The number of 4-tuples to be read from `rectangles`
|
|
3210
3311
|
* @param info
|
|
3211
3312
|
* @param user_data
|
|
3313
|
+
* @since 1.10
|
|
3212
3314
|
*/
|
|
3213
3315
|
swap_region(rectangles: number, n_rectangles: number, info: FrameInfo, user_data: null): void;
|
|
3214
3316
|
}
|
|
@@ -3254,32 +3356,38 @@ export namespace Cogl {
|
|
|
3254
3356
|
* keep track of a pipelines ancestry which we may use to help minimize GPU
|
|
3255
3357
|
* state changes.
|
|
3256
3358
|
* @returns a pointer to the newly allocated {@link Cogl.Pipeline}
|
|
3359
|
+
* @since 2.0
|
|
3257
3360
|
*/
|
|
3258
3361
|
copy(): Pipeline;
|
|
3259
3362
|
|
|
3260
3363
|
/**
|
|
3261
3364
|
* Iterates all the layer indices of the given `pipeline`.
|
|
3262
3365
|
* @param callback A {@link Cogl.PipelineLayerCallback} to be called for each layer index
|
|
3366
|
+
* @since 2.0
|
|
3263
3367
|
*/
|
|
3264
3368
|
foreach_layer(callback: PipelineLayerCallback): void;
|
|
3265
3369
|
|
|
3266
3370
|
/**
|
|
3267
3371
|
* @returns The alpha test function of `pipeline`.
|
|
3372
|
+
* @since 2.0
|
|
3268
3373
|
*/
|
|
3269
3374
|
get_alpha_test_function(): PipelineAlphaFunc;
|
|
3270
3375
|
|
|
3271
3376
|
/**
|
|
3272
3377
|
* @returns The alpha test reference value of `pipeline`.
|
|
3378
|
+
* @since 2.0
|
|
3273
3379
|
*/
|
|
3274
3380
|
get_alpha_test_reference(): number;
|
|
3275
3381
|
|
|
3276
3382
|
/**
|
|
3277
3383
|
* Retrieves the current pipeline color.
|
|
3384
|
+
* @since 2.0
|
|
3278
3385
|
*/
|
|
3279
3386
|
get_color(): Color;
|
|
3280
3387
|
|
|
3281
3388
|
/**
|
|
3282
3389
|
* @returns the cull face mode that was previously set with `cogl_pipeline_set_cull_face_mode()`. Status: Unstable
|
|
3390
|
+
* @since 2.0
|
|
3283
3391
|
*/
|
|
3284
3392
|
get_cull_face_mode(): PipelineCullFaceMode;
|
|
3285
3393
|
|
|
@@ -3292,6 +3400,7 @@ export namespace Cogl {
|
|
|
3292
3400
|
* {@link Cogl.Winding.CLOCKWISE} sets them to be clockwise. The default is
|
|
3293
3401
|
* {@link Cogl.Winding.COUNTER_CLOCKWISE}.
|
|
3294
3402
|
* @returns The `pipeline` front face winding Status: Unstable
|
|
3403
|
+
* @since 2.0
|
|
3295
3404
|
*/
|
|
3296
3405
|
get_front_face_winding(): Winding;
|
|
3297
3406
|
|
|
@@ -3304,6 +3413,7 @@ export namespace Cogl {
|
|
|
3304
3413
|
* changed using `cogl_pipeline_set_layer_filters()`.
|
|
3305
3414
|
* @param layer_index the layer number to change.
|
|
3306
3415
|
* @returns The magnification {@link Cogl.PipelineFilter} for the specified layer.
|
|
3416
|
+
* @since 1.10
|
|
3307
3417
|
*/
|
|
3308
3418
|
get_layer_mag_filter(layer_index: number): PipelineFilter;
|
|
3309
3419
|
|
|
@@ -3316,6 +3426,7 @@ export namespace Cogl {
|
|
|
3316
3426
|
* changed using `cogl_pipeline_set_layer_filters()`.
|
|
3317
3427
|
* @param layer_index the layer number to change.
|
|
3318
3428
|
* @returns The minification {@link Cogl.PipelineFilter} for the specified layer.
|
|
3429
|
+
* @since 1.10
|
|
3319
3430
|
*/
|
|
3320
3431
|
get_layer_min_filter(layer_index: number): PipelineFilter;
|
|
3321
3432
|
|
|
@@ -3324,12 +3435,14 @@ export namespace Cogl {
|
|
|
3324
3435
|
* texture layer.
|
|
3325
3436
|
* @param layer_index the layer number to check.
|
|
3326
3437
|
* @returns whether the texture coordinates will be replaced with point sprite coordinates.
|
|
3438
|
+
* @since 2.0
|
|
3327
3439
|
*/
|
|
3328
3440
|
get_layer_point_sprite_coords_enabled(layer_index: number): boolean;
|
|
3329
3441
|
|
|
3330
3442
|
/**
|
|
3331
3443
|
* @param layer_index the index of the layer
|
|
3332
3444
|
* @returns the texture that was set for the given layer of the pipeline or `null` if no texture was set.
|
|
3445
|
+
* @since 1.10
|
|
3333
3446
|
*/
|
|
3334
3447
|
get_layer_texture(layer_index: number): Texture;
|
|
3335
3448
|
|
|
@@ -3338,6 +3451,7 @@ export namespace Cogl {
|
|
|
3338
3451
|
* layer.
|
|
3339
3452
|
* @param layer_index the layer number to change.
|
|
3340
3453
|
* @returns the wrap mode for the 's' coordinate of texture lookups on this layer.
|
|
3454
|
+
* @since 1.6
|
|
3341
3455
|
*/
|
|
3342
3456
|
get_layer_wrap_mode_s(layer_index: number): PipelineWrapMode;
|
|
3343
3457
|
|
|
@@ -3346,17 +3460,20 @@ export namespace Cogl {
|
|
|
3346
3460
|
* layer.
|
|
3347
3461
|
* @param layer_index the layer number to change.
|
|
3348
3462
|
* @returns the wrap mode for the 't' coordinate of texture lookups on this layer.
|
|
3463
|
+
* @since 1.6
|
|
3349
3464
|
*/
|
|
3350
3465
|
get_layer_wrap_mode_t(layer_index: number): PipelineWrapMode;
|
|
3351
3466
|
|
|
3352
3467
|
/**
|
|
3353
3468
|
* Retrieves the number of layers defined for the given `pipeline`
|
|
3354
3469
|
* @returns the number of layers
|
|
3470
|
+
* @since 2.0
|
|
3355
3471
|
*/
|
|
3356
3472
|
get_n_layers(): number;
|
|
3357
3473
|
|
|
3358
3474
|
/**
|
|
3359
3475
|
* @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()`.
|
|
3476
|
+
* @since 2.0
|
|
3360
3477
|
*/
|
|
3361
3478
|
get_per_vertex_point_size(): boolean;
|
|
3362
3479
|
|
|
@@ -3364,6 +3481,7 @@ export namespace Cogl {
|
|
|
3364
3481
|
* Get the size of points drawn when {@link Cogl.VerticesMode.POINTS} is
|
|
3365
3482
|
* used with the vertex buffer API.
|
|
3366
3483
|
* @returns the point size of the `pipeline`.
|
|
3484
|
+
* @since 2.0
|
|
3367
3485
|
*/
|
|
3368
3486
|
get_point_size(): number;
|
|
3369
3487
|
|
|
@@ -3379,6 +3497,7 @@ export namespace Cogl {
|
|
|
3379
3497
|
* before calling this function.
|
|
3380
3498
|
* @param uniform_name The name of a uniform
|
|
3381
3499
|
* @returns A integer representing the location of the given uniform.
|
|
3500
|
+
* @since 2.0
|
|
3382
3501
|
*/
|
|
3383
3502
|
get_uniform_location(uniform_name: string): number;
|
|
3384
3503
|
|
|
@@ -3386,12 +3505,14 @@ export namespace Cogl {
|
|
|
3386
3505
|
* Queries what user program has been associated with the given
|
|
3387
3506
|
* `pipeline` using `cogl_pipeline_set_user_program()`.
|
|
3388
3507
|
* @returns The current user program or `null`.
|
|
3508
|
+
* @since 2.0
|
|
3389
3509
|
*/
|
|
3390
3510
|
get_user_program(): Handle;
|
|
3391
3511
|
|
|
3392
3512
|
/**
|
|
3393
3513
|
* This function removes a layer from your pipeline
|
|
3394
3514
|
* @param layer_index Specifies the layer you want to remove
|
|
3515
|
+
* @since 1.10
|
|
3395
3516
|
*/
|
|
3396
3517
|
remove_layer(layer_index: number): void;
|
|
3397
3518
|
|
|
@@ -3405,6 +3526,7 @@ export namespace Cogl {
|
|
|
3405
3526
|
* The default is {@link Cogl.PipelineAlphaFunc.ALWAYS}
|
|
3406
3527
|
* @param alpha_func A `CoglPipelineAlphaFunc` constant
|
|
3407
3528
|
* @param alpha_reference A reference point that the chosen alpha function uses to compare incoming fragments to.
|
|
3529
|
+
* @since 2.0
|
|
3408
3530
|
*/
|
|
3409
3531
|
set_alpha_test_function(alpha_func: PipelineAlphaFunc, alpha_reference: number): void;
|
|
3410
3532
|
|
|
@@ -3476,6 +3598,8 @@ export namespace Cogl {
|
|
|
3476
3598
|
* is in premultiplied form.
|
|
3477
3599
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired blend function.
|
|
3478
3600
|
* @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).
|
|
3601
|
+
* @since 2.0
|
|
3602
|
+
* @throws GLib.Error
|
|
3479
3603
|
*/
|
|
3480
3604
|
set_blend(blend_string: string): boolean;
|
|
3481
3605
|
|
|
@@ -3483,6 +3607,7 @@ export namespace Cogl {
|
|
|
3483
3607
|
* When blending is setup to reference a CONSTANT blend factor then
|
|
3484
3608
|
* blending will depend on the constant set with this function.
|
|
3485
3609
|
* @param constant_color The constant color you want
|
|
3610
|
+
* @since 2.0
|
|
3486
3611
|
*/
|
|
3487
3612
|
set_blend_constant(constant_color: Color): void;
|
|
3488
3613
|
|
|
@@ -3496,6 +3621,7 @@ export namespace Cogl {
|
|
|
3496
3621
|
*
|
|
3497
3622
|
* The default value is (1.0, 1.0, 1.0, 1.0)
|
|
3498
3623
|
* @param color The components of the color
|
|
3624
|
+
* @since 2.0
|
|
3499
3625
|
*/
|
|
3500
3626
|
set_color(color: Color): void;
|
|
3501
3627
|
|
|
@@ -3507,6 +3633,7 @@ export namespace Cogl {
|
|
|
3507
3633
|
* @param green The green component
|
|
3508
3634
|
* @param blue The blue component
|
|
3509
3635
|
* @param alpha The alpha component
|
|
3636
|
+
* @since 2.0
|
|
3510
3637
|
*/
|
|
3511
3638
|
set_color4f(red: number, green: number, blue: number, alpha: number): void;
|
|
3512
3639
|
|
|
@@ -3518,6 +3645,7 @@ export namespace Cogl {
|
|
|
3518
3645
|
* @param green The green component
|
|
3519
3646
|
* @param blue The blue component
|
|
3520
3647
|
* @param alpha The alpha component
|
|
3648
|
+
* @since 2.0
|
|
3521
3649
|
*/
|
|
3522
3650
|
set_color4ub(red: number, green: number, blue: number, alpha: number): void;
|
|
3523
3651
|
|
|
@@ -3537,6 +3665,7 @@ export namespace Cogl {
|
|
|
3537
3665
|
*
|
|
3538
3666
|
* Status: Unstable
|
|
3539
3667
|
* @param cull_face_mode The new mode to set
|
|
3668
|
+
* @since 2.0
|
|
3540
3669
|
*/
|
|
3541
3670
|
set_cull_face_mode(cull_face_mode: PipelineCullFaceMode): void;
|
|
3542
3671
|
|
|
@@ -3551,6 +3680,7 @@ export namespace Cogl {
|
|
|
3551
3680
|
*
|
|
3552
3681
|
* Status: Unstable
|
|
3553
3682
|
* @param front_winding the winding order
|
|
3683
|
+
* @since 2.0
|
|
3554
3684
|
*/
|
|
3555
3685
|
set_front_face_winding(front_winding: Winding): void;
|
|
3556
3686
|
|
|
@@ -3634,6 +3764,8 @@ export namespace Cogl {
|
|
|
3634
3764
|
* @param layer_index Specifies the layer you want define a combine function for
|
|
3635
3765
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired texture combine function.
|
|
3636
3766
|
* @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
|
|
3767
|
+
* @since 2.0
|
|
3768
|
+
* @throws GLib.Error
|
|
3637
3769
|
*/
|
|
3638
3770
|
set_layer_combine(layer_index: number, blend_string: string): boolean;
|
|
3639
3771
|
|
|
@@ -3642,6 +3774,7 @@ export namespace Cogl {
|
|
|
3642
3774
|
* description then you can use this function to define its value.
|
|
3643
3775
|
* @param layer_index Specifies the layer you want to specify a constant used for texture combining
|
|
3644
3776
|
* @param constant The constant color you want
|
|
3777
|
+
* @since 2.0
|
|
3645
3778
|
*/
|
|
3646
3779
|
set_layer_combine_constant(layer_index: number, constant: Color): void;
|
|
3647
3780
|
|
|
@@ -3656,6 +3789,7 @@ export namespace Cogl {
|
|
|
3656
3789
|
* @param layer_index the layer number to change.
|
|
3657
3790
|
* @param min_filter the filter used when scaling a texture down.
|
|
3658
3791
|
* @param mag_filter the filter used when magnifying a texture.
|
|
3792
|
+
* @since 1.10
|
|
3659
3793
|
*/
|
|
3660
3794
|
set_layer_filters(layer_index: number, min_filter: PipelineFilter, mag_filter: PipelineFilter): void;
|
|
3661
3795
|
|
|
@@ -3664,6 +3798,7 @@ export namespace Cogl {
|
|
|
3664
3798
|
* and rotate a single layer of a pipeline used to fill your geometry.
|
|
3665
3799
|
* @param layer_index the index for the layer inside `pipeline`
|
|
3666
3800
|
* @param matrix the transformation matrix for the layer
|
|
3801
|
+
* @since 1.10
|
|
3667
3802
|
*/
|
|
3668
3803
|
set_layer_matrix(layer_index: number, matrix: Graphene.Matrix): void;
|
|
3669
3804
|
|
|
@@ -3683,6 +3818,7 @@ export namespace Cogl {
|
|
|
3683
3818
|
* specify the texture type so that any pipeline copies can share the
|
|
3684
3819
|
* internal texture type state for efficiency.
|
|
3685
3820
|
* @param layer_index The layer number to modify
|
|
3821
|
+
* @since 1.10
|
|
3686
3822
|
*/
|
|
3687
3823
|
set_layer_null_texture(layer_index: number): void;
|
|
3688
3824
|
|
|
@@ -3696,6 +3832,8 @@ export namespace Cogl {
|
|
|
3696
3832
|
* @param layer_index the layer number to change.
|
|
3697
3833
|
* @param enable whether to enable point sprite coord generation.
|
|
3698
3834
|
* @returns `true` if the function succeeds, `false` otherwise.
|
|
3835
|
+
* @since 2.0
|
|
3836
|
+
* @throws GLib.Error
|
|
3699
3837
|
*/
|
|
3700
3838
|
set_layer_point_sprite_coords_enabled(layer_index: number, enable: boolean): boolean;
|
|
3701
3839
|
|
|
@@ -3712,6 +3850,7 @@ export namespace Cogl {
|
|
|
3712
3850
|
* `cogl_pipeline_set_layer_wrap_mode_t()` separately.
|
|
3713
3851
|
* @param layer_index the layer number to change.
|
|
3714
3852
|
* @param mode the new wrap mode
|
|
3853
|
+
* @since 2.0
|
|
3715
3854
|
*/
|
|
3716
3855
|
set_layer_wrap_mode(layer_index: number, mode: PipelineWrapMode): void;
|
|
3717
3856
|
|
|
@@ -3719,6 +3858,7 @@ export namespace Cogl {
|
|
|
3719
3858
|
* Sets the wrap mode for the 's' coordinate of texture lookups on this layer.
|
|
3720
3859
|
* @param layer_index the layer number to change.
|
|
3721
3860
|
* @param mode the new wrap mode
|
|
3861
|
+
* @since 2.0
|
|
3722
3862
|
*/
|
|
3723
3863
|
set_layer_wrap_mode_s(layer_index: number, mode: PipelineWrapMode): void;
|
|
3724
3864
|
|
|
@@ -3726,6 +3866,7 @@ export namespace Cogl {
|
|
|
3726
3866
|
* Sets the wrap mode for the 't' coordinate of texture lookups on this layer.
|
|
3727
3867
|
* @param layer_index the layer number to change.
|
|
3728
3868
|
* @param mode the new wrap mode
|
|
3869
|
+
* @since 2.0
|
|
3729
3870
|
*/
|
|
3730
3871
|
set_layer_wrap_mode_t(layer_index: number, mode: PipelineWrapMode): void;
|
|
3731
3872
|
|
|
@@ -3742,6 +3883,8 @@ export namespace Cogl {
|
|
|
3742
3883
|
* undefined.
|
|
3743
3884
|
* @param enable whether to enable per-vertex point size
|
|
3744
3885
|
* @returns `true` if the change succeeded or `false` otherwise
|
|
3886
|
+
* @since 2.0
|
|
3887
|
+
* @throws GLib.Error
|
|
3745
3888
|
*/
|
|
3746
3889
|
set_per_vertex_point_size(enable: boolean): boolean;
|
|
3747
3890
|
|
|
@@ -3759,6 +3902,7 @@ export namespace Cogl {
|
|
|
3759
3902
|
* if an application wants to draw points it must make sure to use a
|
|
3760
3903
|
* pipeline that has an explicit point size set on it.
|
|
3761
3904
|
* @param point_size the new point size.
|
|
3905
|
+
* @since 2.0
|
|
3762
3906
|
*/
|
|
3763
3907
|
set_point_size(point_size: number): void;
|
|
3764
3908
|
|
|
@@ -3775,6 +3919,7 @@ export namespace Cogl {
|
|
|
3775
3919
|
* uniform.
|
|
3776
3920
|
* @param uniform_location The uniform's location identifier
|
|
3777
3921
|
* @param value The new value for the uniform
|
|
3922
|
+
* @since 2.0
|
|
3778
3923
|
*/
|
|
3779
3924
|
set_uniform_1f(uniform_location: number, value: number): void;
|
|
3780
3925
|
|
|
@@ -3791,6 +3936,7 @@ export namespace Cogl {
|
|
|
3791
3936
|
* uniform or a sampler uniform.
|
|
3792
3937
|
* @param uniform_location The uniform's location identifier
|
|
3793
3938
|
* @param value The new value for the uniform
|
|
3939
|
+
* @since 2.0
|
|
3794
3940
|
*/
|
|
3795
3941
|
set_uniform_1i(uniform_location: number, value: number): void;
|
|
3796
3942
|
|
|
@@ -3811,6 +3957,7 @@ export namespace Cogl {
|
|
|
3811
3957
|
* @param n_components The number of components in the corresponding uniform's type
|
|
3812
3958
|
* @param count The number of values to set
|
|
3813
3959
|
* @param value Pointer to the new values to set
|
|
3960
|
+
* @since 2.0
|
|
3814
3961
|
*/
|
|
3815
3962
|
set_uniform_float(uniform_location: number, n_components: number, count: number, value: number): void;
|
|
3816
3963
|
|
|
@@ -3831,6 +3978,7 @@ export namespace Cogl {
|
|
|
3831
3978
|
* @param n_components The number of components in the corresponding uniform's type
|
|
3832
3979
|
* @param count The number of values to set
|
|
3833
3980
|
* @param value Pointer to the new values to set
|
|
3981
|
+
* @since 2.0
|
|
3834
3982
|
*/
|
|
3835
3983
|
set_uniform_int(uniform_location: number, n_components: number, count: number, value: number): void;
|
|
3836
3984
|
|
|
@@ -3857,6 +4005,7 @@ export namespace Cogl {
|
|
|
3857
4005
|
* @param count The number of values to set
|
|
3858
4006
|
* @param transpose Whether to transpose the matrix
|
|
3859
4007
|
* @param value Pointer to the new values to set
|
|
4008
|
+
* @since 2.0
|
|
3860
4009
|
*/
|
|
3861
4010
|
set_uniform_matrix(uniform_location: number, dimensions: number, count: number, transpose: boolean, value: number): void;
|
|
3862
4011
|
|
|
@@ -3897,6 +4046,7 @@ export namespace Cogl {
|
|
|
3897
4046
|
* meantime we hope this will handle most practical GLSL and ARBfp
|
|
3898
4047
|
* requirements.
|
|
3899
4048
|
* @param program A {@link Cogl.Handle} to a linked CoglProgram
|
|
4049
|
+
* @since 2.0
|
|
3900
4050
|
*/
|
|
3901
4051
|
set_user_program(program: Handle): void;
|
|
3902
4052
|
}
|
|
@@ -3952,6 +4102,7 @@ export namespace Cogl {
|
|
|
3952
4102
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
3953
4103
|
* framebuffer and rendered too.</note>
|
|
3954
4104
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
4105
|
+
* @throws GLib.Error
|
|
3955
4106
|
*/
|
|
3956
4107
|
allocate(): boolean;
|
|
3957
4108
|
|
|
@@ -3963,6 +4114,7 @@ export namespace Cogl {
|
|
|
3963
4114
|
* is {@link Cogl.TextureComponents.RGBA}. The other constructors which take
|
|
3964
4115
|
* a %CoglBitmap or a data pointer default to the same components as
|
|
3965
4116
|
* the pixel format of the data.
|
|
4117
|
+
* @since 1.18
|
|
3966
4118
|
*/
|
|
3967
4119
|
get_components(): TextureComponents;
|
|
3968
4120
|
|
|
@@ -4009,6 +4161,7 @@ export namespace Cogl {
|
|
|
4009
4161
|
*
|
|
4010
4162
|
* By default the pre-multipled state is `TRUE`.
|
|
4011
4163
|
* @returns `true` if red, green and blue components are internally stored pre-multiplied by the alpha value or `false` if not.
|
|
4164
|
+
* @since 1.18
|
|
4012
4165
|
*/
|
|
4013
4166
|
get_premultiplied(): boolean;
|
|
4014
4167
|
|
|
@@ -4041,6 +4194,8 @@ export namespace Cogl {
|
|
|
4041
4194
|
* @param sub_width Width in pixels of the subregion
|
|
4042
4195
|
* @param sub_height Height in pixels of the subregion
|
|
4043
4196
|
* @returns A newly created {@link Cogl.Texture} or `null` on failure
|
|
4197
|
+
* @since 1.2
|
|
4198
|
+
* @deprecated since 1.18: Use `cogl_sub_texture_new()`
|
|
4044
4199
|
*/
|
|
4045
4200
|
new_from_sub_texture(sub_x: number, sub_y: number, sub_width: number, sub_height: number): Texture;
|
|
4046
4201
|
|
|
@@ -4065,6 +4220,7 @@ export namespace Cogl {
|
|
|
4065
4220
|
* an image format as long as {@link Cogl.TextureComponents.RG} isn't used
|
|
4066
4221
|
* as the texture's components.
|
|
4067
4222
|
* @param components
|
|
4223
|
+
* @since 1.18
|
|
4068
4224
|
*/
|
|
4069
4225
|
set_components(components: TextureComponents): void;
|
|
4070
4226
|
|
|
@@ -4116,6 +4272,7 @@ export namespace Cogl {
|
|
|
4116
4272
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
4117
4273
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
4118
4274
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
4275
|
+
* @throws GLib.Error
|
|
4119
4276
|
*/
|
|
4120
4277
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
4121
4278
|
|
|
@@ -4142,6 +4299,7 @@ export namespace Cogl {
|
|
|
4142
4299
|
*
|
|
4143
4300
|
* By default the `premultipled` state is `TRUE`.
|
|
4144
4301
|
* @param premultiplied Whether any internally stored red, green or blue components are pre-multiplied by an alpha component.
|
|
4302
|
+
* @since 1.18
|
|
4145
4303
|
*/
|
|
4146
4304
|
set_premultiplied(premultiplied: boolean): void;
|
|
4147
4305
|
|
|
@@ -4179,6 +4337,7 @@ export namespace Cogl {
|
|
|
4179
4337
|
* @param dst_height height of destination region to write. (Must be less than or equal to the bitmap height)
|
|
4180
4338
|
* @param bitmap The source bitmap to read from
|
|
4181
4339
|
* @returns `true` if the subregion upload was successful, and `false` otherwise
|
|
4340
|
+
* @since 1.8
|
|
4182
4341
|
*/
|
|
4183
4342
|
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;
|
|
4184
4343
|
}
|
|
@@ -4226,6 +4385,7 @@ export namespace Cogl {
|
|
|
4226
4385
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
4227
4386
|
* framebuffer and rendered too.</note>
|
|
4228
4387
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
4388
|
+
* @throws GLib.Error
|
|
4229
4389
|
*/
|
|
4230
4390
|
allocate(): boolean;
|
|
4231
4391
|
|
|
@@ -4237,6 +4397,7 @@ export namespace Cogl {
|
|
|
4237
4397
|
* is {@link Cogl.TextureComponents.RGBA}. The other constructors which take
|
|
4238
4398
|
* a %CoglBitmap or a data pointer default to the same components as
|
|
4239
4399
|
* the pixel format of the data.
|
|
4400
|
+
* @since 1.18
|
|
4240
4401
|
*/
|
|
4241
4402
|
get_components(): TextureComponents;
|
|
4242
4403
|
|
|
@@ -4283,6 +4444,7 @@ export namespace Cogl {
|
|
|
4283
4444
|
*
|
|
4284
4445
|
* By default the pre-multipled state is `TRUE`.
|
|
4285
4446
|
* @returns `true` if red, green and blue components are internally stored pre-multiplied by the alpha value or `false` if not.
|
|
4447
|
+
* @since 1.18
|
|
4286
4448
|
*/
|
|
4287
4449
|
get_premultiplied(): boolean;
|
|
4288
4450
|
|
|
@@ -4315,6 +4477,8 @@ export namespace Cogl {
|
|
|
4315
4477
|
* @param sub_width Width in pixels of the subregion
|
|
4316
4478
|
* @param sub_height Height in pixels of the subregion
|
|
4317
4479
|
* @returns A newly created {@link Cogl.Texture} or `null` on failure
|
|
4480
|
+
* @since 1.2
|
|
4481
|
+
* @deprecated since 1.18: Use `cogl_sub_texture_new()`
|
|
4318
4482
|
*/
|
|
4319
4483
|
new_from_sub_texture(sub_x: number, sub_y: number, sub_width: number, sub_height: number): Texture;
|
|
4320
4484
|
|
|
@@ -4339,6 +4503,7 @@ export namespace Cogl {
|
|
|
4339
4503
|
* an image format as long as {@link Cogl.TextureComponents.RG} isn't used
|
|
4340
4504
|
* as the texture's components.
|
|
4341
4505
|
* @param components
|
|
4506
|
+
* @since 1.18
|
|
4342
4507
|
*/
|
|
4343
4508
|
set_components(components: TextureComponents): void;
|
|
4344
4509
|
|
|
@@ -4390,6 +4555,7 @@ export namespace Cogl {
|
|
|
4390
4555
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
4391
4556
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
4392
4557
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
4558
|
+
* @throws GLib.Error
|
|
4393
4559
|
*/
|
|
4394
4560
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
4395
4561
|
|
|
@@ -4416,6 +4582,7 @@ export namespace Cogl {
|
|
|
4416
4582
|
*
|
|
4417
4583
|
* By default the `premultipled` state is `TRUE`.
|
|
4418
4584
|
* @param premultiplied Whether any internally stored red, green or blue components are pre-multiplied by an alpha component.
|
|
4585
|
+
* @since 1.18
|
|
4419
4586
|
*/
|
|
4420
4587
|
set_premultiplied(premultiplied: boolean): void;
|
|
4421
4588
|
|
|
@@ -4453,6 +4620,7 @@ export namespace Cogl {
|
|
|
4453
4620
|
* @param dst_height height of destination region to write. (Must be less than or equal to the bitmap height)
|
|
4454
4621
|
* @param bitmap The source bitmap to read from
|
|
4455
4622
|
* @returns `true` if the subregion upload was successful, and `false` otherwise
|
|
4623
|
+
* @since 1.8
|
|
4456
4624
|
*/
|
|
4457
4625
|
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;
|
|
4458
4626
|
}
|
|
@@ -4481,6 +4649,7 @@ export namespace Cogl {
|
|
|
4481
4649
|
* parameter, when using {@link Cogl.Color}<!-- -->s as keys in a {@link GLib.HashTable}.
|
|
4482
4650
|
* @param v1 a {@link Cogl.Color}
|
|
4483
4651
|
* @param v2 a {@link Cogl.Color}
|
|
4652
|
+
* @since 1.0
|
|
4484
4653
|
*/
|
|
4485
4654
|
static equal(v1: null, v2: null): boolean;
|
|
4486
4655
|
|
|
@@ -4490,6 +4659,7 @@ export namespace Cogl {
|
|
|
4490
4659
|
* @param hue hue value, in the 0 .. 360 range
|
|
4491
4660
|
* @param saturation saturation value, in the 0 .. 1 range
|
|
4492
4661
|
* @param luminance luminance value, in the 0 .. 1 range
|
|
4662
|
+
* @since 1.16
|
|
4493
4663
|
*/
|
|
4494
4664
|
static init_from_hsl(hue: number, saturation: number, luminance: number): Color;
|
|
4495
4665
|
|
|
@@ -4497,11 +4667,13 @@ export namespace Cogl {
|
|
|
4497
4667
|
/**
|
|
4498
4668
|
* Creates a copy of `color`
|
|
4499
4669
|
* @returns a newly-allocated {@link Cogl.Color}. Use `cogl_color_free()` to free the allocate resources
|
|
4670
|
+
* @since 1.0
|
|
4500
4671
|
*/
|
|
4501
4672
|
copy(): Color;
|
|
4502
4673
|
|
|
4503
4674
|
/**
|
|
4504
4675
|
* Frees the resources allocated by `cogl_color_new()` and `cogl_color_copy()`
|
|
4676
|
+
* @since 1.0
|
|
4505
4677
|
*/
|
|
4506
4678
|
free(): void;
|
|
4507
4679
|
|
|
@@ -4509,6 +4681,7 @@ export namespace Cogl {
|
|
|
4509
4681
|
* Retrieves the alpha channel of `color` as a fixed point
|
|
4510
4682
|
* value between 0 and 1.0.
|
|
4511
4683
|
* @returns the alpha channel of the passed color
|
|
4684
|
+
* @since 1.0
|
|
4512
4685
|
*/
|
|
4513
4686
|
get_alpha(): number;
|
|
4514
4687
|
|
|
@@ -4516,6 +4689,7 @@ export namespace Cogl {
|
|
|
4516
4689
|
* Retrieves the alpha channel of `color` as a byte value
|
|
4517
4690
|
* between 0 and 255
|
|
4518
4691
|
* @returns the alpha channel of the passed color
|
|
4692
|
+
* @since 1.0
|
|
4519
4693
|
*/
|
|
4520
4694
|
get_alpha_byte(): number;
|
|
4521
4695
|
|
|
@@ -4523,6 +4697,7 @@ export namespace Cogl {
|
|
|
4523
4697
|
* Retrieves the alpha channel of `color` as a floating point
|
|
4524
4698
|
* value between 0.0 and 1.0
|
|
4525
4699
|
* @returns the alpha channel of the passed color
|
|
4700
|
+
* @since 1.0
|
|
4526
4701
|
*/
|
|
4527
4702
|
get_alpha_float(): number;
|
|
4528
4703
|
|
|
@@ -4530,6 +4705,7 @@ export namespace Cogl {
|
|
|
4530
4705
|
* Retrieves the blue channel of `color` as a fixed point
|
|
4531
4706
|
* value between 0 and 1.0.
|
|
4532
4707
|
* @returns the blue channel of the passed color
|
|
4708
|
+
* @since 1.0
|
|
4533
4709
|
*/
|
|
4534
4710
|
get_blue(): number;
|
|
4535
4711
|
|
|
@@ -4537,6 +4713,7 @@ export namespace Cogl {
|
|
|
4537
4713
|
* Retrieves the blue channel of `color` as a byte value
|
|
4538
4714
|
* between 0 and 255
|
|
4539
4715
|
* @returns the blue channel of the passed color
|
|
4716
|
+
* @since 1.0
|
|
4540
4717
|
*/
|
|
4541
4718
|
get_blue_byte(): number;
|
|
4542
4719
|
|
|
@@ -4544,6 +4721,7 @@ export namespace Cogl {
|
|
|
4544
4721
|
* Retrieves the blue channel of `color` as a floating point
|
|
4545
4722
|
* value between 0.0 and 1.0
|
|
4546
4723
|
* @returns the blue channel of the passed color
|
|
4724
|
+
* @since 1.0
|
|
4547
4725
|
*/
|
|
4548
4726
|
get_blue_float(): number;
|
|
4549
4727
|
|
|
@@ -4551,6 +4729,7 @@ export namespace Cogl {
|
|
|
4551
4729
|
* Retrieves the green channel of `color` as a fixed point
|
|
4552
4730
|
* value between 0 and 1.0.
|
|
4553
4731
|
* @returns the green channel of the passed color
|
|
4732
|
+
* @since 1.0
|
|
4554
4733
|
*/
|
|
4555
4734
|
get_green(): number;
|
|
4556
4735
|
|
|
@@ -4558,6 +4737,7 @@ export namespace Cogl {
|
|
|
4558
4737
|
* Retrieves the green channel of `color` as a byte value
|
|
4559
4738
|
* between 0 and 255
|
|
4560
4739
|
* @returns the green channel of the passed color
|
|
4740
|
+
* @since 1.0
|
|
4561
4741
|
*/
|
|
4562
4742
|
get_green_byte(): number;
|
|
4563
4743
|
|
|
@@ -4565,6 +4745,7 @@ export namespace Cogl {
|
|
|
4565
4745
|
* Retrieves the green channel of `color` as a floating point
|
|
4566
4746
|
* value between 0.0 and 1.0
|
|
4567
4747
|
* @returns the green channel of the passed color
|
|
4748
|
+
* @since 1.0
|
|
4568
4749
|
*/
|
|
4569
4750
|
get_green_float(): number;
|
|
4570
4751
|
|
|
@@ -4572,6 +4753,7 @@ export namespace Cogl {
|
|
|
4572
4753
|
* Retrieves the red channel of `color` as a fixed point
|
|
4573
4754
|
* value between 0 and 1.0.
|
|
4574
4755
|
* @returns the red channel of the passed color
|
|
4756
|
+
* @since 1.0
|
|
4575
4757
|
*/
|
|
4576
4758
|
get_red(): number;
|
|
4577
4759
|
|
|
@@ -4579,6 +4761,7 @@ export namespace Cogl {
|
|
|
4579
4761
|
* Retrieves the red channel of `color` as a byte value
|
|
4580
4762
|
* between 0 and 255
|
|
4581
4763
|
* @returns the red channel of the passed color
|
|
4764
|
+
* @since 1.0
|
|
4582
4765
|
*/
|
|
4583
4766
|
get_red_byte(): number;
|
|
4584
4767
|
|
|
@@ -4586,6 +4769,7 @@ export namespace Cogl {
|
|
|
4586
4769
|
* Retrieves the red channel of `color` as a floating point
|
|
4587
4770
|
* value between 0.0 and 1.0
|
|
4588
4771
|
* @returns the red channel of the passed color
|
|
4772
|
+
* @since 1.0
|
|
4589
4773
|
*/
|
|
4590
4774
|
get_red_float(): number;
|
|
4591
4775
|
|
|
@@ -4595,12 +4779,14 @@ export namespace Cogl {
|
|
|
4595
4779
|
* @param green value of the green channel, between 0 and 1.0
|
|
4596
4780
|
* @param blue value of the blue channel, between 0 and 1.0
|
|
4597
4781
|
* @param alpha value of the alpha channel, between 0 and 1.0
|
|
4782
|
+
* @since 1.4
|
|
4598
4783
|
*/
|
|
4599
4784
|
init_from_4f(red: number, green: number, blue: number, alpha: number): void;
|
|
4600
4785
|
|
|
4601
4786
|
/**
|
|
4602
4787
|
* Sets the values of the passed channels into a {@link Cogl.Color}
|
|
4603
4788
|
* @param color_array a pointer to an array of 4 float color components
|
|
4789
|
+
* @since 1.4
|
|
4604
4790
|
*/
|
|
4605
4791
|
init_from_4fv(color_array: number): void;
|
|
4606
4792
|
|
|
@@ -4610,6 +4796,7 @@ export namespace Cogl {
|
|
|
4610
4796
|
* @param green value of the green channel, between 0 and 255
|
|
4611
4797
|
* @param blue value of the blue channel, between 0 and 255
|
|
4612
4798
|
* @param alpha value of the alpha channel, between 0 and 255
|
|
4799
|
+
* @since 1.4
|
|
4613
4800
|
*/
|
|
4614
4801
|
init_from_4ub(red: number, green: number, blue: number, alpha: number): void;
|
|
4615
4802
|
|
|
@@ -4617,78 +4804,91 @@ export namespace Cogl {
|
|
|
4617
4804
|
* Converts a non-premultiplied color to a pre-multiplied color. For
|
|
4618
4805
|
* example, semi-transparent red is (1.0, 0, 0, 0.5) when non-premultiplied
|
|
4619
4806
|
* and (0.5, 0, 0, 0.5) when premultiplied.
|
|
4807
|
+
* @since 1.0
|
|
4620
4808
|
*/
|
|
4621
4809
|
premultiply(): void;
|
|
4622
4810
|
|
|
4623
4811
|
/**
|
|
4624
4812
|
* Sets the alpha channel of `color` to `alpha`.
|
|
4625
4813
|
* @param alpha a float value between 0.0f and 1.0f
|
|
4814
|
+
* @since 1.4
|
|
4626
4815
|
*/
|
|
4627
4816
|
set_alpha(alpha: number): void;
|
|
4628
4817
|
|
|
4629
4818
|
/**
|
|
4630
4819
|
* Sets the alpha channel of `color` to `alpha`.
|
|
4631
4820
|
* @param alpha a byte value between 0 and 255
|
|
4821
|
+
* @since 1.4
|
|
4632
4822
|
*/
|
|
4633
4823
|
set_alpha_byte(alpha: number): void;
|
|
4634
4824
|
|
|
4635
4825
|
/**
|
|
4636
4826
|
* Sets the alpha channel of `color` to `alpha`.
|
|
4637
4827
|
* @param alpha a float value between 0.0f and 1.0f
|
|
4828
|
+
* @since 1.4
|
|
4638
4829
|
*/
|
|
4639
4830
|
set_alpha_float(alpha: number): void;
|
|
4640
4831
|
|
|
4641
4832
|
/**
|
|
4642
4833
|
* Sets the blue channel of `color` to `blue`.
|
|
4643
4834
|
* @param blue a float value between 0.0f and 1.0f
|
|
4835
|
+
* @since 1.4
|
|
4644
4836
|
*/
|
|
4645
4837
|
set_blue(blue: number): void;
|
|
4646
4838
|
|
|
4647
4839
|
/**
|
|
4648
4840
|
* Sets the blue channel of `color` to `blue`.
|
|
4649
4841
|
* @param blue a byte value between 0 and 255
|
|
4842
|
+
* @since 1.4
|
|
4650
4843
|
*/
|
|
4651
4844
|
set_blue_byte(blue: number): void;
|
|
4652
4845
|
|
|
4653
4846
|
/**
|
|
4654
4847
|
* Sets the blue channel of `color` to `blue`.
|
|
4655
4848
|
* @param blue a float value between 0.0f and 1.0f
|
|
4849
|
+
* @since 1.4
|
|
4656
4850
|
*/
|
|
4657
4851
|
set_blue_float(blue: number): void;
|
|
4658
4852
|
|
|
4659
4853
|
/**
|
|
4660
4854
|
* Sets the green channel of `color` to `green`.
|
|
4661
4855
|
* @param green a float value between 0.0f and 1.0f
|
|
4856
|
+
* @since 1.4
|
|
4662
4857
|
*/
|
|
4663
4858
|
set_green(green: number): void;
|
|
4664
4859
|
|
|
4665
4860
|
/**
|
|
4666
4861
|
* Sets the green channel of `color` to `green`.
|
|
4667
4862
|
* @param green a byte value between 0 and 255
|
|
4863
|
+
* @since 1.4
|
|
4668
4864
|
*/
|
|
4669
4865
|
set_green_byte(green: number): void;
|
|
4670
4866
|
|
|
4671
4867
|
/**
|
|
4672
4868
|
* Sets the green channel of `color` to `green`.
|
|
4673
4869
|
* @param green a float value between 0.0f and 1.0f
|
|
4870
|
+
* @since 1.4
|
|
4674
4871
|
*/
|
|
4675
4872
|
set_green_float(green: number): void;
|
|
4676
4873
|
|
|
4677
4874
|
/**
|
|
4678
4875
|
* Sets the red channel of `color` to `red`.
|
|
4679
4876
|
* @param red a float value between 0.0f and 1.0f
|
|
4877
|
+
* @since 1.4
|
|
4680
4878
|
*/
|
|
4681
4879
|
set_red(red: number): void;
|
|
4682
4880
|
|
|
4683
4881
|
/**
|
|
4684
4882
|
* Sets the red channel of `color` to `red`.
|
|
4685
4883
|
* @param red a byte value between 0 and 255
|
|
4884
|
+
* @since 1.4
|
|
4686
4885
|
*/
|
|
4687
4886
|
set_red_byte(red: number): void;
|
|
4688
4887
|
|
|
4689
4888
|
/**
|
|
4690
4889
|
* Sets the red channel of `color` to `red`.
|
|
4691
4890
|
* @param red a float value between 0.0f and 1.0f
|
|
4891
|
+
* @since 1.4
|
|
4692
4892
|
*/
|
|
4693
4893
|
set_red_float(red: number): void;
|
|
4694
4894
|
|
|
@@ -4697,6 +4897,7 @@ export namespace Cogl {
|
|
|
4697
4897
|
*
|
|
4698
4898
|
* The `hue` value is in the 0 .. 360 range. The `luminance` and
|
|
4699
4899
|
* `saturation` values are in the 0 .. 1 range.
|
|
4900
|
+
* @since 1.16
|
|
4700
4901
|
*/
|
|
4701
4902
|
to_hsl(): [number, number, number];
|
|
4702
4903
|
|
|
@@ -4704,6 +4905,7 @@ export namespace Cogl {
|
|
|
4704
4905
|
* Converts a pre-multiplied color to a non-premultiplied color. For
|
|
4705
4906
|
* example, semi-transparent red is (0.5, 0, 0, 0.5) when premultiplied
|
|
4706
4907
|
* and (1.0, 0, 0, 0.5) when non-premultiplied.
|
|
4908
|
+
* @since 1.4
|
|
4707
4909
|
*/
|
|
4708
4910
|
unpremultiply(): void;
|
|
4709
4911
|
}
|
|
@@ -4773,6 +4975,8 @@ export namespace Cogl {
|
|
|
4773
4975
|
* The default is {@link Cogl.MaterialAlphaFunc.ALWAYS}
|
|
4774
4976
|
* @param alpha_func A `CoglMaterialAlphaFunc` constant
|
|
4775
4977
|
* @param alpha_reference A reference point that the chosen alpha function uses to compare incoming fragments to.
|
|
4978
|
+
* @since 1.0
|
|
4979
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_alpha_test_function()` instead
|
|
4776
4980
|
*/
|
|
4777
4981
|
set_alpha_test_function(alpha_func: MaterialAlphaFunc, alpha_reference: number): void;
|
|
4778
4982
|
|
|
@@ -4847,6 +5051,9 @@ export namespace Cogl {
|
|
|
4847
5051
|
* is in premultiplied form.
|
|
4848
5052
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired blend function.
|
|
4849
5053
|
* @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).
|
|
5054
|
+
* @since 1.0
|
|
5055
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_blend()` instead
|
|
5056
|
+
* @throws GLib.Error
|
|
4850
5057
|
*/
|
|
4851
5058
|
set_blend(blend_string: string): boolean;
|
|
4852
5059
|
|
|
@@ -4854,6 +5061,8 @@ export namespace Cogl {
|
|
|
4854
5061
|
* When blending is setup to reference a CONSTANT blend factor then
|
|
4855
5062
|
* blending will depend on the constant set with this function.
|
|
4856
5063
|
* @param constant_color The constant color you want
|
|
5064
|
+
* @since 1.0
|
|
5065
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_blend_constant()` instead
|
|
4857
5066
|
*/
|
|
4858
5067
|
set_blend_constant(constant_color: Color): void;
|
|
4859
5068
|
|
|
@@ -4867,6 +5076,8 @@ export namespace Cogl {
|
|
|
4867
5076
|
*
|
|
4868
5077
|
* The default value is (1.0, 1.0, 1.0, 1.0)
|
|
4869
5078
|
* @param color The components of the color
|
|
5079
|
+
* @since 1.0
|
|
5080
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_color()` instead
|
|
4870
5081
|
*/
|
|
4871
5082
|
set_color(color: Color): void;
|
|
4872
5083
|
|
|
@@ -4878,6 +5089,8 @@ export namespace Cogl {
|
|
|
4878
5089
|
* @param green The green component
|
|
4879
5090
|
* @param blue The blue component
|
|
4880
5091
|
* @param alpha The alpha component
|
|
5092
|
+
* @since 1.0
|
|
5093
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_color4ub()` instead
|
|
4881
5094
|
*/
|
|
4882
5095
|
set_color4ub(red: number, green: number, blue: number, alpha: number): void;
|
|
4883
5096
|
|
|
@@ -4894,6 +5107,8 @@ export namespace Cogl {
|
|
|
4894
5107
|
* as purely GLSL based layers.</note>
|
|
4895
5108
|
* @param layer_index the index of the layer
|
|
4896
5109
|
* @param texture a {@link Cogl.Handle} for the layer object
|
|
5110
|
+
* @since 1.0
|
|
5111
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer()` instead
|
|
4897
5112
|
*/
|
|
4898
5113
|
set_layer(layer_index: number, texture: Handle): void;
|
|
4899
5114
|
|
|
@@ -4976,6 +5191,9 @@ export namespace Cogl {
|
|
|
4976
5191
|
* @param layer_index Specifies the layer you want define a combine function for
|
|
4977
5192
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired texture combine function.
|
|
4978
5193
|
* @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
|
|
5194
|
+
* @since 1.0
|
|
5195
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_combine()` instead
|
|
5196
|
+
* @throws GLib.Error
|
|
4979
5197
|
*/
|
|
4980
5198
|
set_layer_combine(layer_index: number, blend_string: string): boolean;
|
|
4981
5199
|
|
|
@@ -4984,6 +5202,8 @@ export namespace Cogl {
|
|
|
4984
5202
|
* description then you can use this function to define its value.
|
|
4985
5203
|
* @param layer_index Specifies the layer you want to specify a constant used for texture combining
|
|
4986
5204
|
* @param constant The constant color you want
|
|
5205
|
+
* @since 1.0
|
|
5206
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_combine_constant()` instead
|
|
4987
5207
|
*/
|
|
4988
5208
|
set_layer_combine_constant(layer_index: number, constant: Color): void;
|
|
4989
5209
|
|
|
@@ -4993,6 +5213,7 @@ export namespace Cogl {
|
|
|
4993
5213
|
* @param layer_index the layer number to change.
|
|
4994
5214
|
* @param min_filter the filter used when scaling a texture down.
|
|
4995
5215
|
* @param mag_filter the filter used when magnifying a texture.
|
|
5216
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_filters()` instead
|
|
4996
5217
|
*/
|
|
4997
5218
|
set_layer_filters(layer_index: number, min_filter: MaterialFilter, mag_filter: MaterialFilter): void;
|
|
4998
5219
|
|
|
@@ -5001,6 +5222,7 @@ export namespace Cogl {
|
|
|
5001
5222
|
* and rotate a single layer of a material used to fill your geometry.
|
|
5002
5223
|
* @param layer_index the index for the layer inside `material`
|
|
5003
5224
|
* @param matrix the transformation matrix for the layer
|
|
5225
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_matrix()` instead
|
|
5004
5226
|
*/
|
|
5005
5227
|
set_layer_matrix(layer_index: number, matrix: Graphene.Matrix): void;
|
|
5006
5228
|
|
|
@@ -5014,6 +5236,9 @@ export namespace Cogl {
|
|
|
5014
5236
|
* @param layer_index the layer number to change.
|
|
5015
5237
|
* @param enable whether to enable point sprite coord generation.
|
|
5016
5238
|
* @returns `true` if the function succeeds, `false` otherwise.
|
|
5239
|
+
* @since 1.4
|
|
5240
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_point_sprite_coords_enabled()` instead
|
|
5241
|
+
* @throws GLib.Error
|
|
5017
5242
|
*/
|
|
5018
5243
|
set_layer_point_sprite_coords_enabled(layer_index: number, enable: boolean): boolean;
|
|
5019
5244
|
|
|
@@ -5026,6 +5251,8 @@ export namespace Cogl {
|
|
|
5026
5251
|
* screen space so it will be the same regardless of any
|
|
5027
5252
|
* transformations. The default point size is 1.0.
|
|
5028
5253
|
* @param point_size the new point size.
|
|
5254
|
+
* @since 1.4
|
|
5255
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_point_size()` instead
|
|
5029
5256
|
*/
|
|
5030
5257
|
set_point_size(point_size: number): void;
|
|
5031
5258
|
|
|
@@ -5066,6 +5293,8 @@ export namespace Cogl {
|
|
|
5066
5293
|
* meantime we hope this will handle most practical GLSL and ARBfp
|
|
5067
5294
|
* requirements.
|
|
5068
5295
|
* @param program A {@link Cogl.Handle} to a linked CoglProgram
|
|
5296
|
+
* @since 1.4
|
|
5297
|
+
* @deprecated since 1.16: Use `CoglSnippet` api instead instead
|
|
5069
5298
|
*/
|
|
5070
5299
|
set_user_program(program: Handle): void;
|
|
5071
5300
|
}
|
|
@@ -5317,6 +5546,7 @@ export namespace Cogl {
|
|
|
5317
5546
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
5318
5547
|
* framebuffer and rendered too.</note>
|
|
5319
5548
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
5549
|
+
* @throws GLib.Error
|
|
5320
5550
|
*/
|
|
5321
5551
|
allocate(): boolean;
|
|
5322
5552
|
|
|
@@ -5328,6 +5558,7 @@ export namespace Cogl {
|
|
|
5328
5558
|
* is {@link Cogl.TextureComponents.RGBA}. The other constructors which take
|
|
5329
5559
|
* a %CoglBitmap or a data pointer default to the same components as
|
|
5330
5560
|
* the pixel format of the data.
|
|
5561
|
+
* @since 1.18
|
|
5331
5562
|
*/
|
|
5332
5563
|
get_components(): TextureComponents;
|
|
5333
5564
|
|
|
@@ -5374,6 +5605,7 @@ export namespace Cogl {
|
|
|
5374
5605
|
*
|
|
5375
5606
|
* By default the pre-multipled state is `TRUE`.
|
|
5376
5607
|
* @returns `true` if red, green and blue components are internally stored pre-multiplied by the alpha value or `false` if not.
|
|
5608
|
+
* @since 1.18
|
|
5377
5609
|
*/
|
|
5378
5610
|
get_premultiplied(): boolean;
|
|
5379
5611
|
|
|
@@ -5406,6 +5638,8 @@ export namespace Cogl {
|
|
|
5406
5638
|
* @param sub_width Width in pixels of the subregion
|
|
5407
5639
|
* @param sub_height Height in pixels of the subregion
|
|
5408
5640
|
* @returns A newly created {@link Cogl.Texture} or `null` on failure
|
|
5641
|
+
* @since 1.2
|
|
5642
|
+
* @deprecated since 1.18: Use `cogl_sub_texture_new()`
|
|
5409
5643
|
*/
|
|
5410
5644
|
new_from_sub_texture(sub_x: number, sub_y: number, sub_width: number, sub_height: number): Texture;
|
|
5411
5645
|
|
|
@@ -5430,6 +5664,7 @@ export namespace Cogl {
|
|
|
5430
5664
|
* an image format as long as {@link Cogl.TextureComponents.RG} isn't used
|
|
5431
5665
|
* as the texture's components.
|
|
5432
5666
|
* @param components
|
|
5667
|
+
* @since 1.18
|
|
5433
5668
|
*/
|
|
5434
5669
|
set_components(components: TextureComponents): void;
|
|
5435
5670
|
|
|
@@ -5481,6 +5716,7 @@ export namespace Cogl {
|
|
|
5481
5716
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
5482
5717
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
5483
5718
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
5719
|
+
* @throws GLib.Error
|
|
5484
5720
|
*/
|
|
5485
5721
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
5486
5722
|
|
|
@@ -5507,6 +5743,7 @@ export namespace Cogl {
|
|
|
5507
5743
|
*
|
|
5508
5744
|
* By default the `premultipled` state is `TRUE`.
|
|
5509
5745
|
* @param premultiplied Whether any internally stored red, green or blue components are pre-multiplied by an alpha component.
|
|
5746
|
+
* @since 1.18
|
|
5510
5747
|
*/
|
|
5511
5748
|
set_premultiplied(premultiplied: boolean): void;
|
|
5512
5749
|
|
|
@@ -5544,6 +5781,7 @@ export namespace Cogl {
|
|
|
5544
5781
|
* @param dst_height height of destination region to write. (Must be less than or equal to the bitmap height)
|
|
5545
5782
|
* @param bitmap The source bitmap to read from
|
|
5546
5783
|
* @returns `true` if the subregion upload was successful, and `false` otherwise
|
|
5784
|
+
* @since 1.8
|
|
5547
5785
|
*/
|
|
5548
5786
|
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;
|
|
5549
5787
|
}
|