@girs/cogl-7 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-7.d.ts +531 -171
- package/package.json +7 -7
package/cogl-7.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,46 +172,46 @@ export namespace Cogl {
|
|
|
172
172
|
* {@link Cogl.IndicesType.INT} is supported in
|
|
173
173
|
* `cogl_indices_new()`.
|
|
174
174
|
*/
|
|
175
|
-
OGL_FEATURE_ID_UNSIGNED_INT_INDICES,
|
|
175
|
+
OGL_FEATURE_ID_UNSIGNED_INT_INDICES = 0,
|
|
176
176
|
/**
|
|
177
177
|
* Whether `cogl_buffer_map()` is
|
|
178
178
|
* supported with CoglBufferAccess including read support.
|
|
179
179
|
*/
|
|
180
|
-
OGL_FEATURE_ID_MAP_BUFFER_FOR_READ,
|
|
180
|
+
OGL_FEATURE_ID_MAP_BUFFER_FOR_READ = 1,
|
|
181
181
|
/**
|
|
182
182
|
* Whether `cogl_buffer_map()` is
|
|
183
183
|
* supported with CoglBufferAccess including write support.
|
|
184
184
|
*/
|
|
185
|
-
OGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE,
|
|
185
|
+
OGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE = 2,
|
|
186
186
|
/**
|
|
187
187
|
* Available if the window system supports reporting an event
|
|
188
188
|
* for swap buffer completions.
|
|
189
189
|
*/
|
|
190
|
-
OGL_FEATURE_ID_SWAP_BUFFERS_EVENT,
|
|
190
|
+
OGL_FEATURE_ID_SWAP_BUFFERS_EVENT = 3,
|
|
191
191
|
/**
|
|
192
192
|
* Whether frame presentation
|
|
193
193
|
* time stamps will be recorded in {@link Cogl.FrameInfo} objects.
|
|
194
194
|
*/
|
|
195
|
-
OGL_FEATURE_ID_PRESENTATION_TIME,
|
|
196
|
-
OGL_FEATURE_ID_FENCE,
|
|
195
|
+
OGL_FEATURE_ID_PRESENTATION_TIME = 4,
|
|
196
|
+
OGL_FEATURE_ID_FENCE = 5,
|
|
197
197
|
/**
|
|
198
198
|
* Support for
|
|
199
199
|
* {@link Cogl.TextureComponents.RG} as the internal components of a
|
|
200
200
|
* texture.
|
|
201
201
|
*/
|
|
202
|
-
OGL_FEATURE_ID_TEXTURE_RG,
|
|
202
|
+
OGL_FEATURE_ID_TEXTURE_RG = 6,
|
|
203
203
|
/**
|
|
204
204
|
* Available if the age of {@link Cogl.Onscreen} back
|
|
205
205
|
* buffers are tracked and so `cogl_onscreen_get_buffer_age()` can be
|
|
206
206
|
* expected to return age values other than 0.
|
|
207
207
|
*/
|
|
208
|
-
OGL_FEATURE_ID_BUFFER_AGE,
|
|
209
|
-
OGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL,
|
|
208
|
+
OGL_FEATURE_ID_BUFFER_AGE = 7,
|
|
209
|
+
OGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL = 8,
|
|
210
210
|
/**
|
|
211
211
|
* Whether blitting using
|
|
212
212
|
* `cogl_blit_framebuffer()` is supported.
|
|
213
213
|
*/
|
|
214
|
-
OGL_FEATURE_ID_BLIT_FRAMEBUFFER,
|
|
214
|
+
OGL_FEATURE_ID_BLIT_FRAMEBUFFER = 9,
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
|
|
@@ -224,11 +224,11 @@ export namespace Cogl {
|
|
|
224
224
|
* The event was not handled, continues the
|
|
225
225
|
* processing
|
|
226
226
|
*/
|
|
227
|
-
CONTINUE,
|
|
227
|
+
CONTINUE = 0,
|
|
228
228
|
/**
|
|
229
229
|
* Remove the event, stops the processing
|
|
230
230
|
*/
|
|
231
|
-
REMOVE,
|
|
231
|
+
REMOVE = 1,
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
|
|
@@ -256,7 +256,7 @@ export namespace Cogl {
|
|
|
256
256
|
* acknowledged a frame and is ready for a
|
|
257
257
|
* new frame to be created.
|
|
258
258
|
*/
|
|
259
|
-
SYNC,
|
|
259
|
+
SYNC = 1,
|
|
260
260
|
/**
|
|
261
261
|
* Notifies that a frame has ended. This
|
|
262
262
|
* is a good time for applications to
|
|
@@ -266,7 +266,7 @@ export namespace Cogl {
|
|
|
266
266
|
* events should be expected after a
|
|
267
267
|
* `COGL_FRAME_EVENT_COMPLETE` event.
|
|
268
268
|
*/
|
|
269
|
-
COMPLETE,
|
|
269
|
+
COMPLETE = 2,
|
|
270
270
|
}
|
|
271
271
|
|
|
272
272
|
|
|
@@ -274,7 +274,7 @@ export namespace Cogl {
|
|
|
274
274
|
* @gir-type Enum
|
|
275
275
|
*/
|
|
276
276
|
enum FramebufferError {
|
|
277
|
-
FRAMEBUFFER_ERROR_ALLOCATE,
|
|
277
|
+
FRAMEBUFFER_ERROR_ALLOCATE = 0,
|
|
278
278
|
}
|
|
279
279
|
|
|
280
280
|
|
|
@@ -286,11 +286,11 @@ export namespace Cogl {
|
|
|
286
286
|
* @gir-type Enum
|
|
287
287
|
*/
|
|
288
288
|
enum GraphicsResetStatus {
|
|
289
|
-
NO_ERROR,
|
|
290
|
-
GUILTY_CONTEXT_RESET,
|
|
291
|
-
INNOCENT_CONTEXT_RESET,
|
|
292
|
-
UNKNOWN_CONTEXT_RESET,
|
|
293
|
-
PURGED_CONTEXT_RESET,
|
|
289
|
+
NO_ERROR = 0,
|
|
290
|
+
GUILTY_CONTEXT_RESET = 1,
|
|
291
|
+
INNOCENT_CONTEXT_RESET = 2,
|
|
292
|
+
UNKNOWN_CONTEXT_RESET = 3,
|
|
293
|
+
PURGED_CONTEXT_RESET = 4,
|
|
294
294
|
}
|
|
295
295
|
|
|
296
296
|
|
|
@@ -310,15 +310,15 @@ export namespace Cogl {
|
|
|
310
310
|
/**
|
|
311
311
|
* Your indices are unsigned bytes
|
|
312
312
|
*/
|
|
313
|
-
BYTE,
|
|
313
|
+
BYTE = 0,
|
|
314
314
|
/**
|
|
315
315
|
* Your indices are unsigned shorts
|
|
316
316
|
*/
|
|
317
|
-
SHORT,
|
|
317
|
+
SHORT = 1,
|
|
318
318
|
/**
|
|
319
319
|
* Your indices are unsigned ints
|
|
320
320
|
*/
|
|
321
|
-
INT,
|
|
321
|
+
INT = 2,
|
|
322
322
|
}
|
|
323
323
|
|
|
324
324
|
|
|
@@ -333,41 +333,41 @@ export namespace Cogl {
|
|
|
333
333
|
/**
|
|
334
334
|
* Never let the fragment through.
|
|
335
335
|
*/
|
|
336
|
-
NEVER,
|
|
336
|
+
NEVER = 512,
|
|
337
337
|
/**
|
|
338
338
|
* Let the fragment through if the incoming
|
|
339
339
|
* alpha value is less than the reference alpha value
|
|
340
340
|
*/
|
|
341
|
-
LESS,
|
|
341
|
+
LESS = 513,
|
|
342
342
|
/**
|
|
343
343
|
* Let the fragment through if the incoming
|
|
344
344
|
* alpha value equals the reference alpha value
|
|
345
345
|
*/
|
|
346
|
-
EQUAL,
|
|
346
|
+
EQUAL = 514,
|
|
347
347
|
/**
|
|
348
348
|
* Let the fragment through if the incoming
|
|
349
349
|
* alpha value is less than or equal to the reference alpha value
|
|
350
350
|
*/
|
|
351
|
-
LEQUAL,
|
|
351
|
+
LEQUAL = 515,
|
|
352
352
|
/**
|
|
353
353
|
* Let the fragment through if the incoming
|
|
354
354
|
* alpha value is greater than the reference alpha value
|
|
355
355
|
*/
|
|
356
|
-
GREATER,
|
|
356
|
+
GREATER = 516,
|
|
357
357
|
/**
|
|
358
358
|
* Let the fragment through if the incoming
|
|
359
359
|
* alpha value does not equal the reference alpha value
|
|
360
360
|
*/
|
|
361
|
-
NOTEQUAL,
|
|
361
|
+
NOTEQUAL = 517,
|
|
362
362
|
/**
|
|
363
363
|
* Let the fragment through if the incoming
|
|
364
364
|
* alpha value is greater than or equal to the reference alpha value.
|
|
365
365
|
*/
|
|
366
|
-
GEQUAL,
|
|
366
|
+
GEQUAL = 518,
|
|
367
367
|
/**
|
|
368
368
|
* Always let the fragment through.
|
|
369
369
|
*/
|
|
370
|
-
ALWAYS,
|
|
370
|
+
ALWAYS = 519,
|
|
371
371
|
}
|
|
372
372
|
|
|
373
373
|
|
|
@@ -384,38 +384,38 @@ export namespace Cogl {
|
|
|
384
384
|
* Measuring in manhatten distance from the,
|
|
385
385
|
* current pixel center, use the nearest texture texel
|
|
386
386
|
*/
|
|
387
|
-
NEAREST,
|
|
387
|
+
NEAREST = 9728,
|
|
388
388
|
/**
|
|
389
389
|
* Use the weighted average of the 4 texels
|
|
390
390
|
* nearest the current pixel center
|
|
391
391
|
*/
|
|
392
|
-
LINEAR,
|
|
392
|
+
LINEAR = 9729,
|
|
393
393
|
/**
|
|
394
394
|
* Select the mimap level whose
|
|
395
395
|
* texel size most closely matches the current pixel, and use the
|
|
396
396
|
* {@link Cogl.MaterialFilter.NEAREST} criterion
|
|
397
397
|
*/
|
|
398
|
-
NEAREST_MIPMAP_NEAREST,
|
|
398
|
+
NEAREST_MIPMAP_NEAREST = 9984,
|
|
399
399
|
/**
|
|
400
400
|
* Select the mimap level whose
|
|
401
401
|
* texel size most closely matches the current pixel, and use the
|
|
402
402
|
* {@link Cogl.MaterialFilter.LINEAR} criterion
|
|
403
403
|
*/
|
|
404
|
-
LINEAR_MIPMAP_NEAREST,
|
|
404
|
+
LINEAR_MIPMAP_NEAREST = 9985,
|
|
405
405
|
/**
|
|
406
406
|
* Select the two mimap levels
|
|
407
407
|
* whose texel size most closely matches the current pixel, use
|
|
408
408
|
* the {@link Cogl.MaterialFilter.NEAREST} criterion on each one and take
|
|
409
409
|
* their weighted average
|
|
410
410
|
*/
|
|
411
|
-
NEAREST_MIPMAP_LINEAR,
|
|
411
|
+
NEAREST_MIPMAP_LINEAR = 9986,
|
|
412
412
|
/**
|
|
413
413
|
* Select the two mimap levels
|
|
414
414
|
* whose texel size most closely matches the current pixel, use
|
|
415
415
|
* the {@link Cogl.MaterialFilter.LINEAR} criterion on each one and take
|
|
416
416
|
* their weighted average
|
|
417
417
|
*/
|
|
418
|
-
LINEAR_MIPMAP_LINEAR,
|
|
418
|
+
LINEAR_MIPMAP_LINEAR = 9987,
|
|
419
419
|
}
|
|
420
420
|
|
|
421
421
|
|
|
@@ -436,14 +436,14 @@ export namespace Cogl {
|
|
|
436
436
|
* The texture will be repeated. This
|
|
437
437
|
* is useful for example to draw a tiled background.
|
|
438
438
|
*/
|
|
439
|
-
REPEAT,
|
|
439
|
+
REPEAT = 10497,
|
|
440
440
|
/**
|
|
441
441
|
* The coordinates outside the
|
|
442
442
|
* range 0→1 will sample copies of the edge pixels of the
|
|
443
443
|
* texture. This is useful to avoid artifacts if only one copy of
|
|
444
444
|
* the texture is being rendered.
|
|
445
445
|
*/
|
|
446
|
-
CLAMP_TO_EDGE,
|
|
446
|
+
CLAMP_TO_EDGE = 33071,
|
|
447
447
|
/**
|
|
448
448
|
* Cogl will try to automatically
|
|
449
449
|
* decide which of the above two to use. For `cogl_rectangle()`, it
|
|
@@ -454,7 +454,7 @@ export namespace Cogl {
|
|
|
454
454
|
* layers that have point sprite coordinate generation enabled. This
|
|
455
455
|
* is the default value.
|
|
456
456
|
*/
|
|
457
|
-
AUTOMATIC,
|
|
457
|
+
AUTOMATIC = 519,
|
|
458
458
|
}
|
|
459
459
|
|
|
460
460
|
|
|
@@ -469,41 +469,41 @@ export namespace Cogl {
|
|
|
469
469
|
/**
|
|
470
470
|
* Never let the fragment through.
|
|
471
471
|
*/
|
|
472
|
-
NEVER,
|
|
472
|
+
NEVER = 512,
|
|
473
473
|
/**
|
|
474
474
|
* Let the fragment through if the incoming
|
|
475
475
|
* alpha value is less than the reference alpha value
|
|
476
476
|
*/
|
|
477
|
-
LESS,
|
|
477
|
+
LESS = 513,
|
|
478
478
|
/**
|
|
479
479
|
* Let the fragment through if the incoming
|
|
480
480
|
* alpha value equals the reference alpha value
|
|
481
481
|
*/
|
|
482
|
-
EQUAL,
|
|
482
|
+
EQUAL = 514,
|
|
483
483
|
/**
|
|
484
484
|
* Let the fragment through if the incoming
|
|
485
485
|
* alpha value is less than or equal to the reference alpha value
|
|
486
486
|
*/
|
|
487
|
-
LEQUAL,
|
|
487
|
+
LEQUAL = 515,
|
|
488
488
|
/**
|
|
489
489
|
* Let the fragment through if the incoming
|
|
490
490
|
* alpha value is greater than the reference alpha value
|
|
491
491
|
*/
|
|
492
|
-
GREATER,
|
|
492
|
+
GREATER = 516,
|
|
493
493
|
/**
|
|
494
494
|
* Let the fragment through if the incoming
|
|
495
495
|
* alpha value does not equal the reference alpha value
|
|
496
496
|
*/
|
|
497
|
-
NOTEQUAL,
|
|
497
|
+
NOTEQUAL = 517,
|
|
498
498
|
/**
|
|
499
499
|
* Let the fragment through if the incoming
|
|
500
500
|
* alpha value is greater than or equal to the reference alpha value.
|
|
501
501
|
*/
|
|
502
|
-
GEQUAL,
|
|
502
|
+
GEQUAL = 518,
|
|
503
503
|
/**
|
|
504
504
|
* Always let the fragment through.
|
|
505
505
|
*/
|
|
506
|
-
ALWAYS,
|
|
506
|
+
ALWAYS = 519,
|
|
507
507
|
}
|
|
508
508
|
|
|
509
509
|
|
|
@@ -517,19 +517,19 @@ export namespace Cogl {
|
|
|
517
517
|
* Neither face will be
|
|
518
518
|
* culled. This is the default.
|
|
519
519
|
*/
|
|
520
|
-
NONE,
|
|
520
|
+
NONE = 0,
|
|
521
521
|
/**
|
|
522
522
|
* Front faces will be culled.
|
|
523
523
|
*/
|
|
524
|
-
FRONT,
|
|
524
|
+
FRONT = 1,
|
|
525
525
|
/**
|
|
526
526
|
* Back faces will be culled.
|
|
527
527
|
*/
|
|
528
|
-
BACK,
|
|
528
|
+
BACK = 2,
|
|
529
529
|
/**
|
|
530
530
|
* All faces will be culled.
|
|
531
531
|
*/
|
|
532
|
-
BOTH,
|
|
532
|
+
BOTH = 3,
|
|
533
533
|
}
|
|
534
534
|
|
|
535
535
|
|
|
@@ -546,38 +546,38 @@ export namespace Cogl {
|
|
|
546
546
|
* Measuring in manhatten distance from the,
|
|
547
547
|
* current pixel center, use the nearest texture texel
|
|
548
548
|
*/
|
|
549
|
-
NEAREST,
|
|
549
|
+
NEAREST = 9728,
|
|
550
550
|
/**
|
|
551
551
|
* Use the weighted average of the 4 texels
|
|
552
552
|
* nearest the current pixel center
|
|
553
553
|
*/
|
|
554
|
-
LINEAR,
|
|
554
|
+
LINEAR = 9729,
|
|
555
555
|
/**
|
|
556
556
|
* Select the mimap level whose
|
|
557
557
|
* texel size most closely matches the current pixel, and use the
|
|
558
558
|
* {@link Cogl.PipelineFilter.NEAREST} criterion
|
|
559
559
|
*/
|
|
560
|
-
NEAREST_MIPMAP_NEAREST,
|
|
560
|
+
NEAREST_MIPMAP_NEAREST = 9984,
|
|
561
561
|
/**
|
|
562
562
|
* Select the mimap level whose
|
|
563
563
|
* texel size most closely matches the current pixel, and use the
|
|
564
564
|
* {@link Cogl.PipelineFilter.LINEAR} criterion
|
|
565
565
|
*/
|
|
566
|
-
LINEAR_MIPMAP_NEAREST,
|
|
566
|
+
LINEAR_MIPMAP_NEAREST = 9985,
|
|
567
567
|
/**
|
|
568
568
|
* Select the two mimap levels
|
|
569
569
|
* whose texel size most closely matches the current pixel, use
|
|
570
570
|
* the {@link Cogl.PipelineFilter.NEAREST} criterion on each one and take
|
|
571
571
|
* their weighted average
|
|
572
572
|
*/
|
|
573
|
-
NEAREST_MIPMAP_LINEAR,
|
|
573
|
+
NEAREST_MIPMAP_LINEAR = 9986,
|
|
574
574
|
/**
|
|
575
575
|
* Select the two mimap levels
|
|
576
576
|
* whose texel size most closely matches the current pixel, use
|
|
577
577
|
* the {@link Cogl.PipelineFilter.LINEAR} criterion on each one and take
|
|
578
578
|
* their weighted average
|
|
579
579
|
*/
|
|
580
|
-
LINEAR_MIPMAP_LINEAR,
|
|
580
|
+
LINEAR_MIPMAP_LINEAR = 9987,
|
|
581
581
|
}
|
|
582
582
|
|
|
583
583
|
|
|
@@ -598,15 +598,15 @@ export namespace Cogl {
|
|
|
598
598
|
* The texture will be repeated. This
|
|
599
599
|
* is useful for example to draw a tiled background.
|
|
600
600
|
*/
|
|
601
|
-
REPEAT,
|
|
602
|
-
MIRRORED_REPEAT,
|
|
601
|
+
REPEAT = 10497,
|
|
602
|
+
MIRRORED_REPEAT = 33648,
|
|
603
603
|
/**
|
|
604
604
|
* The coordinates outside the
|
|
605
605
|
* range 0→1 will sample copies of the edge pixels of the
|
|
606
606
|
* texture. This is useful to avoid artifacts if only one copy of
|
|
607
607
|
* the texture is being rendered.
|
|
608
608
|
*/
|
|
609
|
-
CLAMP_TO_EDGE,
|
|
609
|
+
CLAMP_TO_EDGE = 33071,
|
|
610
610
|
/**
|
|
611
611
|
* Cogl will try to automatically
|
|
612
612
|
* decide which of the above two to use. For `cogl_rectangle()`, it
|
|
@@ -617,7 +617,7 @@ export namespace Cogl {
|
|
|
617
617
|
* layers that have point sprite coordinate generation enabled. This
|
|
618
618
|
* is the default value.
|
|
619
619
|
*/
|
|
620
|
-
AUTOMATIC,
|
|
620
|
+
AUTOMATIC = 519,
|
|
621
621
|
}
|
|
622
622
|
|
|
623
623
|
|
|
@@ -625,8 +625,8 @@ export namespace Cogl {
|
|
|
625
625
|
* @gir-type Enum
|
|
626
626
|
*/
|
|
627
627
|
enum RendererError {
|
|
628
|
-
XLIB_DISPLAY_OPEN,
|
|
629
|
-
BAD_CONSTRAINT,
|
|
628
|
+
XLIB_DISPLAY_OPEN = 0,
|
|
629
|
+
BAD_CONSTRAINT = 1,
|
|
630
630
|
}
|
|
631
631
|
|
|
632
632
|
|
|
@@ -639,11 +639,11 @@ export namespace Cogl {
|
|
|
639
639
|
/**
|
|
640
640
|
* A program for processing vertices
|
|
641
641
|
*/
|
|
642
|
-
VERTEX,
|
|
642
|
+
VERTEX = 0,
|
|
643
643
|
/**
|
|
644
644
|
* A program for processing fragments
|
|
645
645
|
*/
|
|
646
|
-
FRAGMENT,
|
|
646
|
+
FRAGMENT = 1,
|
|
647
647
|
}
|
|
648
648
|
|
|
649
649
|
|
|
@@ -656,15 +656,15 @@ export namespace Cogl {
|
|
|
656
656
|
/**
|
|
657
657
|
* draw to both stereo buffers
|
|
658
658
|
*/
|
|
659
|
-
BOTH,
|
|
659
|
+
BOTH = 0,
|
|
660
660
|
/**
|
|
661
661
|
* draw only to the left stereo buffer
|
|
662
662
|
*/
|
|
663
|
-
LEFT,
|
|
663
|
+
LEFT = 1,
|
|
664
664
|
/**
|
|
665
665
|
* draw only to the left stereo buffer
|
|
666
666
|
*/
|
|
667
|
-
RIGHT,
|
|
667
|
+
RIGHT = 2,
|
|
668
668
|
}
|
|
669
669
|
|
|
670
670
|
|
|
@@ -694,12 +694,12 @@ export namespace Cogl {
|
|
|
694
694
|
* You tried to use a feature or
|
|
695
695
|
* configuration not currently available.
|
|
696
696
|
*/
|
|
697
|
-
UNSUPPORTED,
|
|
697
|
+
UNSUPPORTED = 0,
|
|
698
698
|
/**
|
|
699
699
|
* You tried to allocate a resource
|
|
700
700
|
* such as a texture and there wasn't enough memory.
|
|
701
701
|
*/
|
|
702
|
-
NO_MEMORY,
|
|
702
|
+
NO_MEMORY = 1,
|
|
703
703
|
}
|
|
704
704
|
|
|
705
705
|
|
|
@@ -712,25 +712,25 @@ export namespace Cogl {
|
|
|
712
712
|
/**
|
|
713
713
|
* Only the alpha component
|
|
714
714
|
*/
|
|
715
|
-
A,
|
|
715
|
+
A = 1,
|
|
716
716
|
/**
|
|
717
717
|
* Red and green components. Note that
|
|
718
718
|
* this can only be used if the {@link Cogl.FeatureID.OGL_FEATURE_ID_TEXTURE_RG} feature
|
|
719
719
|
* is advertised.
|
|
720
720
|
*/
|
|
721
|
-
RG,
|
|
721
|
+
RG = 2,
|
|
722
722
|
/**
|
|
723
723
|
* Red, green and blue components
|
|
724
724
|
*/
|
|
725
|
-
RGB,
|
|
725
|
+
RGB = 3,
|
|
726
726
|
/**
|
|
727
727
|
* Red, green, blue and alpha components
|
|
728
728
|
*/
|
|
729
|
-
RGBA,
|
|
729
|
+
RGBA = 4,
|
|
730
730
|
/**
|
|
731
731
|
* Only a depth component
|
|
732
732
|
*/
|
|
733
|
-
DEPTH,
|
|
733
|
+
DEPTH = 5,
|
|
734
734
|
}
|
|
735
735
|
|
|
736
736
|
|
|
@@ -743,17 +743,17 @@ export namespace Cogl {
|
|
|
743
743
|
/**
|
|
744
744
|
* Unsupported size
|
|
745
745
|
*/
|
|
746
|
-
SIZE,
|
|
746
|
+
SIZE = 0,
|
|
747
747
|
/**
|
|
748
748
|
* Unsupported format
|
|
749
749
|
*/
|
|
750
|
-
FORMAT,
|
|
751
|
-
BAD_PARAMETER,
|
|
750
|
+
FORMAT = 1,
|
|
751
|
+
BAD_PARAMETER = 2,
|
|
752
752
|
/**
|
|
753
753
|
* A primitive texture type that is
|
|
754
754
|
* unsupported by the driver was used
|
|
755
755
|
*/
|
|
756
|
-
TYPE,
|
|
756
|
+
TYPE = 3,
|
|
757
757
|
}
|
|
758
758
|
|
|
759
759
|
|
|
@@ -767,35 +767,35 @@ export namespace Cogl {
|
|
|
767
767
|
* FIXME, equivalent to
|
|
768
768
|
* <constant>GL_POINTS</constant>
|
|
769
769
|
*/
|
|
770
|
-
POINTS,
|
|
770
|
+
POINTS = 0,
|
|
771
771
|
/**
|
|
772
772
|
* FIXME, equivalent to <constant>GL_LINES</constant>
|
|
773
773
|
*/
|
|
774
|
-
LINES,
|
|
774
|
+
LINES = 1,
|
|
775
775
|
/**
|
|
776
776
|
* FIXME, equivalent to
|
|
777
777
|
* <constant>GL_LINE_LOOP</constant>
|
|
778
778
|
*/
|
|
779
|
-
LINE_LOOP,
|
|
779
|
+
LINE_LOOP = 2,
|
|
780
780
|
/**
|
|
781
781
|
* FIXME, equivalent to
|
|
782
782
|
* <constant>GL_LINE_STRIP</constant>
|
|
783
783
|
*/
|
|
784
|
-
LINE_STRIP,
|
|
784
|
+
LINE_STRIP = 3,
|
|
785
785
|
/**
|
|
786
786
|
* FIXME, equivalent to
|
|
787
787
|
* <constant>GL_TRIANGLES</constant>
|
|
788
788
|
*/
|
|
789
|
-
TRIANGLES,
|
|
789
|
+
TRIANGLES = 4,
|
|
790
790
|
/**
|
|
791
791
|
* FIXME, equivalent to
|
|
792
792
|
* <constant>GL_TRIANGLE_STRIP</constant>
|
|
793
793
|
*/
|
|
794
|
-
TRIANGLE_STRIP,
|
|
794
|
+
TRIANGLE_STRIP = 5,
|
|
795
795
|
/**
|
|
796
796
|
* FIXME, equivalent to <constant>GL_TRIANGLE_FAN</constant>
|
|
797
797
|
*/
|
|
798
|
-
TRIANGLE_FAN,
|
|
798
|
+
TRIANGLE_FAN = 6,
|
|
799
799
|
}
|
|
800
800
|
|
|
801
801
|
|
|
@@ -809,11 +809,11 @@ export namespace Cogl {
|
|
|
809
809
|
/**
|
|
810
810
|
* Vertices are in a clockwise order
|
|
811
811
|
*/
|
|
812
|
-
CLOCKWISE,
|
|
812
|
+
CLOCKWISE = 0,
|
|
813
813
|
/**
|
|
814
814
|
* Vertices are in a counter-clockwise order
|
|
815
815
|
*/
|
|
816
|
-
COUNTER_CLOCKWISE,
|
|
816
|
+
COUNTER_CLOCKWISE = 1,
|
|
817
817
|
}
|
|
818
818
|
|
|
819
819
|
|
|
@@ -821,38 +821,60 @@ export namespace Cogl {
|
|
|
821
821
|
* @gir-type Enum
|
|
822
822
|
*/
|
|
823
823
|
enum WinsysFeature {
|
|
824
|
-
MULTIPLE_ONSCREEN,
|
|
825
|
-
VBLANK_COUNTER,
|
|
826
|
-
VBLANK_WAIT,
|
|
827
|
-
TEXTURE_FROM_PIXMAP,
|
|
828
|
-
SWAP_BUFFERS_EVENT,
|
|
829
|
-
SWAP_REGION,
|
|
830
|
-
SWAP_REGION_THROTTLE,
|
|
831
|
-
SWAP_REGION_SYNCHRONIZED,
|
|
832
|
-
BUFFER_AGE,
|
|
833
|
-
SYNC_AND_COMPLETE_EVENT,
|
|
834
|
-
N_FEATURES,
|
|
824
|
+
MULTIPLE_ONSCREEN = 0,
|
|
825
|
+
VBLANK_COUNTER = 1,
|
|
826
|
+
VBLANK_WAIT = 2,
|
|
827
|
+
TEXTURE_FROM_PIXMAP = 3,
|
|
828
|
+
SWAP_BUFFERS_EVENT = 4,
|
|
829
|
+
SWAP_REGION = 5,
|
|
830
|
+
SWAP_REGION_THROTTLE = 6,
|
|
831
|
+
SWAP_REGION_SYNCHRONIZED = 7,
|
|
832
|
+
BUFFER_AGE = 8,
|
|
833
|
+
SYNC_AND_COMPLETE_EVENT = 9,
|
|
834
|
+
N_FEATURES = 10,
|
|
835
835
|
}
|
|
836
836
|
|
|
837
837
|
|
|
838
|
+
/**
|
|
839
|
+
* @default 64
|
|
840
|
+
*/
|
|
838
841
|
const AFIRST_BIT: number;
|
|
839
842
|
|
|
843
|
+
/**
|
|
844
|
+
* @default 16
|
|
845
|
+
*/
|
|
840
846
|
const A_BIT: number;
|
|
841
847
|
|
|
848
|
+
/**
|
|
849
|
+
* @default 32
|
|
850
|
+
*/
|
|
842
851
|
const BGR_BIT: number;
|
|
843
852
|
|
|
853
|
+
/**
|
|
854
|
+
* @default 256
|
|
855
|
+
*/
|
|
844
856
|
const DEPTH_BIT: number;
|
|
845
857
|
|
|
846
858
|
/**
|
|
847
859
|
* The maximum number of planes of a pixel format (see also
|
|
848
860
|
* `cogl_pixel_format_get_planes()`).
|
|
861
|
+
* @default 4
|
|
849
862
|
*/
|
|
850
863
|
const PIXEL_FORMAT_MAX_PLANES: number;
|
|
851
864
|
|
|
865
|
+
/**
|
|
866
|
+
* @default 128
|
|
867
|
+
*/
|
|
852
868
|
const PREMULT_BIT: number;
|
|
853
869
|
|
|
870
|
+
/**
|
|
871
|
+
* @default 512
|
|
872
|
+
*/
|
|
854
873
|
const STENCIL_BIT: number;
|
|
855
874
|
|
|
875
|
+
/**
|
|
876
|
+
* @default 127
|
|
877
|
+
*/
|
|
856
878
|
const TEXTURE_MAX_WASTE: number;
|
|
857
879
|
|
|
858
880
|
function blend_string_error_quark(): number;
|
|
@@ -905,6 +927,7 @@ export namespace Cogl {
|
|
|
905
927
|
* @param dst_y Destination y position
|
|
906
928
|
* @param width Width of region to copy
|
|
907
929
|
* @param height Height of region to copy
|
|
930
|
+
* @throws GLib.Error
|
|
908
931
|
*/
|
|
909
932
|
function blit_framebuffer(src: Framebuffer, dest: Framebuffer, src_x: number, src_y: number, dst_x: number, dst_y: number, width: number, height: number): boolean;
|
|
910
933
|
|
|
@@ -1409,6 +1432,7 @@ export namespace Cogl {
|
|
|
1409
1432
|
* @returns A newly created {@link Cogl.Texture} or `null` on failure
|
|
1410
1433
|
* @since 0.8
|
|
1411
1434
|
* @deprecated since 1.18: Use specific constructors such as `cogl_texture_2d_new_from_file()`
|
|
1435
|
+
* @throws GLib.Error
|
|
1412
1436
|
*/
|
|
1413
1437
|
function texture_new_from_file(filename: string, flags: TextureFlags, internal_format: PixelFormat): Texture;
|
|
1414
1438
|
|
|
@@ -1502,15 +1526,15 @@ export namespace Cogl {
|
|
|
1502
1526
|
/**
|
|
1503
1527
|
* Selects the primary color buffer
|
|
1504
1528
|
*/
|
|
1505
|
-
COLOR,
|
|
1529
|
+
COLOR = 1,
|
|
1506
1530
|
/**
|
|
1507
1531
|
* Selects the depth buffer
|
|
1508
1532
|
*/
|
|
1509
|
-
DEPTH,
|
|
1533
|
+
DEPTH = 2,
|
|
1510
1534
|
/**
|
|
1511
1535
|
* Selects the stencil buffer
|
|
1512
1536
|
*/
|
|
1513
|
-
STENCIL,
|
|
1537
|
+
STENCIL = 4,
|
|
1514
1538
|
}
|
|
1515
1539
|
|
|
1516
1540
|
|
|
@@ -1523,11 +1547,11 @@ export namespace Cogl {
|
|
|
1523
1547
|
/**
|
|
1524
1548
|
* FIXME
|
|
1525
1549
|
*/
|
|
1526
|
-
WINDOW_BUFFER,
|
|
1550
|
+
WINDOW_BUFFER = 2,
|
|
1527
1551
|
/**
|
|
1528
1552
|
* FIXME
|
|
1529
1553
|
*/
|
|
1530
|
-
OFFSCREEN_BUFFER,
|
|
1554
|
+
OFFSCREEN_BUFFER = 4,
|
|
1531
1555
|
}
|
|
1532
1556
|
|
|
1533
1557
|
|
|
@@ -1535,8 +1559,8 @@ export namespace Cogl {
|
|
|
1535
1559
|
* @gir-type Flags
|
|
1536
1560
|
*/
|
|
1537
1561
|
enum EglImageFlags {
|
|
1538
|
-
NONE,
|
|
1539
|
-
NO_GET_DATA,
|
|
1562
|
+
NONE = 0,
|
|
1563
|
+
NO_GET_DATA = 1,
|
|
1540
1564
|
}
|
|
1541
1565
|
|
|
1542
1566
|
|
|
@@ -1566,152 +1590,152 @@ export namespace Cogl {
|
|
|
1566
1590
|
/**
|
|
1567
1591
|
* Any format
|
|
1568
1592
|
*/
|
|
1569
|
-
ANY,
|
|
1593
|
+
ANY = 0,
|
|
1570
1594
|
/**
|
|
1571
1595
|
* 8 bits alpha mask
|
|
1572
1596
|
*/
|
|
1573
|
-
A_8,
|
|
1597
|
+
A_8 = 17,
|
|
1574
1598
|
/**
|
|
1575
1599
|
* RGB, 16 bits
|
|
1576
1600
|
*/
|
|
1577
|
-
RGB_565,
|
|
1601
|
+
RGB_565 = 4,
|
|
1578
1602
|
/**
|
|
1579
1603
|
* RGBA, 16 bits
|
|
1580
1604
|
*/
|
|
1581
|
-
RGBA_4444,
|
|
1605
|
+
RGBA_4444 = 21,
|
|
1582
1606
|
/**
|
|
1583
1607
|
* RGBA, 16 bits
|
|
1584
1608
|
*/
|
|
1585
|
-
RGBA_5551,
|
|
1609
|
+
RGBA_5551 = 22,
|
|
1586
1610
|
/**
|
|
1587
1611
|
* Not currently supported
|
|
1588
1612
|
*/
|
|
1589
|
-
YUV,
|
|
1613
|
+
YUV = 7,
|
|
1590
1614
|
/**
|
|
1591
1615
|
* Single luminance component
|
|
1592
1616
|
*/
|
|
1593
|
-
G_8,
|
|
1617
|
+
G_8 = 8,
|
|
1594
1618
|
/**
|
|
1595
1619
|
* RG, 16 bits. Note that red-green textures
|
|
1596
1620
|
* are only available if {@link Cogl.FeatureID.OGL_FEATURE_ID_TEXTURE_RG} is advertised.
|
|
1597
1621
|
* See `cogl_texture_set_components()` for details.
|
|
1598
1622
|
*/
|
|
1599
|
-
RG_88,
|
|
1623
|
+
RG_88 = 9,
|
|
1600
1624
|
/**
|
|
1601
1625
|
* RGB, 24 bits
|
|
1602
1626
|
*/
|
|
1603
|
-
RGB_888,
|
|
1627
|
+
RGB_888 = 2,
|
|
1604
1628
|
/**
|
|
1605
1629
|
* BGR, 24 bits
|
|
1606
1630
|
*/
|
|
1607
|
-
BGR_888,
|
|
1631
|
+
BGR_888 = 34,
|
|
1608
1632
|
/**
|
|
1609
1633
|
* RGBA, 32 bits
|
|
1610
1634
|
*/
|
|
1611
|
-
RGBA_8888,
|
|
1635
|
+
RGBA_8888 = 19,
|
|
1612
1636
|
/**
|
|
1613
1637
|
* BGRA, 32 bits
|
|
1614
1638
|
*/
|
|
1615
|
-
BGRA_8888,
|
|
1639
|
+
BGRA_8888 = 51,
|
|
1616
1640
|
/**
|
|
1617
1641
|
* ARGB, 32 bits
|
|
1618
1642
|
*/
|
|
1619
|
-
ARGB_8888,
|
|
1643
|
+
ARGB_8888 = 83,
|
|
1620
1644
|
/**
|
|
1621
1645
|
* ABGR, 32 bits
|
|
1622
1646
|
*/
|
|
1623
|
-
ABGR_8888,
|
|
1647
|
+
ABGR_8888 = 115,
|
|
1624
1648
|
/**
|
|
1625
1649
|
* RGBA, 32 bits, 10 bpc
|
|
1626
1650
|
*/
|
|
1627
|
-
RGBA_1010102,
|
|
1651
|
+
RGBA_1010102 = 29,
|
|
1628
1652
|
/**
|
|
1629
1653
|
* BGRA, 32 bits, 10 bpc
|
|
1630
1654
|
*/
|
|
1631
|
-
BGRA_1010102,
|
|
1655
|
+
BGRA_1010102 = 61,
|
|
1632
1656
|
/**
|
|
1633
1657
|
* ARGB, 32 bits, 10 bpc
|
|
1634
1658
|
*/
|
|
1635
|
-
ARGB_2101010,
|
|
1659
|
+
ARGB_2101010 = 93,
|
|
1636
1660
|
/**
|
|
1637
1661
|
* ABGR, 32 bits, 10 bpc
|
|
1638
1662
|
*/
|
|
1639
|
-
ABGR_2101010,
|
|
1663
|
+
ABGR_2101010 = 125,
|
|
1640
1664
|
/**
|
|
1641
1665
|
* RGBA half floating point, 64 bit
|
|
1642
1666
|
*/
|
|
1643
|
-
RGBA_FP_16161616,
|
|
1667
|
+
RGBA_FP_16161616 = 27,
|
|
1644
1668
|
/**
|
|
1645
1669
|
* BGRA half floating point, 64 bit
|
|
1646
1670
|
*/
|
|
1647
|
-
BGRA_FP_16161616,
|
|
1671
|
+
BGRA_FP_16161616 = 59,
|
|
1648
1672
|
/**
|
|
1649
1673
|
* ARGB half floating point, 64 bit
|
|
1650
1674
|
*/
|
|
1651
|
-
ARGB_FP_16161616,
|
|
1675
|
+
ARGB_FP_16161616 = 91,
|
|
1652
1676
|
/**
|
|
1653
1677
|
* ABGR half floating point, 64 bit
|
|
1654
1678
|
*/
|
|
1655
|
-
ABGR_FP_16161616,
|
|
1679
|
+
ABGR_FP_16161616 = 123,
|
|
1656
1680
|
/**
|
|
1657
1681
|
* Premultiplied RGBA, 32 bits
|
|
1658
1682
|
*/
|
|
1659
|
-
RGBA_8888_PRE,
|
|
1683
|
+
RGBA_8888_PRE = 147,
|
|
1660
1684
|
/**
|
|
1661
1685
|
* Premultiplied BGRA, 32 bits
|
|
1662
1686
|
*/
|
|
1663
|
-
BGRA_8888_PRE,
|
|
1687
|
+
BGRA_8888_PRE = 179,
|
|
1664
1688
|
/**
|
|
1665
1689
|
* Premultiplied ARGB, 32 bits
|
|
1666
1690
|
*/
|
|
1667
|
-
ARGB_8888_PRE,
|
|
1691
|
+
ARGB_8888_PRE = 211,
|
|
1668
1692
|
/**
|
|
1669
1693
|
* Premultiplied ABGR, 32 bits
|
|
1670
1694
|
*/
|
|
1671
|
-
ABGR_8888_PRE,
|
|
1695
|
+
ABGR_8888_PRE = 243,
|
|
1672
1696
|
/**
|
|
1673
1697
|
* Premultiplied RGBA, 16 bits
|
|
1674
1698
|
*/
|
|
1675
|
-
RGBA_4444_PRE,
|
|
1699
|
+
RGBA_4444_PRE = 149,
|
|
1676
1700
|
/**
|
|
1677
1701
|
* Premultiplied RGBA, 16 bits
|
|
1678
1702
|
*/
|
|
1679
|
-
RGBA_5551_PRE,
|
|
1703
|
+
RGBA_5551_PRE = 150,
|
|
1680
1704
|
/**
|
|
1681
1705
|
* Premultiplied RGBA, 32 bits, 10 bpc
|
|
1682
1706
|
*/
|
|
1683
|
-
RGBA_1010102_PRE,
|
|
1707
|
+
RGBA_1010102_PRE = 157,
|
|
1684
1708
|
/**
|
|
1685
1709
|
* Premultiplied BGRA, 32 bits, 10 bpc
|
|
1686
1710
|
*/
|
|
1687
|
-
BGRA_1010102_PRE,
|
|
1711
|
+
BGRA_1010102_PRE = 189,
|
|
1688
1712
|
/**
|
|
1689
1713
|
* Premultiplied ARGB, 32 bits, 10 bpc
|
|
1690
1714
|
*/
|
|
1691
|
-
ARGB_2101010_PRE,
|
|
1715
|
+
ARGB_2101010_PRE = 221,
|
|
1692
1716
|
/**
|
|
1693
1717
|
* Premultiplied ABGR, 32 bits, 10 bpc
|
|
1694
1718
|
*/
|
|
1695
|
-
ABGR_2101010_PRE,
|
|
1719
|
+
ABGR_2101010_PRE = 253,
|
|
1696
1720
|
/**
|
|
1697
1721
|
* Premultiplied RGBA half floating point, 64 bit
|
|
1698
1722
|
*/
|
|
1699
|
-
RGBA_FP_16161616_PRE,
|
|
1723
|
+
RGBA_FP_16161616_PRE = 155,
|
|
1700
1724
|
/**
|
|
1701
1725
|
* Premultiplied BGRA half floating point, 64 bit
|
|
1702
1726
|
*/
|
|
1703
|
-
BGRA_FP_16161616_PRE,
|
|
1727
|
+
BGRA_FP_16161616_PRE = 187,
|
|
1704
1728
|
/**
|
|
1705
1729
|
* Premultiplied ARGB half floating point, 64 bit
|
|
1706
1730
|
*/
|
|
1707
|
-
ARGB_FP_16161616_PRE,
|
|
1731
|
+
ARGB_FP_16161616_PRE = 219,
|
|
1708
1732
|
/**
|
|
1709
1733
|
* Premultiplied ABGR half floating point, 64 bit
|
|
1710
1734
|
*/
|
|
1711
|
-
ABGR_FP_16161616_PRE,
|
|
1712
|
-
DEPTH_16,
|
|
1713
|
-
DEPTH_32,
|
|
1714
|
-
DEPTH_24_STENCIL_8,
|
|
1735
|
+
ABGR_FP_16161616_PRE = 251,
|
|
1736
|
+
DEPTH_16 = 265,
|
|
1737
|
+
DEPTH_32 = 259,
|
|
1738
|
+
DEPTH_24_STENCIL_8 = 771,
|
|
1715
1739
|
}
|
|
1716
1740
|
|
|
1717
1741
|
|
|
@@ -1724,7 +1748,7 @@ export namespace Cogl {
|
|
|
1724
1748
|
/**
|
|
1725
1749
|
* Read from the color buffer
|
|
1726
1750
|
*/
|
|
1727
|
-
READ_PIXELS_COLOR_BUFFER,
|
|
1751
|
+
READ_PIXELS_COLOR_BUFFER = 1,
|
|
1728
1752
|
}
|
|
1729
1753
|
|
|
1730
1754
|
|
|
@@ -1737,7 +1761,7 @@ export namespace Cogl {
|
|
|
1737
1761
|
/**
|
|
1738
1762
|
* No flags specified
|
|
1739
1763
|
*/
|
|
1740
|
-
NONE,
|
|
1764
|
+
NONE = 0,
|
|
1741
1765
|
/**
|
|
1742
1766
|
* Disables the automatic generation of
|
|
1743
1767
|
* the mipmap pyramid from the base level image whenever it is
|
|
@@ -1745,16 +1769,16 @@ export namespace Cogl {
|
|
|
1745
1769
|
* rendered with a mipmap filter so it should be free to leave out
|
|
1746
1770
|
* this flag when using other filtering modes
|
|
1747
1771
|
*/
|
|
1748
|
-
NO_AUTO_MIPMAP,
|
|
1772
|
+
NO_AUTO_MIPMAP = 1,
|
|
1749
1773
|
/**
|
|
1750
1774
|
* Disables the slicing of the texture
|
|
1751
1775
|
*/
|
|
1752
|
-
NO_SLICING,
|
|
1776
|
+
NO_SLICING = 2,
|
|
1753
1777
|
/**
|
|
1754
1778
|
* Disables the insertion of the texture inside
|
|
1755
1779
|
* the texture atlas used by Cogl
|
|
1756
1780
|
*/
|
|
1757
|
-
NO_ATLAS,
|
|
1781
|
+
NO_ATLAS = 4,
|
|
1758
1782
|
}
|
|
1759
1783
|
|
|
1760
1784
|
|
|
@@ -1794,27 +1818,32 @@ export namespace Cogl {
|
|
|
1794
1818
|
* Parses an image file enough to extract the width and height
|
|
1795
1819
|
* of the bitmap.
|
|
1796
1820
|
* @param filename the file to check
|
|
1821
|
+
* @since 1.0
|
|
1797
1822
|
*/
|
|
1798
1823
|
static get_size_from_file(filename: string): [boolean, number, number];
|
|
1799
1824
|
|
|
1800
1825
|
// Methods
|
|
1801
1826
|
/**
|
|
1802
1827
|
* @returns the {@link Cogl.PixelFormat} that the data for the bitmap is in.
|
|
1828
|
+
* @since 1.10
|
|
1803
1829
|
*/
|
|
1804
1830
|
get_format(): PixelFormat;
|
|
1805
1831
|
|
|
1806
1832
|
/**
|
|
1807
1833
|
* @returns the height of the bitmap
|
|
1834
|
+
* @since 1.10
|
|
1808
1835
|
*/
|
|
1809
1836
|
get_height(): number;
|
|
1810
1837
|
|
|
1811
1838
|
/**
|
|
1812
1839
|
* @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.
|
|
1840
|
+
* @since 1.10
|
|
1813
1841
|
*/
|
|
1814
1842
|
get_rowstride(): number;
|
|
1815
1843
|
|
|
1816
1844
|
/**
|
|
1817
1845
|
* @returns the width of the bitmap
|
|
1846
|
+
* @since 1.10
|
|
1818
1847
|
*/
|
|
1819
1848
|
get_width(): number;
|
|
1820
1849
|
}
|
|
@@ -1904,6 +1933,7 @@ export namespace Cogl {
|
|
|
1904
1933
|
* Gets the frame counter for the {@link Cogl.Onscreen} that corresponds
|
|
1905
1934
|
* to this frame.
|
|
1906
1935
|
* @returns The frame counter value
|
|
1936
|
+
* @since 1.14
|
|
1907
1937
|
*/
|
|
1908
1938
|
get_frame_counter(): number;
|
|
1909
1939
|
|
|
@@ -1919,6 +1949,7 @@ export namespace Cogl {
|
|
|
1919
1949
|
* OpenGL driver. Also some buggy Mesa drivers up to 9.0.1 may also
|
|
1920
1950
|
* incorrectly report non-monotonic timestamps.</note>
|
|
1921
1951
|
* @returns the presentation time for the frame
|
|
1952
|
+
* @since 1.14
|
|
1922
1953
|
*/
|
|
1923
1954
|
get_presentation_time(): number;
|
|
1924
1955
|
|
|
@@ -1932,6 +1963,7 @@ export namespace Cogl {
|
|
|
1932
1963
|
* more reliable than using `cogl_frame_info_get_output()` followed by
|
|
1933
1964
|
* `cogl_output_get_refresh_rate()`.</note>
|
|
1934
1965
|
* @returns the refresh rate in Hertz
|
|
1966
|
+
* @since 1.14
|
|
1935
1967
|
*/
|
|
1936
1968
|
get_refresh_rate(): number;
|
|
1937
1969
|
}
|
|
@@ -2009,6 +2041,8 @@ export namespace Cogl {
|
|
|
2009
2041
|
* program will abort with an error message if there is an error during
|
|
2010
2042
|
* automatic allocation.</note>
|
|
2011
2043
|
* @returns `true` if there were no error allocating the framebuffer, else `false`.
|
|
2044
|
+
* @since 1.8
|
|
2045
|
+
* @throws GLib.Error
|
|
2012
2046
|
*/
|
|
2013
2047
|
allocate(): boolean;
|
|
2014
2048
|
|
|
@@ -2017,6 +2051,7 @@ export namespace Cogl {
|
|
|
2017
2051
|
* that includes the color buffer then the specified `color` is used.
|
|
2018
2052
|
* @param buffers A mask of {@link Cogl.BufferBit}<!-- -->'s identifying which auxiliary buffers to clear
|
|
2019
2053
|
* @param color The color to clear the color buffer too if specified in `buffers`.
|
|
2054
|
+
* @since 1.8
|
|
2020
2055
|
*/
|
|
2021
2056
|
clear(buffers: bigint | number, color: Color): void;
|
|
2022
2057
|
|
|
@@ -2028,6 +2063,7 @@ export namespace Cogl {
|
|
|
2028
2063
|
* @param green The green component of color to clear the color buffer too if specified in `buffers`.
|
|
2029
2064
|
* @param blue The blue component of color to clear the color buffer too if specified in `buffers`.
|
|
2030
2065
|
* @param alpha The alpha component of color to clear the color buffer too if specified in `buffers`.
|
|
2066
|
+
* @since 1.8
|
|
2031
2067
|
*/
|
|
2032
2068
|
clear4f(buffers: bigint | number, red: number, green: number, blue: number, alpha: number): void;
|
|
2033
2069
|
|
|
@@ -2049,6 +2085,7 @@ export namespace Cogl {
|
|
|
2049
2085
|
* framebuffer, and it's not meaningful to try and discard the color buffer of
|
|
2050
2086
|
* a {@link Cogl.Offscreen} framebuffer since they are single-buffered.
|
|
2051
2087
|
* @param buffers A {@link Cogl.BufferBit} mask of which ancillary buffers you want to discard.
|
|
2088
|
+
* @since 1.8
|
|
2052
2089
|
*/
|
|
2053
2090
|
discard_buffers(buffers: bigint | number): void;
|
|
2054
2091
|
|
|
@@ -2098,6 +2135,7 @@ export namespace Cogl {
|
|
|
2098
2135
|
* @param y_2 y coordinate lower right on screen.
|
|
2099
2136
|
* @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.
|
|
2100
2137
|
* @param tex_coords_len The length of the `tex_coords` array. (For one layer and one group of texture coordinates, this would be 4)
|
|
2138
|
+
* @since 1.10
|
|
2101
2139
|
*/
|
|
2102
2140
|
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;
|
|
2103
2141
|
|
|
@@ -2118,6 +2156,7 @@ export namespace Cogl {
|
|
|
2118
2156
|
* @param y_1 Y coordinate of the top-left corner
|
|
2119
2157
|
* @param x_2 X coordinate of the bottom-right corner
|
|
2120
2158
|
* @param y_2 Y coordinate of the bottom-right corner
|
|
2159
|
+
* @since 1.10
|
|
2121
2160
|
*/
|
|
2122
2161
|
draw_rectangle(pipeline: Pipeline, x_1: number, y_1: number, x_2: number, y_2: number): void;
|
|
2123
2162
|
|
|
@@ -2144,6 +2183,7 @@ export namespace Cogl {
|
|
|
2144
2183
|
* @param pipeline A {@link Cogl.Pipeline} state object
|
|
2145
2184
|
* @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).
|
|
2146
2185
|
* @param n_rectangles number of rectangles defined in `coordinates`.
|
|
2186
|
+
* @since 1.10
|
|
2147
2187
|
*/
|
|
2148
2188
|
draw_rectangles(pipeline: Pipeline, coordinates: number[], n_rectangles: number): void;
|
|
2149
2189
|
|
|
@@ -2183,6 +2223,7 @@ export namespace Cogl {
|
|
|
2183
2223
|
* @param t_1 T texture coordinate of the top-left coorner
|
|
2184
2224
|
* @param s_2 S texture coordinate of the bottom-right coorner
|
|
2185
2225
|
* @param t_2 T texture coordinate of the bottom-right coorner
|
|
2226
|
+
* @since 1.10
|
|
2186
2227
|
*/
|
|
2187
2228
|
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;
|
|
2188
2229
|
|
|
@@ -2224,6 +2265,7 @@ export namespace Cogl {
|
|
|
2224
2265
|
* @param pipeline A {@link Cogl.Pipeline} state object
|
|
2225
2266
|
* @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()`.
|
|
2226
2267
|
* @param n_rectangles number of rectangles to `coordinates` to draw
|
|
2268
|
+
* @since 1.10
|
|
2227
2269
|
*/
|
|
2228
2270
|
draw_textured_rectangles(pipeline: Pipeline, coordinates: number[], n_rectangles: number): void;
|
|
2229
2271
|
|
|
@@ -2237,6 +2279,7 @@ export namespace Cogl {
|
|
|
2237
2279
|
* One example might be for benchmarking purposes to be sure timing
|
|
2238
2280
|
* measurements reflect the time that the GPU is busy for not just the time it
|
|
2239
2281
|
* takes to queue rendering commands.
|
|
2282
|
+
* @since 1.10
|
|
2240
2283
|
*/
|
|
2241
2284
|
finish(): void;
|
|
2242
2285
|
|
|
@@ -2258,18 +2301,21 @@ export namespace Cogl {
|
|
|
2258
2301
|
* @param top Y position of the top clipping plane where it intersects the near clipping plane
|
|
2259
2302
|
* @param z_near The distance to the near clipping plane (Must be positive)
|
|
2260
2303
|
* @param z_far The distance to the far clipping plane (Must be positive)
|
|
2304
|
+
* @since 1.10
|
|
2261
2305
|
*/
|
|
2262
2306
|
frustum(left: number, right: number, bottom: number, top: number, z_near: number, z_far: number): void;
|
|
2263
2307
|
|
|
2264
2308
|
/**
|
|
2265
2309
|
* Retrieves the number of alpha bits of `framebuffer`
|
|
2266
2310
|
* @returns the number of bits
|
|
2311
|
+
* @since 1.8
|
|
2267
2312
|
*/
|
|
2268
2313
|
get_alpha_bits(): number;
|
|
2269
2314
|
|
|
2270
2315
|
/**
|
|
2271
2316
|
* Retrieves the number of blue bits of `framebuffer`
|
|
2272
2317
|
* @returns the number of bits
|
|
2318
|
+
* @since 1.8
|
|
2273
2319
|
*/
|
|
2274
2320
|
get_blue_bits(): number;
|
|
2275
2321
|
|
|
@@ -2278,12 +2324,14 @@ export namespace Cogl {
|
|
|
2278
2324
|
* instantiated within. This is the {@link Cogl.Context} that was passed to
|
|
2279
2325
|
* `cogl_onscreen_new()` for example.
|
|
2280
2326
|
* @returns The {@link Cogl.Context} that the given `framebuffer` was instantiated within.
|
|
2327
|
+
* @since 1.8
|
|
2281
2328
|
*/
|
|
2282
2329
|
get_context(): Context;
|
|
2283
2330
|
|
|
2284
2331
|
/**
|
|
2285
2332
|
* Retrieves the number of depth bits of `framebuffer`
|
|
2286
2333
|
* @returns the number of bits
|
|
2334
|
+
* @since 2.0
|
|
2287
2335
|
*/
|
|
2288
2336
|
get_depth_bits(): number;
|
|
2289
2337
|
|
|
@@ -2291,6 +2339,7 @@ export namespace Cogl {
|
|
|
2291
2339
|
* Queries whether depth buffer writing is enabled for `framebuffer`. This
|
|
2292
2340
|
* can be controlled via `cogl_framebuffer_set_depth_write_enabled()`.
|
|
2293
2341
|
* @returns `true` if depth writing is enabled or `false` if not.
|
|
2342
|
+
* @since 1.18
|
|
2294
2343
|
*/
|
|
2295
2344
|
get_depth_write_enabled(): boolean;
|
|
2296
2345
|
|
|
@@ -2302,18 +2351,21 @@ export namespace Cogl {
|
|
|
2302
2351
|
* display pipeline does not support dithering. This value only represents
|
|
2303
2352
|
* the user's request for dithering.</note>
|
|
2304
2353
|
* @returns `true` if dithering has been requested or `false` if not.
|
|
2354
|
+
* @since 1.8
|
|
2305
2355
|
*/
|
|
2306
2356
|
get_dither_enabled(): boolean;
|
|
2307
2357
|
|
|
2308
2358
|
/**
|
|
2309
2359
|
* Retrieves the number of green bits of `framebuffer`
|
|
2310
2360
|
* @returns the number of bits
|
|
2361
|
+
* @since 1.8
|
|
2311
2362
|
*/
|
|
2312
2363
|
get_green_bits(): number;
|
|
2313
2364
|
|
|
2314
2365
|
/**
|
|
2315
2366
|
* Queries the current height of the given `framebuffer`.
|
|
2316
2367
|
* @returns The height of `framebuffer`.
|
|
2368
|
+
* @since 1.8
|
|
2317
2369
|
*/
|
|
2318
2370
|
get_height(): number;
|
|
2319
2371
|
|
|
@@ -2321,17 +2373,20 @@ export namespace Cogl {
|
|
|
2321
2373
|
|
|
2322
2374
|
/**
|
|
2323
2375
|
* Stores the current model-view matrix in `matrix`.
|
|
2376
|
+
* @since 1.10
|
|
2324
2377
|
*/
|
|
2325
2378
|
get_modelview_matrix(): Matrix;
|
|
2326
2379
|
|
|
2327
2380
|
/**
|
|
2328
2381
|
* Stores the current projection matrix in `matrix`.
|
|
2382
|
+
* @since 1.10
|
|
2329
2383
|
*/
|
|
2330
2384
|
get_projection_matrix(): Matrix;
|
|
2331
2385
|
|
|
2332
2386
|
/**
|
|
2333
2387
|
* Retrieves the number of red bits of `framebuffer`
|
|
2334
2388
|
* @returns the number of bits
|
|
2389
|
+
* @since 1.8
|
|
2335
2390
|
*/
|
|
2336
2391
|
get_red_bits(): number;
|
|
2337
2392
|
|
|
@@ -2349,6 +2404,7 @@ export namespace Cogl {
|
|
|
2349
2404
|
* framebuffer has been allocated the value will reflect the actual
|
|
2350
2405
|
* number of samples that will be made by the GPU.
|
|
2351
2406
|
* @returns The number of point samples made per pixel when rasterizing geometry or 0 if single-sample rendering has been chosen.
|
|
2407
|
+
* @since 1.10
|
|
2352
2408
|
*/
|
|
2353
2409
|
get_samples_per_pixel(): number;
|
|
2354
2410
|
|
|
@@ -2356,6 +2412,7 @@ export namespace Cogl {
|
|
|
2356
2412
|
* Gets the current {@link Cogl.StereoMode}, which defines which stereo buffers
|
|
2357
2413
|
* should be drawn to. See `cogl_framebuffer_set_stereo_mode()`.
|
|
2358
2414
|
* @returns A {@link Cogl.StereoMode}
|
|
2415
|
+
* @since 1.20
|
|
2359
2416
|
*/
|
|
2360
2417
|
get_stereo_mode(): StereoMode;
|
|
2361
2418
|
|
|
@@ -2364,6 +2421,7 @@ export namespace Cogl {
|
|
|
2364
2421
|
* using `cogl_framebuffer_set_viewport()` or the default values which are 0, 0,
|
|
2365
2422
|
* framebuffer_width and framebuffer_height. The values are written into the
|
|
2366
2423
|
* given `viewport` array.
|
|
2424
|
+
* @since 1.8
|
|
2367
2425
|
*/
|
|
2368
2426
|
get_viewport4fv(): number[];
|
|
2369
2427
|
|
|
@@ -2371,6 +2429,7 @@ export namespace Cogl {
|
|
|
2371
2429
|
* Queries the height of the viewport as set using `cogl_framebuffer_set_viewport()`
|
|
2372
2430
|
* or the default value which is the height of the framebuffer.
|
|
2373
2431
|
* @returns The height of the viewport.
|
|
2432
|
+
* @since 1.8
|
|
2374
2433
|
*/
|
|
2375
2434
|
get_viewport_height(): number;
|
|
2376
2435
|
|
|
@@ -2378,6 +2437,7 @@ export namespace Cogl {
|
|
|
2378
2437
|
* Queries the width of the viewport as set using `cogl_framebuffer_set_viewport()`
|
|
2379
2438
|
* or the default value which is the width of the framebuffer.
|
|
2380
2439
|
* @returns The width of the viewport.
|
|
2440
|
+
* @since 1.8
|
|
2381
2441
|
*/
|
|
2382
2442
|
get_viewport_width(): number;
|
|
2383
2443
|
|
|
@@ -2385,6 +2445,7 @@ export namespace Cogl {
|
|
|
2385
2445
|
* Queries the x coordinate of the viewport origin as set using `cogl_framebuffer_set_viewport()`
|
|
2386
2446
|
* or the default value which is 0.
|
|
2387
2447
|
* @returns The x coordinate of the viewport origin.
|
|
2448
|
+
* @since 1.8
|
|
2388
2449
|
*/
|
|
2389
2450
|
get_viewport_x(): number;
|
|
2390
2451
|
|
|
@@ -2392,17 +2453,20 @@ export namespace Cogl {
|
|
|
2392
2453
|
* Queries the y coordinate of the viewport origin as set using `cogl_framebuffer_set_viewport()`
|
|
2393
2454
|
* or the default value which is 0.
|
|
2394
2455
|
* @returns The y coordinate of the viewport origin.
|
|
2456
|
+
* @since 1.8
|
|
2395
2457
|
*/
|
|
2396
2458
|
get_viewport_y(): number;
|
|
2397
2459
|
|
|
2398
2460
|
/**
|
|
2399
2461
|
* Queries the current width of the given `framebuffer`.
|
|
2400
2462
|
* @returns The width of `framebuffer`.
|
|
2463
|
+
* @since 1.8
|
|
2401
2464
|
*/
|
|
2402
2465
|
get_width(): number;
|
|
2403
2466
|
|
|
2404
2467
|
/**
|
|
2405
2468
|
* Resets the current model-view matrix to the identity matrix.
|
|
2469
|
+
* @since 1.10
|
|
2406
2470
|
*/
|
|
2407
2471
|
identity_matrix(): void;
|
|
2408
2472
|
|
|
@@ -2415,6 +2479,7 @@ export namespace Cogl {
|
|
|
2415
2479
|
* @param y_2 The y coordinate for the second horizontal clipping plane
|
|
2416
2480
|
* @param near The <emphasis>distance</emphasis> to the near clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
2417
2481
|
* @param far The <emphasis>distance</emphasis> to the far clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
2482
|
+
* @since 1.10
|
|
2418
2483
|
*/
|
|
2419
2484
|
orthographic(x_1: number, y_1: number, x_2: number, y_2: number, near: number, far: number): void;
|
|
2420
2485
|
|
|
@@ -2430,6 +2495,7 @@ export namespace Cogl {
|
|
|
2430
2495
|
* @param aspect The (width over height) aspect ratio for display
|
|
2431
2496
|
* @param z_near The distance to the near clipping plane (Must be positive, and must not be 0)
|
|
2432
2497
|
* @param z_far The distance to the far clipping plane (Must be positive)
|
|
2498
|
+
* @since 1.10
|
|
2433
2499
|
*/
|
|
2434
2500
|
perspective(fov_y: number, aspect: number, z_near: number, z_far: number): void;
|
|
2435
2501
|
|
|
@@ -2437,17 +2503,20 @@ export namespace Cogl {
|
|
|
2437
2503
|
* Reverts the clipping region to the state before the last call to
|
|
2438
2504
|
* `cogl_framebuffer_push_scissor_clip()`, `cogl_framebuffer_push_rectangle_clip()`
|
|
2439
2505
|
* `cogl_framebuffer_push_path_clip()`, or `cogl_framebuffer_push_primitive_clip()`.
|
|
2506
|
+
* @since 1.10
|
|
2440
2507
|
*/
|
|
2441
2508
|
pop_clip(): void;
|
|
2442
2509
|
|
|
2443
2510
|
/**
|
|
2444
2511
|
* Restores the model-view matrix on the top of the matrix stack.
|
|
2512
|
+
* @since 1.10
|
|
2445
2513
|
*/
|
|
2446
2514
|
pop_matrix(): void;
|
|
2447
2515
|
|
|
2448
2516
|
/**
|
|
2449
2517
|
* Copies the current model-view matrix onto the matrix stack. The matrix
|
|
2450
2518
|
* can later be restored with `cogl_framebuffer_pop_matrix()`.
|
|
2519
|
+
* @since 1.10
|
|
2451
2520
|
*/
|
|
2452
2521
|
push_matrix(): void;
|
|
2453
2522
|
|
|
@@ -2464,6 +2533,7 @@ export namespace Cogl {
|
|
|
2464
2533
|
* @param y_1 y coordinate for top left corner of the clip rectangle
|
|
2465
2534
|
* @param x_2 x coordinate for bottom right corner of the clip rectangle
|
|
2466
2535
|
* @param y_2 y coordinate for bottom right corner of the clip rectangle
|
|
2536
|
+
* @since 1.10
|
|
2467
2537
|
*/
|
|
2468
2538
|
push_rectangle_clip(x_1: number, y_1: number, x_2: number, y_2: number): void;
|
|
2469
2539
|
|
|
@@ -2485,6 +2555,7 @@ export namespace Cogl {
|
|
|
2485
2555
|
* @param y top edge of the clip rectangle in window coordinates
|
|
2486
2556
|
* @param width width of the clip rectangle
|
|
2487
2557
|
* @param height height of the clip rectangle
|
|
2558
|
+
* @since 1.10
|
|
2488
2559
|
*/
|
|
2489
2560
|
push_scissor_clip(x: number, y: number, width: number, height: number): void;
|
|
2490
2561
|
|
|
@@ -2522,6 +2593,7 @@ export namespace Cogl {
|
|
|
2522
2593
|
* @param format The pixel format to store the data in
|
|
2523
2594
|
* @param pixels The address of the buffer to store the data in
|
|
2524
2595
|
* @returns `true` if the read succeeded or `false` otherwise.
|
|
2596
|
+
* @since 1.10
|
|
2525
2597
|
*/
|
|
2526
2598
|
read_pixels(x: number, y: number, width: number, height: number, format: PixelFormat, pixels: number): boolean;
|
|
2527
2599
|
|
|
@@ -2541,6 +2613,7 @@ export namespace Cogl {
|
|
|
2541
2613
|
* @param source Identifies which auxiliary buffer you want to read (only COGL_READ_PIXELS_COLOR_BUFFER supported currently)
|
|
2542
2614
|
* @param bitmap The bitmap to store the results in.
|
|
2543
2615
|
* @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.
|
|
2616
|
+
* @since 1.10
|
|
2544
2617
|
*/
|
|
2545
2618
|
read_pixels_into_bitmap(x: number, y: number, source: ReadPixelsFlags, bitmap: Bitmap): boolean;
|
|
2546
2619
|
|
|
@@ -2565,6 +2638,7 @@ export namespace Cogl {
|
|
|
2565
2638
|
* If you are performing incremental updates to a framebuffer you
|
|
2566
2639
|
* should consider using `cogl_framebuffer_resolve_samples_region()`
|
|
2567
2640
|
* instead to avoid resolving redundant pixels.
|
|
2641
|
+
* @since 1.8
|
|
2568
2642
|
*/
|
|
2569
2643
|
resolve_samples(): void;
|
|
2570
2644
|
|
|
@@ -2594,6 +2668,7 @@ export namespace Cogl {
|
|
|
2594
2668
|
* @param y top-left y coordinate of region to resolve
|
|
2595
2669
|
* @param width width of region to resolve
|
|
2596
2670
|
* @param height height of region to resolve
|
|
2671
|
+
* @since 1.8
|
|
2597
2672
|
*/
|
|
2598
2673
|
resolve_samples_region(x: number, y: number, width: number, height: number): void;
|
|
2599
2674
|
|
|
@@ -2607,6 +2682,7 @@ export namespace Cogl {
|
|
|
2607
2682
|
* @param x X-component of vertex to rotate around.
|
|
2608
2683
|
* @param y Y-component of vertex to rotate around.
|
|
2609
2684
|
* @param z Z-component of vertex to rotate around.
|
|
2685
|
+
* @since 1.10
|
|
2610
2686
|
*/
|
|
2611
2687
|
rotate(angle: number, x: number, y: number, z: number): void;
|
|
2612
2688
|
|
|
@@ -2614,6 +2690,7 @@ export namespace Cogl {
|
|
|
2614
2690
|
* Multiplies the current model-view matrix by one that rotates
|
|
2615
2691
|
* according to the rotation described by `euler`.
|
|
2616
2692
|
* @param euler A {@link Graphene.Euler}
|
|
2693
|
+
* @since 2.0
|
|
2617
2694
|
*/
|
|
2618
2695
|
rotate_euler(euler: Graphene.Euler): void;
|
|
2619
2696
|
|
|
@@ -2623,6 +2700,7 @@ export namespace Cogl {
|
|
|
2623
2700
|
* @param x Amount to scale along the x-axis
|
|
2624
2701
|
* @param y Amount to scale along the y-axis
|
|
2625
2702
|
* @param z Amount to scale along the z-axis
|
|
2703
|
+
* @since 1.10
|
|
2626
2704
|
*/
|
|
2627
2705
|
scale(x: number, y: number, z: number): void;
|
|
2628
2706
|
|
|
@@ -2634,6 +2712,7 @@ export namespace Cogl {
|
|
|
2634
2712
|
*
|
|
2635
2713
|
* Depth buffer writing is enabled by default.
|
|
2636
2714
|
* @param depth_write_enabled `true` to enable depth writing or `false` to disable
|
|
2715
|
+
* @since 1.18
|
|
2637
2716
|
*/
|
|
2638
2717
|
set_depth_write_enabled(depth_write_enabled: boolean): void;
|
|
2639
2718
|
|
|
@@ -2652,18 +2731,21 @@ export namespace Cogl {
|
|
|
2652
2731
|
*
|
|
2653
2732
|
* Dithering is enabled by default.
|
|
2654
2733
|
* @param dither_enabled `true` to enable dithering or `false` to disable
|
|
2734
|
+
* @since 1.8
|
|
2655
2735
|
*/
|
|
2656
2736
|
set_dither_enabled(dither_enabled: boolean): void;
|
|
2657
2737
|
|
|
2658
2738
|
/**
|
|
2659
2739
|
* Sets `matrix` as the new model-view matrix.
|
|
2660
2740
|
* @param matrix the new model-view matrix
|
|
2741
|
+
* @since 1.10
|
|
2661
2742
|
*/
|
|
2662
2743
|
set_modelview_matrix(matrix: Matrix): void;
|
|
2663
2744
|
|
|
2664
2745
|
/**
|
|
2665
2746
|
* Sets `matrix` as the new projection matrix.
|
|
2666
2747
|
* @param matrix the new projection matrix
|
|
2748
|
+
* @since 1.10
|
|
2667
2749
|
*/
|
|
2668
2750
|
set_projection_matrix(matrix: Matrix): void;
|
|
2669
2751
|
|
|
@@ -2701,6 +2783,7 @@ export namespace Cogl {
|
|
|
2701
2783
|
* framebuffer has changed this can lead to redundant work being
|
|
2702
2784
|
* done.</note>
|
|
2703
2785
|
* @param samples_per_pixel The minimum number of samples per pixel
|
|
2786
|
+
* @since 1.8
|
|
2704
2787
|
*/
|
|
2705
2788
|
set_samples_per_pixel(samples_per_pixel: number): void;
|
|
2706
2789
|
|
|
@@ -2713,6 +2796,7 @@ export namespace Cogl {
|
|
|
2713
2796
|
* enabled. (See `cogl_onscreen_template_set_stereo_enabled()`,
|
|
2714
2797
|
* `cogl_framebuffer_get_is_stereo()`.)
|
|
2715
2798
|
* @param stereo_mode A {@link Cogl.StereoMode} specifying which stereo buffers should be drawn tow.
|
|
2799
|
+
* @since 1.20
|
|
2716
2800
|
*/
|
|
2717
2801
|
set_stereo_mode(stereo_mode: StereoMode): void;
|
|
2718
2802
|
|
|
@@ -2736,12 +2820,14 @@ export namespace Cogl {
|
|
|
2736
2820
|
* @param y The top-left y coordinate of the viewport origin (only integers supported currently)
|
|
2737
2821
|
* @param width The width of the viewport (only integers supported currently)
|
|
2738
2822
|
* @param height The height of the viewport (only integers supported currently)
|
|
2823
|
+
* @since 1.8
|
|
2739
2824
|
*/
|
|
2740
2825
|
set_viewport(x: number, y: number, width: number, height: number): void;
|
|
2741
2826
|
|
|
2742
2827
|
/**
|
|
2743
2828
|
* Multiplies the current model-view matrix by the given matrix.
|
|
2744
2829
|
* @param matrix the matrix to multiply with the current model-view
|
|
2830
|
+
* @since 1.10
|
|
2745
2831
|
*/
|
|
2746
2832
|
transform(matrix: Matrix): void;
|
|
2747
2833
|
|
|
@@ -2751,6 +2837,7 @@ export namespace Cogl {
|
|
|
2751
2837
|
* @param x Distance to translate along the x-axis
|
|
2752
2838
|
* @param y Distance to translate along the y-axis
|
|
2753
2839
|
* @param z Distance to translate along the z-axis
|
|
2840
|
+
* @since 1.10
|
|
2754
2841
|
*/
|
|
2755
2842
|
translate(x: number, y: number, z: number): void;
|
|
2756
2843
|
}
|
|
@@ -2804,6 +2891,7 @@ export namespace Cogl {
|
|
|
2804
2891
|
* @param callback A callback function to call for dirty events
|
|
2805
2892
|
* @param destroy An optional callback to destroy `user_data` when the `callback` is removed or `onscreen` is freed.
|
|
2806
2893
|
* @returns a {@link Cogl.OnscreenDirtyClosure} pointer that can be used to remove the callback and associated `user_data` later.
|
|
2894
|
+
* @since 1.16
|
|
2807
2895
|
*/
|
|
2808
2896
|
add_dirty_callback(callback: OnscreenDirtyCallback, destroy: UserDataDestroyCallback | null): OnscreenDirtyClosure;
|
|
2809
2897
|
|
|
@@ -2834,6 +2922,7 @@ export namespace Cogl {
|
|
|
2834
2922
|
* @param callback A callback function to call for frame events
|
|
2835
2923
|
* @param destroy An optional callback to destroy `user_data` when the `callback` is removed or `onscreen` is freed.
|
|
2836
2924
|
* @returns a {@link Cogl.FrameClosure} pointer that can be used to remove the callback and associated `user_data` later.
|
|
2925
|
+
* @since 1.14
|
|
2837
2926
|
*/
|
|
2838
2927
|
add_frame_callback(callback: FrameCallback, destroy: UserDataDestroyCallback | null): FrameClosure;
|
|
2839
2928
|
|
|
@@ -2859,6 +2948,7 @@ export namespace Cogl {
|
|
|
2859
2948
|
* @param callback A {@link Cogl.OnscreenResizeCallback} to call when the `onscreen` changes size.
|
|
2860
2949
|
* @param destroy An optional callback to destroy `user_data` when the `callback` is removed or `onscreen` is freed.
|
|
2861
2950
|
* @returns a {@link Cogl.OnscreenResizeClosure} pointer that can be used to remove the callback and associated `user_data` later.
|
|
2951
|
+
* @since 2.0
|
|
2862
2952
|
*/
|
|
2863
2953
|
add_resize_callback(callback: OnscreenResizeCallback, destroy: UserDataDestroyCallback | null): OnscreenResizeClosure;
|
|
2864
2954
|
|
|
@@ -2902,6 +2992,7 @@ export namespace Cogl {
|
|
|
2902
2992
|
* age of {@link Cogl.Onscreen} back buffer contents. If this feature is
|
|
2903
2993
|
* missing then this function will always return 0.</note>
|
|
2904
2994
|
* @returns The age of the buffer contents or 0 when the buffer contents are undefined.
|
|
2995
|
+
* @since 1.14
|
|
2905
2996
|
*/
|
|
2906
2997
|
get_buffer_age(): number;
|
|
2907
2998
|
|
|
@@ -2911,6 +3002,7 @@ export namespace Cogl {
|
|
|
2911
3002
|
* `cogl_onscreen_swap_buffers()` or `cogl_onscreen_swap_region()`
|
|
2912
3003
|
* is called.
|
|
2913
3004
|
* @returns the current frame counter value
|
|
3005
|
+
* @since 1.14
|
|
2914
3006
|
*/
|
|
2915
3007
|
get_frame_counter(): number;
|
|
2916
3008
|
|
|
@@ -2930,6 +3022,7 @@ export namespace Cogl {
|
|
|
2930
3022
|
* meaningful with your window system, only whether the `onscreen` has
|
|
2931
3023
|
* been marked as resizable.</note>
|
|
2932
3024
|
* @returns Returns whether `onscreen` has been marked as resizable or not.
|
|
3025
|
+
* @since 2.0
|
|
2933
3026
|
*/
|
|
2934
3027
|
get_resizable(): boolean;
|
|
2935
3028
|
|
|
@@ -2948,6 +3041,7 @@ export namespace Cogl {
|
|
|
2948
3041
|
* requests e.g. to show an already visible window. This also means
|
|
2949
3042
|
* that it's acceptable to alternatively use native APIs to show and
|
|
2950
3043
|
* hide windows without confusing Cogl.</note>
|
|
3044
|
+
* @since 2.0
|
|
2951
3045
|
*/
|
|
2952
3046
|
hide(): void;
|
|
2953
3047
|
|
|
@@ -2959,6 +3053,7 @@ export namespace Cogl {
|
|
|
2959
3053
|
* `cogl_onscreen_add_dirty_callback()` to destroy the user data then
|
|
2960
3054
|
* this will also get called.
|
|
2961
3055
|
* @param closure A {@link Cogl.OnscreenDirtyClosure} returned from `cogl_onscreen_add_dirty_callback()`
|
|
3056
|
+
* @since 1.16
|
|
2962
3057
|
*/
|
|
2963
3058
|
remove_dirty_callback(closure: OnscreenDirtyClosure): void;
|
|
2964
3059
|
|
|
@@ -2970,6 +3065,7 @@ export namespace Cogl {
|
|
|
2970
3065
|
* `cogl_onscreen_add_frame_callback()` to destroy the user data then
|
|
2971
3066
|
* this will get called.
|
|
2972
3067
|
* @param closure A {@link Cogl.FrameClosure} returned from `cogl_onscreen_add_frame_callback()`
|
|
3068
|
+
* @since 1.14
|
|
2973
3069
|
*/
|
|
2974
3070
|
remove_frame_callback(closure: FrameClosure): void;
|
|
2975
3071
|
|
|
@@ -2977,6 +3073,7 @@ export namespace Cogl {
|
|
|
2977
3073
|
* Removes a resize `callback` and `user_data` pair that were previously
|
|
2978
3074
|
* associated with `onscreen` via `cogl_onscreen_add_resize_callback()`.
|
|
2979
3075
|
* @param closure An identifier returned from `cogl_onscreen_add_resize_callback()`
|
|
3076
|
+
* @since 2.0
|
|
2980
3077
|
*/
|
|
2981
3078
|
remove_resize_callback(closure: OnscreenResizeClosure): void;
|
|
2982
3079
|
|
|
@@ -3004,6 +3101,7 @@ export namespace Cogl {
|
|
|
3004
3101
|
* resize handler using `cogl_onscreen_add_resize_callback()` so that it
|
|
3005
3102
|
* can track when the viewport has been changed automatically.</note>
|
|
3006
3103
|
* @param resizable
|
|
3104
|
+
* @since 2.0
|
|
3007
3105
|
*/
|
|
3008
3106
|
set_resizable(resizable: boolean): void;
|
|
3009
3107
|
|
|
@@ -3028,6 +3126,7 @@ export namespace Cogl {
|
|
|
3028
3126
|
* requests e.g. to show an already visible window. This also means
|
|
3029
3127
|
* that it's acceptable to alternatively use native APIs to show and
|
|
3030
3128
|
* hide windows without confusing Cogl.</note>
|
|
3129
|
+
* @since 2.0
|
|
3031
3130
|
*/
|
|
3032
3131
|
show(): void;
|
|
3033
3132
|
|
|
@@ -3046,6 +3145,7 @@ export namespace Cogl {
|
|
|
3046
3145
|
* perform incremental updates to older buffers instead of having to
|
|
3047
3146
|
* render a full buffer for every frame.</note>
|
|
3048
3147
|
* @param frame_info
|
|
3148
|
+
* @since 1.10
|
|
3049
3149
|
*/
|
|
3050
3150
|
swap_buffers(frame_info: FrameInfo): void;
|
|
3051
3151
|
|
|
@@ -3090,6 +3190,7 @@ export namespace Cogl {
|
|
|
3090
3190
|
* @param rectangles An array of integer 4-tuples representing damaged rectangles as (x, y, width, height) tuples.
|
|
3091
3191
|
* @param n_rectangles The number of 4-tuples to be read from `rectangles`
|
|
3092
3192
|
* @param info
|
|
3193
|
+
* @since 1.16
|
|
3093
3194
|
*/
|
|
3094
3195
|
swap_buffers_with_damage(rectangles: number, n_rectangles: number, info: FrameInfo): void;
|
|
3095
3196
|
|
|
@@ -3106,6 +3207,7 @@ export namespace Cogl {
|
|
|
3106
3207
|
* @param rectangles An array of integer 4-tuples representing rectangles as (x, y, width, height) tuples.
|
|
3107
3208
|
* @param n_rectangles The number of 4-tuples to be read from `rectangles`
|
|
3108
3209
|
* @param info
|
|
3210
|
+
* @since 1.10
|
|
3109
3211
|
*/
|
|
3110
3212
|
swap_region(rectangles: number, n_rectangles: number, info: FrameInfo): void;
|
|
3111
3213
|
|
|
@@ -3121,6 +3223,8 @@ export namespace Cogl {
|
|
|
3121
3223
|
* program will abort with an error message if there is an error during
|
|
3122
3224
|
* automatic allocation.</note>
|
|
3123
3225
|
* @returns `true` if there were no error allocating the framebuffer, else `false`.
|
|
3226
|
+
* @since 1.8
|
|
3227
|
+
* @throws GLib.Error
|
|
3124
3228
|
*/
|
|
3125
3229
|
allocate(): boolean;
|
|
3126
3230
|
|
|
@@ -3129,6 +3233,7 @@ export namespace Cogl {
|
|
|
3129
3233
|
* that includes the color buffer then the specified `color` is used.
|
|
3130
3234
|
* @param buffers A mask of {@link Cogl.BufferBit}<!-- -->'s identifying which auxiliary buffers to clear
|
|
3131
3235
|
* @param color The color to clear the color buffer too if specified in `buffers`.
|
|
3236
|
+
* @since 1.8
|
|
3132
3237
|
*/
|
|
3133
3238
|
clear(buffers: bigint | number, color: Color): void;
|
|
3134
3239
|
|
|
@@ -3140,6 +3245,7 @@ export namespace Cogl {
|
|
|
3140
3245
|
* @param green The green component of color to clear the color buffer too if specified in `buffers`.
|
|
3141
3246
|
* @param blue The blue component of color to clear the color buffer too if specified in `buffers`.
|
|
3142
3247
|
* @param alpha The alpha component of color to clear the color buffer too if specified in `buffers`.
|
|
3248
|
+
* @since 1.8
|
|
3143
3249
|
*/
|
|
3144
3250
|
clear4f(buffers: bigint | number, red: number, green: number, blue: number, alpha: number): void;
|
|
3145
3251
|
|
|
@@ -3161,6 +3267,7 @@ export namespace Cogl {
|
|
|
3161
3267
|
* framebuffer, and it's not meaningful to try and discard the color buffer of
|
|
3162
3268
|
* a {@link Cogl.Offscreen} framebuffer since they are single-buffered.
|
|
3163
3269
|
* @param buffers A {@link Cogl.BufferBit} mask of which ancillary buffers you want to discard.
|
|
3270
|
+
* @since 1.8
|
|
3164
3271
|
*/
|
|
3165
3272
|
discard_buffers(buffers: bigint | number): void;
|
|
3166
3273
|
|
|
@@ -3210,6 +3317,7 @@ export namespace Cogl {
|
|
|
3210
3317
|
* @param y_2 y coordinate lower right on screen.
|
|
3211
3318
|
* @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.
|
|
3212
3319
|
* @param tex_coords_len The length of the `tex_coords` array. (For one layer and one group of texture coordinates, this would be 4)
|
|
3320
|
+
* @since 1.10
|
|
3213
3321
|
*/
|
|
3214
3322
|
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;
|
|
3215
3323
|
|
|
@@ -3230,6 +3338,7 @@ export namespace Cogl {
|
|
|
3230
3338
|
* @param y_1 Y coordinate of the top-left corner
|
|
3231
3339
|
* @param x_2 X coordinate of the bottom-right corner
|
|
3232
3340
|
* @param y_2 Y coordinate of the bottom-right corner
|
|
3341
|
+
* @since 1.10
|
|
3233
3342
|
*/
|
|
3234
3343
|
draw_rectangle(pipeline: Pipeline, x_1: number, y_1: number, x_2: number, y_2: number): void;
|
|
3235
3344
|
|
|
@@ -3256,6 +3365,7 @@ export namespace Cogl {
|
|
|
3256
3365
|
* @param pipeline A {@link Cogl.Pipeline} state object
|
|
3257
3366
|
* @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).
|
|
3258
3367
|
* @param n_rectangles number of rectangles defined in `coordinates`.
|
|
3368
|
+
* @since 1.10
|
|
3259
3369
|
*/
|
|
3260
3370
|
draw_rectangles(pipeline: Pipeline, coordinates: number[], n_rectangles: number): void;
|
|
3261
3371
|
|
|
@@ -3295,6 +3405,7 @@ export namespace Cogl {
|
|
|
3295
3405
|
* @param t_1 T texture coordinate of the top-left coorner
|
|
3296
3406
|
* @param s_2 S texture coordinate of the bottom-right coorner
|
|
3297
3407
|
* @param t_2 T texture coordinate of the bottom-right coorner
|
|
3408
|
+
* @since 1.10
|
|
3298
3409
|
*/
|
|
3299
3410
|
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;
|
|
3300
3411
|
|
|
@@ -3336,6 +3447,7 @@ export namespace Cogl {
|
|
|
3336
3447
|
* @param pipeline A {@link Cogl.Pipeline} state object
|
|
3337
3448
|
* @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()`.
|
|
3338
3449
|
* @param n_rectangles number of rectangles to `coordinates` to draw
|
|
3450
|
+
* @since 1.10
|
|
3339
3451
|
*/
|
|
3340
3452
|
draw_textured_rectangles(pipeline: Pipeline, coordinates: number[], n_rectangles: number): void;
|
|
3341
3453
|
|
|
@@ -3349,6 +3461,7 @@ export namespace Cogl {
|
|
|
3349
3461
|
* One example might be for benchmarking purposes to be sure timing
|
|
3350
3462
|
* measurements reflect the time that the GPU is busy for not just the time it
|
|
3351
3463
|
* takes to queue rendering commands.
|
|
3464
|
+
* @since 1.10
|
|
3352
3465
|
*/
|
|
3353
3466
|
finish(): void;
|
|
3354
3467
|
|
|
@@ -3370,18 +3483,21 @@ export namespace Cogl {
|
|
|
3370
3483
|
* @param top Y position of the top clipping plane where it intersects the near clipping plane
|
|
3371
3484
|
* @param z_near The distance to the near clipping plane (Must be positive)
|
|
3372
3485
|
* @param z_far The distance to the far clipping plane (Must be positive)
|
|
3486
|
+
* @since 1.10
|
|
3373
3487
|
*/
|
|
3374
3488
|
frustum(left: number, right: number, bottom: number, top: number, z_near: number, z_far: number): void;
|
|
3375
3489
|
|
|
3376
3490
|
/**
|
|
3377
3491
|
* Retrieves the number of alpha bits of `framebuffer`
|
|
3378
3492
|
* @returns the number of bits
|
|
3493
|
+
* @since 1.8
|
|
3379
3494
|
*/
|
|
3380
3495
|
get_alpha_bits(): number;
|
|
3381
3496
|
|
|
3382
3497
|
/**
|
|
3383
3498
|
* Retrieves the number of blue bits of `framebuffer`
|
|
3384
3499
|
* @returns the number of bits
|
|
3500
|
+
* @since 1.8
|
|
3385
3501
|
*/
|
|
3386
3502
|
get_blue_bits(): number;
|
|
3387
3503
|
|
|
@@ -3390,12 +3506,14 @@ export namespace Cogl {
|
|
|
3390
3506
|
* instantiated within. This is the {@link Cogl.Context} that was passed to
|
|
3391
3507
|
* `cogl_onscreen_new()` for example.
|
|
3392
3508
|
* @returns The {@link Cogl.Context} that the given `framebuffer` was instantiated within.
|
|
3509
|
+
* @since 1.8
|
|
3393
3510
|
*/
|
|
3394
3511
|
get_context(): Context;
|
|
3395
3512
|
|
|
3396
3513
|
/**
|
|
3397
3514
|
* Retrieves the number of depth bits of `framebuffer`
|
|
3398
3515
|
* @returns the number of bits
|
|
3516
|
+
* @since 2.0
|
|
3399
3517
|
*/
|
|
3400
3518
|
get_depth_bits(): number;
|
|
3401
3519
|
|
|
@@ -3403,6 +3521,7 @@ export namespace Cogl {
|
|
|
3403
3521
|
* Queries whether depth buffer writing is enabled for `framebuffer`. This
|
|
3404
3522
|
* can be controlled via `cogl_framebuffer_set_depth_write_enabled()`.
|
|
3405
3523
|
* @returns `true` if depth writing is enabled or `false` if not.
|
|
3524
|
+
* @since 1.18
|
|
3406
3525
|
*/
|
|
3407
3526
|
get_depth_write_enabled(): boolean;
|
|
3408
3527
|
|
|
@@ -3414,18 +3533,21 @@ export namespace Cogl {
|
|
|
3414
3533
|
* display pipeline does not support dithering. This value only represents
|
|
3415
3534
|
* the user's request for dithering.</note>
|
|
3416
3535
|
* @returns `true` if dithering has been requested or `false` if not.
|
|
3536
|
+
* @since 1.8
|
|
3417
3537
|
*/
|
|
3418
3538
|
get_dither_enabled(): boolean;
|
|
3419
3539
|
|
|
3420
3540
|
/**
|
|
3421
3541
|
* Retrieves the number of green bits of `framebuffer`
|
|
3422
3542
|
* @returns the number of bits
|
|
3543
|
+
* @since 1.8
|
|
3423
3544
|
*/
|
|
3424
3545
|
get_green_bits(): number;
|
|
3425
3546
|
|
|
3426
3547
|
/**
|
|
3427
3548
|
* Queries the current height of the given `framebuffer`.
|
|
3428
3549
|
* @returns The height of `framebuffer`.
|
|
3550
|
+
* @since 1.8
|
|
3429
3551
|
*/
|
|
3430
3552
|
get_height(): number;
|
|
3431
3553
|
|
|
@@ -3433,17 +3555,20 @@ export namespace Cogl {
|
|
|
3433
3555
|
|
|
3434
3556
|
/**
|
|
3435
3557
|
* Stores the current model-view matrix in `matrix`.
|
|
3558
|
+
* @since 1.10
|
|
3436
3559
|
*/
|
|
3437
3560
|
get_modelview_matrix(): Matrix;
|
|
3438
3561
|
|
|
3439
3562
|
/**
|
|
3440
3563
|
* Stores the current projection matrix in `matrix`.
|
|
3564
|
+
* @since 1.10
|
|
3441
3565
|
*/
|
|
3442
3566
|
get_projection_matrix(): Matrix;
|
|
3443
3567
|
|
|
3444
3568
|
/**
|
|
3445
3569
|
* Retrieves the number of red bits of `framebuffer`
|
|
3446
3570
|
* @returns the number of bits
|
|
3571
|
+
* @since 1.8
|
|
3447
3572
|
*/
|
|
3448
3573
|
get_red_bits(): number;
|
|
3449
3574
|
|
|
@@ -3461,6 +3586,7 @@ export namespace Cogl {
|
|
|
3461
3586
|
* framebuffer has been allocated the value will reflect the actual
|
|
3462
3587
|
* number of samples that will be made by the GPU.
|
|
3463
3588
|
* @returns The number of point samples made per pixel when rasterizing geometry or 0 if single-sample rendering has been chosen.
|
|
3589
|
+
* @since 1.10
|
|
3464
3590
|
*/
|
|
3465
3591
|
get_samples_per_pixel(): number;
|
|
3466
3592
|
|
|
@@ -3468,6 +3594,7 @@ export namespace Cogl {
|
|
|
3468
3594
|
* Gets the current {@link Cogl.StereoMode}, which defines which stereo buffers
|
|
3469
3595
|
* should be drawn to. See `cogl_framebuffer_set_stereo_mode()`.
|
|
3470
3596
|
* @returns A {@link Cogl.StereoMode}
|
|
3597
|
+
* @since 1.20
|
|
3471
3598
|
*/
|
|
3472
3599
|
get_stereo_mode(): StereoMode;
|
|
3473
3600
|
|
|
@@ -3476,6 +3603,7 @@ export namespace Cogl {
|
|
|
3476
3603
|
* using `cogl_framebuffer_set_viewport()` or the default values which are 0, 0,
|
|
3477
3604
|
* framebuffer_width and framebuffer_height. The values are written into the
|
|
3478
3605
|
* given `viewport` array.
|
|
3606
|
+
* @since 1.8
|
|
3479
3607
|
*/
|
|
3480
3608
|
get_viewport4fv(): number[];
|
|
3481
3609
|
|
|
@@ -3483,6 +3611,7 @@ export namespace Cogl {
|
|
|
3483
3611
|
* Queries the height of the viewport as set using `cogl_framebuffer_set_viewport()`
|
|
3484
3612
|
* or the default value which is the height of the framebuffer.
|
|
3485
3613
|
* @returns The height of the viewport.
|
|
3614
|
+
* @since 1.8
|
|
3486
3615
|
*/
|
|
3487
3616
|
get_viewport_height(): number;
|
|
3488
3617
|
|
|
@@ -3490,6 +3619,7 @@ export namespace Cogl {
|
|
|
3490
3619
|
* Queries the width of the viewport as set using `cogl_framebuffer_set_viewport()`
|
|
3491
3620
|
* or the default value which is the width of the framebuffer.
|
|
3492
3621
|
* @returns The width of the viewport.
|
|
3622
|
+
* @since 1.8
|
|
3493
3623
|
*/
|
|
3494
3624
|
get_viewport_width(): number;
|
|
3495
3625
|
|
|
@@ -3497,6 +3627,7 @@ export namespace Cogl {
|
|
|
3497
3627
|
* Queries the x coordinate of the viewport origin as set using `cogl_framebuffer_set_viewport()`
|
|
3498
3628
|
* or the default value which is 0.
|
|
3499
3629
|
* @returns The x coordinate of the viewport origin.
|
|
3630
|
+
* @since 1.8
|
|
3500
3631
|
*/
|
|
3501
3632
|
get_viewport_x(): number;
|
|
3502
3633
|
|
|
@@ -3504,17 +3635,20 @@ export namespace Cogl {
|
|
|
3504
3635
|
* Queries the y coordinate of the viewport origin as set using `cogl_framebuffer_set_viewport()`
|
|
3505
3636
|
* or the default value which is 0.
|
|
3506
3637
|
* @returns The y coordinate of the viewport origin.
|
|
3638
|
+
* @since 1.8
|
|
3507
3639
|
*/
|
|
3508
3640
|
get_viewport_y(): number;
|
|
3509
3641
|
|
|
3510
3642
|
/**
|
|
3511
3643
|
* Queries the current width of the given `framebuffer`.
|
|
3512
3644
|
* @returns The width of `framebuffer`.
|
|
3645
|
+
* @since 1.8
|
|
3513
3646
|
*/
|
|
3514
3647
|
get_width(): number;
|
|
3515
3648
|
|
|
3516
3649
|
/**
|
|
3517
3650
|
* Resets the current model-view matrix to the identity matrix.
|
|
3651
|
+
* @since 1.10
|
|
3518
3652
|
*/
|
|
3519
3653
|
identity_matrix(): void;
|
|
3520
3654
|
|
|
@@ -3527,6 +3661,7 @@ export namespace Cogl {
|
|
|
3527
3661
|
* @param y_2 The y coordinate for the second horizontal clipping plane
|
|
3528
3662
|
* @param near The <emphasis>distance</emphasis> to the near clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
3529
3663
|
* @param far The <emphasis>distance</emphasis> to the far clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
3664
|
+
* @since 1.10
|
|
3530
3665
|
*/
|
|
3531
3666
|
orthographic(x_1: number, y_1: number, x_2: number, y_2: number, near: number, far: number): void;
|
|
3532
3667
|
|
|
@@ -3542,6 +3677,7 @@ export namespace Cogl {
|
|
|
3542
3677
|
* @param aspect The (width over height) aspect ratio for display
|
|
3543
3678
|
* @param z_near The distance to the near clipping plane (Must be positive, and must not be 0)
|
|
3544
3679
|
* @param z_far The distance to the far clipping plane (Must be positive)
|
|
3680
|
+
* @since 1.10
|
|
3545
3681
|
*/
|
|
3546
3682
|
perspective(fov_y: number, aspect: number, z_near: number, z_far: number): void;
|
|
3547
3683
|
|
|
@@ -3549,17 +3685,20 @@ export namespace Cogl {
|
|
|
3549
3685
|
* Reverts the clipping region to the state before the last call to
|
|
3550
3686
|
* `cogl_framebuffer_push_scissor_clip()`, `cogl_framebuffer_push_rectangle_clip()`
|
|
3551
3687
|
* `cogl_framebuffer_push_path_clip()`, or `cogl_framebuffer_push_primitive_clip()`.
|
|
3688
|
+
* @since 1.10
|
|
3552
3689
|
*/
|
|
3553
3690
|
pop_clip(): void;
|
|
3554
3691
|
|
|
3555
3692
|
/**
|
|
3556
3693
|
* Restores the model-view matrix on the top of the matrix stack.
|
|
3694
|
+
* @since 1.10
|
|
3557
3695
|
*/
|
|
3558
3696
|
pop_matrix(): void;
|
|
3559
3697
|
|
|
3560
3698
|
/**
|
|
3561
3699
|
* Copies the current model-view matrix onto the matrix stack. The matrix
|
|
3562
3700
|
* can later be restored with `cogl_framebuffer_pop_matrix()`.
|
|
3701
|
+
* @since 1.10
|
|
3563
3702
|
*/
|
|
3564
3703
|
push_matrix(): void;
|
|
3565
3704
|
|
|
@@ -3576,6 +3715,7 @@ export namespace Cogl {
|
|
|
3576
3715
|
* @param y_1 y coordinate for top left corner of the clip rectangle
|
|
3577
3716
|
* @param x_2 x coordinate for bottom right corner of the clip rectangle
|
|
3578
3717
|
* @param y_2 y coordinate for bottom right corner of the clip rectangle
|
|
3718
|
+
* @since 1.10
|
|
3579
3719
|
*/
|
|
3580
3720
|
push_rectangle_clip(x_1: number, y_1: number, x_2: number, y_2: number): void;
|
|
3581
3721
|
|
|
@@ -3597,6 +3737,7 @@ export namespace Cogl {
|
|
|
3597
3737
|
* @param y top edge of the clip rectangle in window coordinates
|
|
3598
3738
|
* @param width width of the clip rectangle
|
|
3599
3739
|
* @param height height of the clip rectangle
|
|
3740
|
+
* @since 1.10
|
|
3600
3741
|
*/
|
|
3601
3742
|
push_scissor_clip(x: number, y: number, width: number, height: number): void;
|
|
3602
3743
|
|
|
@@ -3634,6 +3775,7 @@ export namespace Cogl {
|
|
|
3634
3775
|
* @param format The pixel format to store the data in
|
|
3635
3776
|
* @param pixels The address of the buffer to store the data in
|
|
3636
3777
|
* @returns `true` if the read succeeded or `false` otherwise.
|
|
3778
|
+
* @since 1.10
|
|
3637
3779
|
*/
|
|
3638
3780
|
read_pixels(x: number, y: number, width: number, height: number, format: PixelFormat, pixels: number): boolean;
|
|
3639
3781
|
|
|
@@ -3653,6 +3795,7 @@ export namespace Cogl {
|
|
|
3653
3795
|
* @param source Identifies which auxiliary buffer you want to read (only COGL_READ_PIXELS_COLOR_BUFFER supported currently)
|
|
3654
3796
|
* @param bitmap The bitmap to store the results in.
|
|
3655
3797
|
* @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.
|
|
3798
|
+
* @since 1.10
|
|
3656
3799
|
*/
|
|
3657
3800
|
read_pixels_into_bitmap(x: number, y: number, source: ReadPixelsFlags, bitmap: Bitmap): boolean;
|
|
3658
3801
|
|
|
@@ -3677,6 +3820,7 @@ export namespace Cogl {
|
|
|
3677
3820
|
* If you are performing incremental updates to a framebuffer you
|
|
3678
3821
|
* should consider using `cogl_framebuffer_resolve_samples_region()`
|
|
3679
3822
|
* instead to avoid resolving redundant pixels.
|
|
3823
|
+
* @since 1.8
|
|
3680
3824
|
*/
|
|
3681
3825
|
resolve_samples(): void;
|
|
3682
3826
|
|
|
@@ -3706,6 +3850,7 @@ export namespace Cogl {
|
|
|
3706
3850
|
* @param y top-left y coordinate of region to resolve
|
|
3707
3851
|
* @param width width of region to resolve
|
|
3708
3852
|
* @param height height of region to resolve
|
|
3853
|
+
* @since 1.8
|
|
3709
3854
|
*/
|
|
3710
3855
|
resolve_samples_region(x: number, y: number, width: number, height: number): void;
|
|
3711
3856
|
|
|
@@ -3719,6 +3864,7 @@ export namespace Cogl {
|
|
|
3719
3864
|
* @param x X-component of vertex to rotate around.
|
|
3720
3865
|
* @param y Y-component of vertex to rotate around.
|
|
3721
3866
|
* @param z Z-component of vertex to rotate around.
|
|
3867
|
+
* @since 1.10
|
|
3722
3868
|
*/
|
|
3723
3869
|
rotate(angle: number, x: number, y: number, z: number): void;
|
|
3724
3870
|
|
|
@@ -3726,6 +3872,7 @@ export namespace Cogl {
|
|
|
3726
3872
|
* Multiplies the current model-view matrix by one that rotates
|
|
3727
3873
|
* according to the rotation described by `euler`.
|
|
3728
3874
|
* @param euler A {@link Graphene.Euler}
|
|
3875
|
+
* @since 2.0
|
|
3729
3876
|
*/
|
|
3730
3877
|
rotate_euler(euler: Graphene.Euler): void;
|
|
3731
3878
|
|
|
@@ -3735,6 +3882,7 @@ export namespace Cogl {
|
|
|
3735
3882
|
* @param x Amount to scale along the x-axis
|
|
3736
3883
|
* @param y Amount to scale along the y-axis
|
|
3737
3884
|
* @param z Amount to scale along the z-axis
|
|
3885
|
+
* @since 1.10
|
|
3738
3886
|
*/
|
|
3739
3887
|
scale(x: number, y: number, z: number): void;
|
|
3740
3888
|
|
|
@@ -3746,6 +3894,7 @@ export namespace Cogl {
|
|
|
3746
3894
|
*
|
|
3747
3895
|
* Depth buffer writing is enabled by default.
|
|
3748
3896
|
* @param depth_write_enabled `true` to enable depth writing or `false` to disable
|
|
3897
|
+
* @since 1.18
|
|
3749
3898
|
*/
|
|
3750
3899
|
set_depth_write_enabled(depth_write_enabled: boolean): void;
|
|
3751
3900
|
|
|
@@ -3764,18 +3913,21 @@ export namespace Cogl {
|
|
|
3764
3913
|
*
|
|
3765
3914
|
* Dithering is enabled by default.
|
|
3766
3915
|
* @param dither_enabled `true` to enable dithering or `false` to disable
|
|
3916
|
+
* @since 1.8
|
|
3767
3917
|
*/
|
|
3768
3918
|
set_dither_enabled(dither_enabled: boolean): void;
|
|
3769
3919
|
|
|
3770
3920
|
/**
|
|
3771
3921
|
* Sets `matrix` as the new model-view matrix.
|
|
3772
3922
|
* @param matrix the new model-view matrix
|
|
3923
|
+
* @since 1.10
|
|
3773
3924
|
*/
|
|
3774
3925
|
set_modelview_matrix(matrix: Matrix): void;
|
|
3775
3926
|
|
|
3776
3927
|
/**
|
|
3777
3928
|
* Sets `matrix` as the new projection matrix.
|
|
3778
3929
|
* @param matrix the new projection matrix
|
|
3930
|
+
* @since 1.10
|
|
3779
3931
|
*/
|
|
3780
3932
|
set_projection_matrix(matrix: Matrix): void;
|
|
3781
3933
|
|
|
@@ -3813,6 +3965,7 @@ export namespace Cogl {
|
|
|
3813
3965
|
* framebuffer has changed this can lead to redundant work being
|
|
3814
3966
|
* done.</note>
|
|
3815
3967
|
* @param samples_per_pixel The minimum number of samples per pixel
|
|
3968
|
+
* @since 1.8
|
|
3816
3969
|
*/
|
|
3817
3970
|
set_samples_per_pixel(samples_per_pixel: number): void;
|
|
3818
3971
|
|
|
@@ -3825,6 +3978,7 @@ export namespace Cogl {
|
|
|
3825
3978
|
* enabled. (See `cogl_onscreen_template_set_stereo_enabled()`,
|
|
3826
3979
|
* `cogl_framebuffer_get_is_stereo()`.)
|
|
3827
3980
|
* @param stereo_mode A {@link Cogl.StereoMode} specifying which stereo buffers should be drawn tow.
|
|
3981
|
+
* @since 1.20
|
|
3828
3982
|
*/
|
|
3829
3983
|
set_stereo_mode(stereo_mode: StereoMode): void;
|
|
3830
3984
|
|
|
@@ -3848,12 +4002,14 @@ export namespace Cogl {
|
|
|
3848
4002
|
* @param y The top-left y coordinate of the viewport origin (only integers supported currently)
|
|
3849
4003
|
* @param width The width of the viewport (only integers supported currently)
|
|
3850
4004
|
* @param height The height of the viewport (only integers supported currently)
|
|
4005
|
+
* @since 1.8
|
|
3851
4006
|
*/
|
|
3852
4007
|
set_viewport(x: number, y: number, width: number, height: number): void;
|
|
3853
4008
|
|
|
3854
4009
|
/**
|
|
3855
4010
|
* Multiplies the current model-view matrix by the given matrix.
|
|
3856
4011
|
* @param matrix the matrix to multiply with the current model-view
|
|
4012
|
+
* @since 1.10
|
|
3857
4013
|
*/
|
|
3858
4014
|
transform(matrix: Matrix): void;
|
|
3859
4015
|
|
|
@@ -3863,6 +4019,7 @@ export namespace Cogl {
|
|
|
3863
4019
|
* @param x Distance to translate along the x-axis
|
|
3864
4020
|
* @param y Distance to translate along the y-axis
|
|
3865
4021
|
* @param z Distance to translate along the z-axis
|
|
4022
|
+
* @since 1.10
|
|
3866
4023
|
*/
|
|
3867
4024
|
translate(x: number, y: number, z: number): void;
|
|
3868
4025
|
}
|
|
@@ -3908,32 +4065,38 @@ export namespace Cogl {
|
|
|
3908
4065
|
* keep track of a pipelines ancestry which we may use to help minimize GPU
|
|
3909
4066
|
* state changes.
|
|
3910
4067
|
* @returns a pointer to the newly allocated {@link Cogl.Pipeline}
|
|
4068
|
+
* @since 2.0
|
|
3911
4069
|
*/
|
|
3912
4070
|
copy(): Pipeline;
|
|
3913
4071
|
|
|
3914
4072
|
/**
|
|
3915
4073
|
* Iterates all the layer indices of the given `pipeline`.
|
|
3916
4074
|
* @param callback A {@link Cogl.PipelineLayerCallback} to be called for each layer index
|
|
4075
|
+
* @since 2.0
|
|
3917
4076
|
*/
|
|
3918
4077
|
foreach_layer(callback: PipelineLayerCallback): void;
|
|
3919
4078
|
|
|
3920
4079
|
/**
|
|
3921
4080
|
* @returns The alpha test function of `pipeline`.
|
|
4081
|
+
* @since 2.0
|
|
3922
4082
|
*/
|
|
3923
4083
|
get_alpha_test_function(): PipelineAlphaFunc;
|
|
3924
4084
|
|
|
3925
4085
|
/**
|
|
3926
4086
|
* @returns The alpha test reference value of `pipeline`.
|
|
4087
|
+
* @since 2.0
|
|
3927
4088
|
*/
|
|
3928
4089
|
get_alpha_test_reference(): number;
|
|
3929
4090
|
|
|
3930
4091
|
/**
|
|
3931
4092
|
* Retrieves the current pipeline color.
|
|
4093
|
+
* @since 2.0
|
|
3932
4094
|
*/
|
|
3933
4095
|
get_color(): Color;
|
|
3934
4096
|
|
|
3935
4097
|
/**
|
|
3936
4098
|
* @returns the cull face mode that was previously set with `cogl_pipeline_set_cull_face_mode()`. Status: Unstable
|
|
4099
|
+
* @since 2.0
|
|
3937
4100
|
*/
|
|
3938
4101
|
get_cull_face_mode(): PipelineCullFaceMode;
|
|
3939
4102
|
|
|
@@ -3946,6 +4109,7 @@ export namespace Cogl {
|
|
|
3946
4109
|
* {@link Cogl.Winding.CLOCKWISE} sets them to be clockwise. The default is
|
|
3947
4110
|
* {@link Cogl.Winding.COUNTER_CLOCKWISE}.
|
|
3948
4111
|
* @returns The `pipeline` front face winding Status: Unstable
|
|
4112
|
+
* @since 2.0
|
|
3949
4113
|
*/
|
|
3950
4114
|
get_front_face_winding(): Winding;
|
|
3951
4115
|
|
|
@@ -3958,6 +4122,7 @@ export namespace Cogl {
|
|
|
3958
4122
|
* changed using `cogl_pipeline_set_layer_filters()`.
|
|
3959
4123
|
* @param layer_index the layer number to change.
|
|
3960
4124
|
* @returns The magnification {@link Cogl.PipelineFilter} for the specified layer.
|
|
4125
|
+
* @since 1.10
|
|
3961
4126
|
*/
|
|
3962
4127
|
get_layer_mag_filter(layer_index: number): PipelineFilter;
|
|
3963
4128
|
|
|
@@ -3970,6 +4135,7 @@ export namespace Cogl {
|
|
|
3970
4135
|
* changed using `cogl_pipeline_set_layer_filters()`.
|
|
3971
4136
|
* @param layer_index the layer number to change.
|
|
3972
4137
|
* @returns The minification {@link Cogl.PipelineFilter} for the specified layer.
|
|
4138
|
+
* @since 1.10
|
|
3973
4139
|
*/
|
|
3974
4140
|
get_layer_min_filter(layer_index: number): PipelineFilter;
|
|
3975
4141
|
|
|
@@ -3978,12 +4144,14 @@ export namespace Cogl {
|
|
|
3978
4144
|
* texture layer.
|
|
3979
4145
|
* @param layer_index the layer number to check.
|
|
3980
4146
|
* @returns whether the texture coordinates will be replaced with point sprite coordinates.
|
|
4147
|
+
* @since 2.0
|
|
3981
4148
|
*/
|
|
3982
4149
|
get_layer_point_sprite_coords_enabled(layer_index: number): boolean;
|
|
3983
4150
|
|
|
3984
4151
|
/**
|
|
3985
4152
|
* @param layer_index the index of the layer
|
|
3986
4153
|
* @returns the texture that was set for the given layer of the pipeline or `null` if no texture was set.
|
|
4154
|
+
* @since 1.10
|
|
3987
4155
|
*/
|
|
3988
4156
|
get_layer_texture(layer_index: number): Texture;
|
|
3989
4157
|
|
|
@@ -3992,6 +4160,7 @@ export namespace Cogl {
|
|
|
3992
4160
|
* layer.
|
|
3993
4161
|
* @param layer_index the layer number to change.
|
|
3994
4162
|
* @returns the wrap mode for the 's' coordinate of texture lookups on this layer.
|
|
4163
|
+
* @since 1.6
|
|
3995
4164
|
*/
|
|
3996
4165
|
get_layer_wrap_mode_s(layer_index: number): PipelineWrapMode;
|
|
3997
4166
|
|
|
@@ -4000,17 +4169,20 @@ export namespace Cogl {
|
|
|
4000
4169
|
* layer.
|
|
4001
4170
|
* @param layer_index the layer number to change.
|
|
4002
4171
|
* @returns the wrap mode for the 't' coordinate of texture lookups on this layer.
|
|
4172
|
+
* @since 1.6
|
|
4003
4173
|
*/
|
|
4004
4174
|
get_layer_wrap_mode_t(layer_index: number): PipelineWrapMode;
|
|
4005
4175
|
|
|
4006
4176
|
/**
|
|
4007
4177
|
* Retrieves the number of layers defined for the given `pipeline`
|
|
4008
4178
|
* @returns the number of layers
|
|
4179
|
+
* @since 2.0
|
|
4009
4180
|
*/
|
|
4010
4181
|
get_n_layers(): number;
|
|
4011
4182
|
|
|
4012
4183
|
/**
|
|
4013
4184
|
* @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()`.
|
|
4185
|
+
* @since 2.0
|
|
4014
4186
|
*/
|
|
4015
4187
|
get_per_vertex_point_size(): boolean;
|
|
4016
4188
|
|
|
@@ -4018,6 +4190,7 @@ export namespace Cogl {
|
|
|
4018
4190
|
* Get the size of points drawn when {@link Cogl.VerticesMode.POINTS} is
|
|
4019
4191
|
* used with the vertex buffer API.
|
|
4020
4192
|
* @returns the point size of the `pipeline`.
|
|
4193
|
+
* @since 2.0
|
|
4021
4194
|
*/
|
|
4022
4195
|
get_point_size(): number;
|
|
4023
4196
|
|
|
@@ -4033,6 +4206,7 @@ export namespace Cogl {
|
|
|
4033
4206
|
* before calling this function.
|
|
4034
4207
|
* @param uniform_name The name of a uniform
|
|
4035
4208
|
* @returns A integer representing the location of the given uniform.
|
|
4209
|
+
* @since 2.0
|
|
4036
4210
|
*/
|
|
4037
4211
|
get_uniform_location(uniform_name: string): number;
|
|
4038
4212
|
|
|
@@ -4040,12 +4214,14 @@ export namespace Cogl {
|
|
|
4040
4214
|
* Queries what user program has been associated with the given
|
|
4041
4215
|
* `pipeline` using `cogl_pipeline_set_user_program()`.
|
|
4042
4216
|
* @returns The current user program or `null`.
|
|
4217
|
+
* @since 2.0
|
|
4043
4218
|
*/
|
|
4044
4219
|
get_user_program(): Handle;
|
|
4045
4220
|
|
|
4046
4221
|
/**
|
|
4047
4222
|
* This function removes a layer from your pipeline
|
|
4048
4223
|
* @param layer_index Specifies the layer you want to remove
|
|
4224
|
+
* @since 1.10
|
|
4049
4225
|
*/
|
|
4050
4226
|
remove_layer(layer_index: number): void;
|
|
4051
4227
|
|
|
@@ -4059,6 +4235,7 @@ export namespace Cogl {
|
|
|
4059
4235
|
* The default is {@link Cogl.PipelineAlphaFunc.ALWAYS}
|
|
4060
4236
|
* @param alpha_func A `CoglPipelineAlphaFunc` constant
|
|
4061
4237
|
* @param alpha_reference A reference point that the chosen alpha function uses to compare incoming fragments to.
|
|
4238
|
+
* @since 2.0
|
|
4062
4239
|
*/
|
|
4063
4240
|
set_alpha_test_function(alpha_func: PipelineAlphaFunc, alpha_reference: number): void;
|
|
4064
4241
|
|
|
@@ -4130,6 +4307,8 @@ export namespace Cogl {
|
|
|
4130
4307
|
* is in premultiplied form.
|
|
4131
4308
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired blend function.
|
|
4132
4309
|
* @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).
|
|
4310
|
+
* @since 2.0
|
|
4311
|
+
* @throws GLib.Error
|
|
4133
4312
|
*/
|
|
4134
4313
|
set_blend(blend_string: string): boolean;
|
|
4135
4314
|
|
|
@@ -4137,6 +4316,7 @@ export namespace Cogl {
|
|
|
4137
4316
|
* When blending is setup to reference a CONSTANT blend factor then
|
|
4138
4317
|
* blending will depend on the constant set with this function.
|
|
4139
4318
|
* @param constant_color The constant color you want
|
|
4319
|
+
* @since 2.0
|
|
4140
4320
|
*/
|
|
4141
4321
|
set_blend_constant(constant_color: Color): void;
|
|
4142
4322
|
|
|
@@ -4150,6 +4330,7 @@ export namespace Cogl {
|
|
|
4150
4330
|
*
|
|
4151
4331
|
* The default value is (1.0, 1.0, 1.0, 1.0)
|
|
4152
4332
|
* @param color The components of the color
|
|
4333
|
+
* @since 2.0
|
|
4153
4334
|
*/
|
|
4154
4335
|
set_color(color: Color): void;
|
|
4155
4336
|
|
|
@@ -4161,6 +4342,7 @@ export namespace Cogl {
|
|
|
4161
4342
|
* @param green The green component
|
|
4162
4343
|
* @param blue The blue component
|
|
4163
4344
|
* @param alpha The alpha component
|
|
4345
|
+
* @since 2.0
|
|
4164
4346
|
*/
|
|
4165
4347
|
set_color4f(red: number, green: number, blue: number, alpha: number): void;
|
|
4166
4348
|
|
|
@@ -4172,6 +4354,7 @@ export namespace Cogl {
|
|
|
4172
4354
|
* @param green The green component
|
|
4173
4355
|
* @param blue The blue component
|
|
4174
4356
|
* @param alpha The alpha component
|
|
4357
|
+
* @since 2.0
|
|
4175
4358
|
*/
|
|
4176
4359
|
set_color4ub(red: number, green: number, blue: number, alpha: number): void;
|
|
4177
4360
|
|
|
@@ -4191,6 +4374,7 @@ export namespace Cogl {
|
|
|
4191
4374
|
*
|
|
4192
4375
|
* Status: Unstable
|
|
4193
4376
|
* @param cull_face_mode The new mode to set
|
|
4377
|
+
* @since 2.0
|
|
4194
4378
|
*/
|
|
4195
4379
|
set_cull_face_mode(cull_face_mode: PipelineCullFaceMode): void;
|
|
4196
4380
|
|
|
@@ -4205,6 +4389,7 @@ export namespace Cogl {
|
|
|
4205
4389
|
*
|
|
4206
4390
|
* Status: Unstable
|
|
4207
4391
|
* @param front_winding the winding order
|
|
4392
|
+
* @since 2.0
|
|
4208
4393
|
*/
|
|
4209
4394
|
set_front_face_winding(front_winding: Winding): void;
|
|
4210
4395
|
|
|
@@ -4288,6 +4473,8 @@ export namespace Cogl {
|
|
|
4288
4473
|
* @param layer_index Specifies the layer you want define a combine function for
|
|
4289
4474
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired texture combine function.
|
|
4290
4475
|
* @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
|
|
4476
|
+
* @since 2.0
|
|
4477
|
+
* @throws GLib.Error
|
|
4291
4478
|
*/
|
|
4292
4479
|
set_layer_combine(layer_index: number, blend_string: string): boolean;
|
|
4293
4480
|
|
|
@@ -4296,6 +4483,7 @@ export namespace Cogl {
|
|
|
4296
4483
|
* description then you can use this function to define its value.
|
|
4297
4484
|
* @param layer_index Specifies the layer you want to specify a constant used for texture combining
|
|
4298
4485
|
* @param constant The constant color you want
|
|
4486
|
+
* @since 2.0
|
|
4299
4487
|
*/
|
|
4300
4488
|
set_layer_combine_constant(layer_index: number, constant: Color): void;
|
|
4301
4489
|
|
|
@@ -4310,6 +4498,7 @@ export namespace Cogl {
|
|
|
4310
4498
|
* @param layer_index the layer number to change.
|
|
4311
4499
|
* @param min_filter the filter used when scaling a texture down.
|
|
4312
4500
|
* @param mag_filter the filter used when magnifying a texture.
|
|
4501
|
+
* @since 1.10
|
|
4313
4502
|
*/
|
|
4314
4503
|
set_layer_filters(layer_index: number, min_filter: PipelineFilter, mag_filter: PipelineFilter): void;
|
|
4315
4504
|
|
|
@@ -4318,6 +4507,7 @@ export namespace Cogl {
|
|
|
4318
4507
|
* and rotate a single layer of a pipeline used to fill your geometry.
|
|
4319
4508
|
* @param layer_index the index for the layer inside `pipeline`
|
|
4320
4509
|
* @param matrix the transformation matrix for the layer
|
|
4510
|
+
* @since 1.10
|
|
4321
4511
|
*/
|
|
4322
4512
|
set_layer_matrix(layer_index: number, matrix: Matrix): void;
|
|
4323
4513
|
|
|
@@ -4337,6 +4527,7 @@ export namespace Cogl {
|
|
|
4337
4527
|
* specify the texture type so that any pipeline copies can share the
|
|
4338
4528
|
* internal texture type state for efficiency.
|
|
4339
4529
|
* @param layer_index The layer number to modify
|
|
4530
|
+
* @since 1.10
|
|
4340
4531
|
*/
|
|
4341
4532
|
set_layer_null_texture(layer_index: number): void;
|
|
4342
4533
|
|
|
@@ -4350,6 +4541,8 @@ export namespace Cogl {
|
|
|
4350
4541
|
* @param layer_index the layer number to change.
|
|
4351
4542
|
* @param enable whether to enable point sprite coord generation.
|
|
4352
4543
|
* @returns `true` if the function succeeds, `false` otherwise.
|
|
4544
|
+
* @since 2.0
|
|
4545
|
+
* @throws GLib.Error
|
|
4353
4546
|
*/
|
|
4354
4547
|
set_layer_point_sprite_coords_enabled(layer_index: number, enable: boolean): boolean;
|
|
4355
4548
|
|
|
@@ -4366,6 +4559,7 @@ export namespace Cogl {
|
|
|
4366
4559
|
* `cogl_pipeline_set_layer_wrap_mode_t()` separately.
|
|
4367
4560
|
* @param layer_index the layer number to change.
|
|
4368
4561
|
* @param mode the new wrap mode
|
|
4562
|
+
* @since 2.0
|
|
4369
4563
|
*/
|
|
4370
4564
|
set_layer_wrap_mode(layer_index: number, mode: PipelineWrapMode): void;
|
|
4371
4565
|
|
|
@@ -4373,6 +4567,7 @@ export namespace Cogl {
|
|
|
4373
4567
|
* Sets the wrap mode for the 's' coordinate of texture lookups on this layer.
|
|
4374
4568
|
* @param layer_index the layer number to change.
|
|
4375
4569
|
* @param mode the new wrap mode
|
|
4570
|
+
* @since 2.0
|
|
4376
4571
|
*/
|
|
4377
4572
|
set_layer_wrap_mode_s(layer_index: number, mode: PipelineWrapMode): void;
|
|
4378
4573
|
|
|
@@ -4380,6 +4575,7 @@ export namespace Cogl {
|
|
|
4380
4575
|
* Sets the wrap mode for the 't' coordinate of texture lookups on this layer.
|
|
4381
4576
|
* @param layer_index the layer number to change.
|
|
4382
4577
|
* @param mode the new wrap mode
|
|
4578
|
+
* @since 2.0
|
|
4383
4579
|
*/
|
|
4384
4580
|
set_layer_wrap_mode_t(layer_index: number, mode: PipelineWrapMode): void;
|
|
4385
4581
|
|
|
@@ -4396,6 +4592,8 @@ export namespace Cogl {
|
|
|
4396
4592
|
* undefined.
|
|
4397
4593
|
* @param enable whether to enable per-vertex point size
|
|
4398
4594
|
* @returns `true` if the change succeeded or `false` otherwise
|
|
4595
|
+
* @since 2.0
|
|
4596
|
+
* @throws GLib.Error
|
|
4399
4597
|
*/
|
|
4400
4598
|
set_per_vertex_point_size(enable: boolean): boolean;
|
|
4401
4599
|
|
|
@@ -4413,6 +4611,7 @@ export namespace Cogl {
|
|
|
4413
4611
|
* if an application wants to draw points it must make sure to use a
|
|
4414
4612
|
* pipeline that has an explicit point size set on it.
|
|
4415
4613
|
* @param point_size the new point size.
|
|
4614
|
+
* @since 2.0
|
|
4416
4615
|
*/
|
|
4417
4616
|
set_point_size(point_size: number): void;
|
|
4418
4617
|
|
|
@@ -4429,6 +4628,7 @@ export namespace Cogl {
|
|
|
4429
4628
|
* uniform.
|
|
4430
4629
|
* @param uniform_location The uniform's location identifier
|
|
4431
4630
|
* @param value The new value for the uniform
|
|
4631
|
+
* @since 2.0
|
|
4432
4632
|
*/
|
|
4433
4633
|
set_uniform_1f(uniform_location: number, value: number): void;
|
|
4434
4634
|
|
|
@@ -4445,6 +4645,7 @@ export namespace Cogl {
|
|
|
4445
4645
|
* uniform or a sampler uniform.
|
|
4446
4646
|
* @param uniform_location The uniform's location identifier
|
|
4447
4647
|
* @param value The new value for the uniform
|
|
4648
|
+
* @since 2.0
|
|
4448
4649
|
*/
|
|
4449
4650
|
set_uniform_1i(uniform_location: number, value: number): void;
|
|
4450
4651
|
|
|
@@ -4465,6 +4666,7 @@ export namespace Cogl {
|
|
|
4465
4666
|
* @param n_components The number of components in the corresponding uniform's type
|
|
4466
4667
|
* @param count The number of values to set
|
|
4467
4668
|
* @param value Pointer to the new values to set
|
|
4669
|
+
* @since 2.0
|
|
4468
4670
|
*/
|
|
4469
4671
|
set_uniform_float(uniform_location: number, n_components: number, count: number, value: number): void;
|
|
4470
4672
|
|
|
@@ -4485,6 +4687,7 @@ export namespace Cogl {
|
|
|
4485
4687
|
* @param n_components The number of components in the corresponding uniform's type
|
|
4486
4688
|
* @param count The number of values to set
|
|
4487
4689
|
* @param value Pointer to the new values to set
|
|
4690
|
+
* @since 2.0
|
|
4488
4691
|
*/
|
|
4489
4692
|
set_uniform_int(uniform_location: number, n_components: number, count: number, value: number): void;
|
|
4490
4693
|
|
|
@@ -4511,6 +4714,7 @@ export namespace Cogl {
|
|
|
4511
4714
|
* @param count The number of values to set
|
|
4512
4715
|
* @param transpose Whether to transpose the matrix
|
|
4513
4716
|
* @param value Pointer to the new values to set
|
|
4717
|
+
* @since 2.0
|
|
4514
4718
|
*/
|
|
4515
4719
|
set_uniform_matrix(uniform_location: number, dimensions: number, count: number, transpose: boolean, value: number): void;
|
|
4516
4720
|
|
|
@@ -4551,6 +4755,7 @@ export namespace Cogl {
|
|
|
4551
4755
|
* meantime we hope this will handle most practical GLSL and ARBfp
|
|
4552
4756
|
* requirements.
|
|
4553
4757
|
* @param program A {@link Cogl.Handle} to a linked CoglProgram
|
|
4758
|
+
* @since 2.0
|
|
4554
4759
|
*/
|
|
4555
4760
|
set_user_program(program: Handle): void;
|
|
4556
4761
|
}
|
|
@@ -4606,6 +4811,7 @@ export namespace Cogl {
|
|
|
4606
4811
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
4607
4812
|
* framebuffer and rendered too.</note>
|
|
4608
4813
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
4814
|
+
* @throws GLib.Error
|
|
4609
4815
|
*/
|
|
4610
4816
|
allocate(): boolean;
|
|
4611
4817
|
|
|
@@ -4617,6 +4823,7 @@ export namespace Cogl {
|
|
|
4617
4823
|
* is {@link Cogl.TextureComponents.RGBA}. The other constructors which take
|
|
4618
4824
|
* a %CoglBitmap or a data pointer default to the same components as
|
|
4619
4825
|
* the pixel format of the data.
|
|
4826
|
+
* @since 1.18
|
|
4620
4827
|
*/
|
|
4621
4828
|
get_components(): TextureComponents;
|
|
4622
4829
|
|
|
@@ -4663,6 +4870,7 @@ export namespace Cogl {
|
|
|
4663
4870
|
*
|
|
4664
4871
|
* By default the pre-multipled state is `TRUE`.
|
|
4665
4872
|
* @returns `true` if red, green and blue components are internally stored pre-multiplied by the alpha value or `false` if not.
|
|
4873
|
+
* @since 1.18
|
|
4666
4874
|
*/
|
|
4667
4875
|
get_premultiplied(): boolean;
|
|
4668
4876
|
|
|
@@ -4695,6 +4903,8 @@ export namespace Cogl {
|
|
|
4695
4903
|
* @param sub_width Width in pixels of the subregion
|
|
4696
4904
|
* @param sub_height Height in pixels of the subregion
|
|
4697
4905
|
* @returns A newly created {@link Cogl.Texture} or `null` on failure
|
|
4906
|
+
* @since 1.2
|
|
4907
|
+
* @deprecated since 1.18: Use `cogl_sub_texture_new()`
|
|
4698
4908
|
*/
|
|
4699
4909
|
new_from_sub_texture(sub_x: number, sub_y: number, sub_width: number, sub_height: number): Texture;
|
|
4700
4910
|
|
|
@@ -4719,6 +4929,7 @@ export namespace Cogl {
|
|
|
4719
4929
|
* an image format as long as {@link Cogl.TextureComponents.RG} isn't used
|
|
4720
4930
|
* as the texture's components.
|
|
4721
4931
|
* @param components
|
|
4932
|
+
* @since 1.18
|
|
4722
4933
|
*/
|
|
4723
4934
|
set_components(components: TextureComponents): void;
|
|
4724
4935
|
|
|
@@ -4770,6 +4981,7 @@ export namespace Cogl {
|
|
|
4770
4981
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
4771
4982
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
4772
4983
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
4984
|
+
* @throws GLib.Error
|
|
4773
4985
|
*/
|
|
4774
4986
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
4775
4987
|
|
|
@@ -4796,6 +5008,7 @@ export namespace Cogl {
|
|
|
4796
5008
|
*
|
|
4797
5009
|
* By default the `premultipled` state is `TRUE`.
|
|
4798
5010
|
* @param premultiplied Whether any internally stored red, green or blue components are pre-multiplied by an alpha component.
|
|
5011
|
+
* @since 1.18
|
|
4799
5012
|
*/
|
|
4800
5013
|
set_premultiplied(premultiplied: boolean): void;
|
|
4801
5014
|
|
|
@@ -4833,6 +5046,7 @@ export namespace Cogl {
|
|
|
4833
5046
|
* @param dst_height height of destination region to write. (Must be less than or equal to the bitmap height)
|
|
4834
5047
|
* @param bitmap The source bitmap to read from
|
|
4835
5048
|
* @returns `true` if the subregion upload was successful, and `false` otherwise
|
|
5049
|
+
* @since 1.8
|
|
4836
5050
|
*/
|
|
4837
5051
|
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;
|
|
4838
5052
|
}
|
|
@@ -4880,6 +5094,7 @@ export namespace Cogl {
|
|
|
4880
5094
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
4881
5095
|
* framebuffer and rendered too.</note>
|
|
4882
5096
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
5097
|
+
* @throws GLib.Error
|
|
4883
5098
|
*/
|
|
4884
5099
|
allocate(): boolean;
|
|
4885
5100
|
|
|
@@ -4891,6 +5106,7 @@ export namespace Cogl {
|
|
|
4891
5106
|
* is {@link Cogl.TextureComponents.RGBA}. The other constructors which take
|
|
4892
5107
|
* a %CoglBitmap or a data pointer default to the same components as
|
|
4893
5108
|
* the pixel format of the data.
|
|
5109
|
+
* @since 1.18
|
|
4894
5110
|
*/
|
|
4895
5111
|
get_components(): TextureComponents;
|
|
4896
5112
|
|
|
@@ -4937,6 +5153,7 @@ export namespace Cogl {
|
|
|
4937
5153
|
*
|
|
4938
5154
|
* By default the pre-multipled state is `TRUE`.
|
|
4939
5155
|
* @returns `true` if red, green and blue components are internally stored pre-multiplied by the alpha value or `false` if not.
|
|
5156
|
+
* @since 1.18
|
|
4940
5157
|
*/
|
|
4941
5158
|
get_premultiplied(): boolean;
|
|
4942
5159
|
|
|
@@ -4969,6 +5186,8 @@ export namespace Cogl {
|
|
|
4969
5186
|
* @param sub_width Width in pixels of the subregion
|
|
4970
5187
|
* @param sub_height Height in pixels of the subregion
|
|
4971
5188
|
* @returns A newly created {@link Cogl.Texture} or `null` on failure
|
|
5189
|
+
* @since 1.2
|
|
5190
|
+
* @deprecated since 1.18: Use `cogl_sub_texture_new()`
|
|
4972
5191
|
*/
|
|
4973
5192
|
new_from_sub_texture(sub_x: number, sub_y: number, sub_width: number, sub_height: number): Texture;
|
|
4974
5193
|
|
|
@@ -4993,6 +5212,7 @@ export namespace Cogl {
|
|
|
4993
5212
|
* an image format as long as {@link Cogl.TextureComponents.RG} isn't used
|
|
4994
5213
|
* as the texture's components.
|
|
4995
5214
|
* @param components
|
|
5215
|
+
* @since 1.18
|
|
4996
5216
|
*/
|
|
4997
5217
|
set_components(components: TextureComponents): void;
|
|
4998
5218
|
|
|
@@ -5044,6 +5264,7 @@ export namespace Cogl {
|
|
|
5044
5264
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
5045
5265
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
5046
5266
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
5267
|
+
* @throws GLib.Error
|
|
5047
5268
|
*/
|
|
5048
5269
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
5049
5270
|
|
|
@@ -5070,6 +5291,7 @@ export namespace Cogl {
|
|
|
5070
5291
|
*
|
|
5071
5292
|
* By default the `premultipled` state is `TRUE`.
|
|
5072
5293
|
* @param premultiplied Whether any internally stored red, green or blue components are pre-multiplied by an alpha component.
|
|
5294
|
+
* @since 1.18
|
|
5073
5295
|
*/
|
|
5074
5296
|
set_premultiplied(premultiplied: boolean): void;
|
|
5075
5297
|
|
|
@@ -5107,6 +5329,7 @@ export namespace Cogl {
|
|
|
5107
5329
|
* @param dst_height height of destination region to write. (Must be less than or equal to the bitmap height)
|
|
5108
5330
|
* @param bitmap The source bitmap to read from
|
|
5109
5331
|
* @returns `true` if the subregion upload was successful, and `false` otherwise
|
|
5332
|
+
* @since 1.8
|
|
5110
5333
|
*/
|
|
5111
5334
|
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;
|
|
5112
5335
|
}
|
|
@@ -5135,6 +5358,7 @@ export namespace Cogl {
|
|
|
5135
5358
|
* parameter, when using {@link Cogl.Color}<!-- -->s as keys in a {@link GLib.HashTable}.
|
|
5136
5359
|
* @param v1 a {@link Cogl.Color}
|
|
5137
5360
|
* @param v2 a {@link Cogl.Color}
|
|
5361
|
+
* @since 1.0
|
|
5138
5362
|
*/
|
|
5139
5363
|
static equal(v1: null, v2: null): boolean;
|
|
5140
5364
|
|
|
@@ -5144,6 +5368,7 @@ export namespace Cogl {
|
|
|
5144
5368
|
* @param hue hue value, in the 0 .. 360 range
|
|
5145
5369
|
* @param saturation saturation value, in the 0 .. 1 range
|
|
5146
5370
|
* @param luminance luminance value, in the 0 .. 1 range
|
|
5371
|
+
* @since 1.16
|
|
5147
5372
|
*/
|
|
5148
5373
|
static init_from_hsl(hue: number, saturation: number, luminance: number): Color;
|
|
5149
5374
|
|
|
@@ -5151,11 +5376,13 @@ export namespace Cogl {
|
|
|
5151
5376
|
/**
|
|
5152
5377
|
* Creates a copy of `color`
|
|
5153
5378
|
* @returns a newly-allocated {@link Cogl.Color}. Use `cogl_color_free()` to free the allocate resources
|
|
5379
|
+
* @since 1.0
|
|
5154
5380
|
*/
|
|
5155
5381
|
copy(): Color;
|
|
5156
5382
|
|
|
5157
5383
|
/**
|
|
5158
5384
|
* Frees the resources allocated by `cogl_color_new()` and `cogl_color_copy()`
|
|
5385
|
+
* @since 1.0
|
|
5159
5386
|
*/
|
|
5160
5387
|
free(): void;
|
|
5161
5388
|
|
|
@@ -5163,6 +5390,7 @@ export namespace Cogl {
|
|
|
5163
5390
|
* Retrieves the alpha channel of `color` as a fixed point
|
|
5164
5391
|
* value between 0 and 1.0.
|
|
5165
5392
|
* @returns the alpha channel of the passed color
|
|
5393
|
+
* @since 1.0
|
|
5166
5394
|
*/
|
|
5167
5395
|
get_alpha(): number;
|
|
5168
5396
|
|
|
@@ -5170,6 +5398,7 @@ export namespace Cogl {
|
|
|
5170
5398
|
* Retrieves the alpha channel of `color` as a byte value
|
|
5171
5399
|
* between 0 and 255
|
|
5172
5400
|
* @returns the alpha channel of the passed color
|
|
5401
|
+
* @since 1.0
|
|
5173
5402
|
*/
|
|
5174
5403
|
get_alpha_byte(): number;
|
|
5175
5404
|
|
|
@@ -5177,6 +5406,7 @@ export namespace Cogl {
|
|
|
5177
5406
|
* Retrieves the alpha channel of `color` as a floating point
|
|
5178
5407
|
* value between 0.0 and 1.0
|
|
5179
5408
|
* @returns the alpha channel of the passed color
|
|
5409
|
+
* @since 1.0
|
|
5180
5410
|
*/
|
|
5181
5411
|
get_alpha_float(): number;
|
|
5182
5412
|
|
|
@@ -5184,6 +5414,7 @@ export namespace Cogl {
|
|
|
5184
5414
|
* Retrieves the blue channel of `color` as a fixed point
|
|
5185
5415
|
* value between 0 and 1.0.
|
|
5186
5416
|
* @returns the blue channel of the passed color
|
|
5417
|
+
* @since 1.0
|
|
5187
5418
|
*/
|
|
5188
5419
|
get_blue(): number;
|
|
5189
5420
|
|
|
@@ -5191,6 +5422,7 @@ export namespace Cogl {
|
|
|
5191
5422
|
* Retrieves the blue channel of `color` as a byte value
|
|
5192
5423
|
* between 0 and 255
|
|
5193
5424
|
* @returns the blue channel of the passed color
|
|
5425
|
+
* @since 1.0
|
|
5194
5426
|
*/
|
|
5195
5427
|
get_blue_byte(): number;
|
|
5196
5428
|
|
|
@@ -5198,6 +5430,7 @@ export namespace Cogl {
|
|
|
5198
5430
|
* Retrieves the blue channel of `color` as a floating point
|
|
5199
5431
|
* value between 0.0 and 1.0
|
|
5200
5432
|
* @returns the blue channel of the passed color
|
|
5433
|
+
* @since 1.0
|
|
5201
5434
|
*/
|
|
5202
5435
|
get_blue_float(): number;
|
|
5203
5436
|
|
|
@@ -5205,6 +5438,7 @@ export namespace Cogl {
|
|
|
5205
5438
|
* Retrieves the green channel of `color` as a fixed point
|
|
5206
5439
|
* value between 0 and 1.0.
|
|
5207
5440
|
* @returns the green channel of the passed color
|
|
5441
|
+
* @since 1.0
|
|
5208
5442
|
*/
|
|
5209
5443
|
get_green(): number;
|
|
5210
5444
|
|
|
@@ -5212,6 +5446,7 @@ export namespace Cogl {
|
|
|
5212
5446
|
* Retrieves the green channel of `color` as a byte value
|
|
5213
5447
|
* between 0 and 255
|
|
5214
5448
|
* @returns the green channel of the passed color
|
|
5449
|
+
* @since 1.0
|
|
5215
5450
|
*/
|
|
5216
5451
|
get_green_byte(): number;
|
|
5217
5452
|
|
|
@@ -5219,6 +5454,7 @@ export namespace Cogl {
|
|
|
5219
5454
|
* Retrieves the green channel of `color` as a floating point
|
|
5220
5455
|
* value between 0.0 and 1.0
|
|
5221
5456
|
* @returns the green channel of the passed color
|
|
5457
|
+
* @since 1.0
|
|
5222
5458
|
*/
|
|
5223
5459
|
get_green_float(): number;
|
|
5224
5460
|
|
|
@@ -5226,6 +5462,7 @@ export namespace Cogl {
|
|
|
5226
5462
|
* Retrieves the red channel of `color` as a fixed point
|
|
5227
5463
|
* value between 0 and 1.0.
|
|
5228
5464
|
* @returns the red channel of the passed color
|
|
5465
|
+
* @since 1.0
|
|
5229
5466
|
*/
|
|
5230
5467
|
get_red(): number;
|
|
5231
5468
|
|
|
@@ -5233,6 +5470,7 @@ export namespace Cogl {
|
|
|
5233
5470
|
* Retrieves the red channel of `color` as a byte value
|
|
5234
5471
|
* between 0 and 255
|
|
5235
5472
|
* @returns the red channel of the passed color
|
|
5473
|
+
* @since 1.0
|
|
5236
5474
|
*/
|
|
5237
5475
|
get_red_byte(): number;
|
|
5238
5476
|
|
|
@@ -5240,6 +5478,7 @@ export namespace Cogl {
|
|
|
5240
5478
|
* Retrieves the red channel of `color` as a floating point
|
|
5241
5479
|
* value between 0.0 and 1.0
|
|
5242
5480
|
* @returns the red channel of the passed color
|
|
5481
|
+
* @since 1.0
|
|
5243
5482
|
*/
|
|
5244
5483
|
get_red_float(): number;
|
|
5245
5484
|
|
|
@@ -5249,12 +5488,14 @@ export namespace Cogl {
|
|
|
5249
5488
|
* @param green value of the green channel, between 0 and 1.0
|
|
5250
5489
|
* @param blue value of the blue channel, between 0 and 1.0
|
|
5251
5490
|
* @param alpha value of the alpha channel, between 0 and 1.0
|
|
5491
|
+
* @since 1.4
|
|
5252
5492
|
*/
|
|
5253
5493
|
init_from_4f(red: number, green: number, blue: number, alpha: number): void;
|
|
5254
5494
|
|
|
5255
5495
|
/**
|
|
5256
5496
|
* Sets the values of the passed channels into a {@link Cogl.Color}
|
|
5257
5497
|
* @param color_array a pointer to an array of 4 float color components
|
|
5498
|
+
* @since 1.4
|
|
5258
5499
|
*/
|
|
5259
5500
|
init_from_4fv(color_array: number): void;
|
|
5260
5501
|
|
|
@@ -5264,6 +5505,7 @@ export namespace Cogl {
|
|
|
5264
5505
|
* @param green value of the green channel, between 0 and 255
|
|
5265
5506
|
* @param blue value of the blue channel, between 0 and 255
|
|
5266
5507
|
* @param alpha value of the alpha channel, between 0 and 255
|
|
5508
|
+
* @since 1.4
|
|
5267
5509
|
*/
|
|
5268
5510
|
init_from_4ub(red: number, green: number, blue: number, alpha: number): void;
|
|
5269
5511
|
|
|
@@ -5271,78 +5513,91 @@ export namespace Cogl {
|
|
|
5271
5513
|
* Converts a non-premultiplied color to a pre-multiplied color. For
|
|
5272
5514
|
* example, semi-transparent red is (1.0, 0, 0, 0.5) when non-premultiplied
|
|
5273
5515
|
* and (0.5, 0, 0, 0.5) when premultiplied.
|
|
5516
|
+
* @since 1.0
|
|
5274
5517
|
*/
|
|
5275
5518
|
premultiply(): void;
|
|
5276
5519
|
|
|
5277
5520
|
/**
|
|
5278
5521
|
* Sets the alpha channel of `color` to `alpha`.
|
|
5279
5522
|
* @param alpha a float value between 0.0f and 1.0f
|
|
5523
|
+
* @since 1.4
|
|
5280
5524
|
*/
|
|
5281
5525
|
set_alpha(alpha: number): void;
|
|
5282
5526
|
|
|
5283
5527
|
/**
|
|
5284
5528
|
* Sets the alpha channel of `color` to `alpha`.
|
|
5285
5529
|
* @param alpha a byte value between 0 and 255
|
|
5530
|
+
* @since 1.4
|
|
5286
5531
|
*/
|
|
5287
5532
|
set_alpha_byte(alpha: number): void;
|
|
5288
5533
|
|
|
5289
5534
|
/**
|
|
5290
5535
|
* Sets the alpha channel of `color` to `alpha`.
|
|
5291
5536
|
* @param alpha a float value between 0.0f and 1.0f
|
|
5537
|
+
* @since 1.4
|
|
5292
5538
|
*/
|
|
5293
5539
|
set_alpha_float(alpha: number): void;
|
|
5294
5540
|
|
|
5295
5541
|
/**
|
|
5296
5542
|
* Sets the blue channel of `color` to `blue`.
|
|
5297
5543
|
* @param blue a float value between 0.0f and 1.0f
|
|
5544
|
+
* @since 1.4
|
|
5298
5545
|
*/
|
|
5299
5546
|
set_blue(blue: number): void;
|
|
5300
5547
|
|
|
5301
5548
|
/**
|
|
5302
5549
|
* Sets the blue channel of `color` to `blue`.
|
|
5303
5550
|
* @param blue a byte value between 0 and 255
|
|
5551
|
+
* @since 1.4
|
|
5304
5552
|
*/
|
|
5305
5553
|
set_blue_byte(blue: number): void;
|
|
5306
5554
|
|
|
5307
5555
|
/**
|
|
5308
5556
|
* Sets the blue channel of `color` to `blue`.
|
|
5309
5557
|
* @param blue a float value between 0.0f and 1.0f
|
|
5558
|
+
* @since 1.4
|
|
5310
5559
|
*/
|
|
5311
5560
|
set_blue_float(blue: number): void;
|
|
5312
5561
|
|
|
5313
5562
|
/**
|
|
5314
5563
|
* Sets the green channel of `color` to `green`.
|
|
5315
5564
|
* @param green a float value between 0.0f and 1.0f
|
|
5565
|
+
* @since 1.4
|
|
5316
5566
|
*/
|
|
5317
5567
|
set_green(green: number): void;
|
|
5318
5568
|
|
|
5319
5569
|
/**
|
|
5320
5570
|
* Sets the green channel of `color` to `green`.
|
|
5321
5571
|
* @param green a byte value between 0 and 255
|
|
5572
|
+
* @since 1.4
|
|
5322
5573
|
*/
|
|
5323
5574
|
set_green_byte(green: number): void;
|
|
5324
5575
|
|
|
5325
5576
|
/**
|
|
5326
5577
|
* Sets the green channel of `color` to `green`.
|
|
5327
5578
|
* @param green a float value between 0.0f and 1.0f
|
|
5579
|
+
* @since 1.4
|
|
5328
5580
|
*/
|
|
5329
5581
|
set_green_float(green: number): void;
|
|
5330
5582
|
|
|
5331
5583
|
/**
|
|
5332
5584
|
* Sets the red channel of `color` to `red`.
|
|
5333
5585
|
* @param red a float value between 0.0f and 1.0f
|
|
5586
|
+
* @since 1.4
|
|
5334
5587
|
*/
|
|
5335
5588
|
set_red(red: number): void;
|
|
5336
5589
|
|
|
5337
5590
|
/**
|
|
5338
5591
|
* Sets the red channel of `color` to `red`.
|
|
5339
5592
|
* @param red a byte value between 0 and 255
|
|
5593
|
+
* @since 1.4
|
|
5340
5594
|
*/
|
|
5341
5595
|
set_red_byte(red: number): void;
|
|
5342
5596
|
|
|
5343
5597
|
/**
|
|
5344
5598
|
* Sets the red channel of `color` to `red`.
|
|
5345
5599
|
* @param red a float value between 0.0f and 1.0f
|
|
5600
|
+
* @since 1.4
|
|
5346
5601
|
*/
|
|
5347
5602
|
set_red_float(red: number): void;
|
|
5348
5603
|
|
|
@@ -5351,6 +5606,7 @@ export namespace Cogl {
|
|
|
5351
5606
|
*
|
|
5352
5607
|
* The `hue` value is in the 0 .. 360 range. The `luminance` and
|
|
5353
5608
|
* `saturation` values are in the 0 .. 1 range.
|
|
5609
|
+
* @since 1.16
|
|
5354
5610
|
*/
|
|
5355
5611
|
to_hsl(): [number, number, number];
|
|
5356
5612
|
|
|
@@ -5358,6 +5614,7 @@ export namespace Cogl {
|
|
|
5358
5614
|
* Converts a pre-multiplied color to a non-premultiplied color. For
|
|
5359
5615
|
* example, semi-transparent red is (0.5, 0, 0, 0.5) when premultiplied
|
|
5360
5616
|
* and (1.0, 0, 0, 0.5) when non-premultiplied.
|
|
5617
|
+
* @since 1.4
|
|
5361
5618
|
*/
|
|
5362
5619
|
unpremultiply(): void;
|
|
5363
5620
|
}
|
|
@@ -5414,6 +5671,8 @@ export namespace Cogl {
|
|
|
5414
5671
|
* The default is {@link Cogl.MaterialAlphaFunc.ALWAYS}
|
|
5415
5672
|
* @param alpha_func A `CoglMaterialAlphaFunc` constant
|
|
5416
5673
|
* @param alpha_reference A reference point that the chosen alpha function uses to compare incoming fragments to.
|
|
5674
|
+
* @since 1.0
|
|
5675
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_alpha_test_function()` instead
|
|
5417
5676
|
*/
|
|
5418
5677
|
set_alpha_test_function(alpha_func: MaterialAlphaFunc, alpha_reference: number): void;
|
|
5419
5678
|
|
|
@@ -5488,6 +5747,9 @@ export namespace Cogl {
|
|
|
5488
5747
|
* is in premultiplied form.
|
|
5489
5748
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired blend function.
|
|
5490
5749
|
* @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).
|
|
5750
|
+
* @since 1.0
|
|
5751
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_blend()` instead
|
|
5752
|
+
* @throws GLib.Error
|
|
5491
5753
|
*/
|
|
5492
5754
|
set_blend(blend_string: string): boolean;
|
|
5493
5755
|
|
|
@@ -5495,6 +5757,8 @@ export namespace Cogl {
|
|
|
5495
5757
|
* When blending is setup to reference a CONSTANT blend factor then
|
|
5496
5758
|
* blending will depend on the constant set with this function.
|
|
5497
5759
|
* @param constant_color The constant color you want
|
|
5760
|
+
* @since 1.0
|
|
5761
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_blend_constant()` instead
|
|
5498
5762
|
*/
|
|
5499
5763
|
set_blend_constant(constant_color: Color): void;
|
|
5500
5764
|
|
|
@@ -5508,6 +5772,8 @@ export namespace Cogl {
|
|
|
5508
5772
|
*
|
|
5509
5773
|
* The default value is (1.0, 1.0, 1.0, 1.0)
|
|
5510
5774
|
* @param color The components of the color
|
|
5775
|
+
* @since 1.0
|
|
5776
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_color()` instead
|
|
5511
5777
|
*/
|
|
5512
5778
|
set_color(color: Color): void;
|
|
5513
5779
|
|
|
@@ -5519,6 +5785,8 @@ export namespace Cogl {
|
|
|
5519
5785
|
* @param green The green component
|
|
5520
5786
|
* @param blue The blue component
|
|
5521
5787
|
* @param alpha The alpha component
|
|
5788
|
+
* @since 1.0
|
|
5789
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_color4ub()` instead
|
|
5522
5790
|
*/
|
|
5523
5791
|
set_color4ub(red: number, green: number, blue: number, alpha: number): void;
|
|
5524
5792
|
|
|
@@ -5535,6 +5803,8 @@ export namespace Cogl {
|
|
|
5535
5803
|
* as purely GLSL based layers.</note>
|
|
5536
5804
|
* @param layer_index the index of the layer
|
|
5537
5805
|
* @param texture a {@link Cogl.Handle} for the layer object
|
|
5806
|
+
* @since 1.0
|
|
5807
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer()` instead
|
|
5538
5808
|
*/
|
|
5539
5809
|
set_layer(layer_index: number, texture: Handle): void;
|
|
5540
5810
|
|
|
@@ -5617,6 +5887,9 @@ export namespace Cogl {
|
|
|
5617
5887
|
* @param layer_index Specifies the layer you want define a combine function for
|
|
5618
5888
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired texture combine function.
|
|
5619
5889
|
* @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
|
|
5890
|
+
* @since 1.0
|
|
5891
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_combine()` instead
|
|
5892
|
+
* @throws GLib.Error
|
|
5620
5893
|
*/
|
|
5621
5894
|
set_layer_combine(layer_index: number, blend_string: string): boolean;
|
|
5622
5895
|
|
|
@@ -5625,6 +5898,8 @@ export namespace Cogl {
|
|
|
5625
5898
|
* description then you can use this function to define its value.
|
|
5626
5899
|
* @param layer_index Specifies the layer you want to specify a constant used for texture combining
|
|
5627
5900
|
* @param constant The constant color you want
|
|
5901
|
+
* @since 1.0
|
|
5902
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_combine_constant()` instead
|
|
5628
5903
|
*/
|
|
5629
5904
|
set_layer_combine_constant(layer_index: number, constant: Color): void;
|
|
5630
5905
|
|
|
@@ -5634,6 +5909,7 @@ export namespace Cogl {
|
|
|
5634
5909
|
* @param layer_index the layer number to change.
|
|
5635
5910
|
* @param min_filter the filter used when scaling a texture down.
|
|
5636
5911
|
* @param mag_filter the filter used when magnifying a texture.
|
|
5912
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_filters()` instead
|
|
5637
5913
|
*/
|
|
5638
5914
|
set_layer_filters(layer_index: number, min_filter: MaterialFilter, mag_filter: MaterialFilter): void;
|
|
5639
5915
|
|
|
@@ -5642,6 +5918,7 @@ export namespace Cogl {
|
|
|
5642
5918
|
* and rotate a single layer of a material used to fill your geometry.
|
|
5643
5919
|
* @param layer_index the index for the layer inside `material`
|
|
5644
5920
|
* @param matrix the transformation matrix for the layer
|
|
5921
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_matrix()` instead
|
|
5645
5922
|
*/
|
|
5646
5923
|
set_layer_matrix(layer_index: number, matrix: Matrix): void;
|
|
5647
5924
|
|
|
@@ -5655,6 +5932,9 @@ export namespace Cogl {
|
|
|
5655
5932
|
* @param layer_index the layer number to change.
|
|
5656
5933
|
* @param enable whether to enable point sprite coord generation.
|
|
5657
5934
|
* @returns `true` if the function succeeds, `false` otherwise.
|
|
5935
|
+
* @since 1.4
|
|
5936
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_point_sprite_coords_enabled()` instead
|
|
5937
|
+
* @throws GLib.Error
|
|
5658
5938
|
*/
|
|
5659
5939
|
set_layer_point_sprite_coords_enabled(layer_index: number, enable: boolean): boolean;
|
|
5660
5940
|
|
|
@@ -5667,6 +5947,8 @@ export namespace Cogl {
|
|
|
5667
5947
|
* screen space so it will be the same regardless of any
|
|
5668
5948
|
* transformations. The default point size is 1.0.
|
|
5669
5949
|
* @param point_size the new point size.
|
|
5950
|
+
* @since 1.4
|
|
5951
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_point_size()` instead
|
|
5670
5952
|
*/
|
|
5671
5953
|
set_point_size(point_size: number): void;
|
|
5672
5954
|
|
|
@@ -5707,6 +5989,8 @@ export namespace Cogl {
|
|
|
5707
5989
|
* meantime we hope this will handle most practical GLSL and ARBfp
|
|
5708
5990
|
* requirements.
|
|
5709
5991
|
* @param program A {@link Cogl.Handle} to a linked CoglProgram
|
|
5992
|
+
* @since 1.4
|
|
5993
|
+
* @deprecated since 1.16: Use `CoglSnippet` api instead instead
|
|
5710
5994
|
*/
|
|
5711
5995
|
set_user_program(program: Handle): void;
|
|
5712
5996
|
}
|
|
@@ -5793,6 +6077,7 @@ export namespace Cogl {
|
|
|
5793
6077
|
* inverse matrix these are not considered in the comparison.
|
|
5794
6078
|
* @param v1 A 4x4 transformation matrix
|
|
5795
6079
|
* @param v2 A 4x4 transformation matrix
|
|
6080
|
+
* @since 1.4
|
|
5796
6081
|
*/
|
|
5797
6082
|
static equal(v1: null, v2: null): boolean;
|
|
5798
6083
|
|
|
@@ -5801,12 +6086,14 @@ export namespace Cogl {
|
|
|
5801
6086
|
* Allocates a new {@link Cogl.Matrix} on the heap and initializes it with
|
|
5802
6087
|
* the same values as `matrix`.
|
|
5803
6088
|
* @returns A newly allocated {@link Cogl.Matrix} which should be freed using `cogl_matrix_free()`
|
|
6089
|
+
* @since 1.6
|
|
5804
6090
|
*/
|
|
5805
6091
|
copy(): Matrix;
|
|
5806
6092
|
|
|
5807
6093
|
/**
|
|
5808
6094
|
* Frees a {@link Cogl.Matrix} that was previously allocated via a call to
|
|
5809
6095
|
* `cogl_matrix_copy()`.
|
|
6096
|
+
* @since 1.6
|
|
5810
6097
|
*/
|
|
5811
6098
|
free(): void;
|
|
5812
6099
|
|
|
@@ -5837,6 +6124,7 @@ export namespace Cogl {
|
|
|
5837
6124
|
* {@link Cogl.Matrix} so that subsequent requests for the inverse transform may
|
|
5838
6125
|
* avoid costly inversion calculations.</note>
|
|
5839
6126
|
* @returns `true` if the inverse was successfully calculated or `false` for degenerate transformations that can't be inverted (in this case the `inverse` matrix will simply be initialized with the identity matrix)
|
|
6127
|
+
* @since 1.2
|
|
5840
6128
|
*/
|
|
5841
6129
|
get_inverse(): [boolean, Matrix];
|
|
5842
6130
|
|
|
@@ -5880,12 +6168,14 @@ export namespace Cogl {
|
|
|
5880
6168
|
* @param tx x coordinate of the translation vector
|
|
5881
6169
|
* @param ty y coordinate of the translation vector
|
|
5882
6170
|
* @param tz z coordinate of the translation vector
|
|
6171
|
+
* @since 2.0
|
|
5883
6172
|
*/
|
|
5884
6173
|
init_translation(tx: number, ty: number, tz: number): void;
|
|
5885
6174
|
|
|
5886
6175
|
/**
|
|
5887
6176
|
* Determines if the given matrix is an identity matrix.
|
|
5888
6177
|
* @returns `true` if `matrix` is an identity matrix else `false`
|
|
6178
|
+
* @since 1.8
|
|
5889
6179
|
*/
|
|
5890
6180
|
is_identity(): boolean;
|
|
5891
6181
|
|
|
@@ -5925,6 +6215,7 @@ export namespace Cogl {
|
|
|
5925
6215
|
* @param world_up_x The X component of the world's up direction vector
|
|
5926
6216
|
* @param world_up_y The Y component of the world's up direction vector
|
|
5927
6217
|
* @param world_up_z The Z component of the world's up direction vector
|
|
6218
|
+
* @since 1.8
|
|
5928
6219
|
*/
|
|
5929
6220
|
look_at(eye_position_x: number, eye_position_y: number, eye_position_z: number, object_x: number, object_y: number, object_z: number, world_up_x: number, world_up_y: number, world_up_z: number): void;
|
|
5930
6221
|
|
|
@@ -5947,6 +6238,7 @@ export namespace Cogl {
|
|
|
5947
6238
|
* @param y_2 The y coordinate for the second horizontal clipping plane
|
|
5948
6239
|
* @param near The <emphasis>distance</emphasis> to the near clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
5949
6240
|
* @param far The <emphasis>distance</emphasis> to the far clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
6241
|
+
* @since 1.10
|
|
5950
6242
|
*/
|
|
5951
6243
|
orthographic(x_1: number, y_1: number, x_2: number, y_2: number, near: number, far: number): void;
|
|
5952
6244
|
|
|
@@ -6022,6 +6314,7 @@ export namespace Cogl {
|
|
|
6022
6314
|
* Multiplies `matrix` with a rotation transformation described by the
|
|
6023
6315
|
* given {@link Graphene.Euler}.
|
|
6024
6316
|
* @param euler A euler describing a rotation
|
|
6317
|
+
* @since 2.0
|
|
6025
6318
|
*/
|
|
6026
6319
|
rotate_euler(euler: Graphene.Euler): void;
|
|
6027
6320
|
|
|
@@ -6103,6 +6396,7 @@ export namespace Cogl {
|
|
|
6103
6396
|
/**
|
|
6104
6397
|
* Replaces `matrix` with its transpose. Ie, every element (i,j) in the
|
|
6105
6398
|
* new matrix is taken from element (j,i) in the old matrix.
|
|
6399
|
+
* @since 1.10
|
|
6106
6400
|
*/
|
|
6107
6401
|
transpose(): void;
|
|
6108
6402
|
|
|
@@ -6126,6 +6420,7 @@ export namespace Cogl {
|
|
|
6126
6420
|
* @param z_2d The distance to the 2D plane. (Should always be positive and be between `z_near` and the z_far value that was passed to `cogl_matrix_frustum()`)
|
|
6127
6421
|
* @param width_2d The width of the 2D coordinate system
|
|
6128
6422
|
* @param height_2d The height of the 2D coordinate system
|
|
6423
|
+
* @since 1.8
|
|
6129
6424
|
*/
|
|
6130
6425
|
view_2d_in_frustum(left: number, right: number, bottom: number, top: number, z_near: number, z_2d: number, width_2d: number, height_2d: number): void;
|
|
6131
6426
|
|
|
@@ -6147,6 +6442,7 @@ export namespace Cogl {
|
|
|
6147
6442
|
* @param z_2d The distance to the 2D plane. (Should always be positive and be between `z_near` and the z_far value that was passed to `cogl_matrix_frustum()`)
|
|
6148
6443
|
* @param width_2d The width of the 2D coordinate system
|
|
6149
6444
|
* @param height_2d The height of the 2D coordinate system
|
|
6445
|
+
* @since 1.8
|
|
6150
6446
|
*/
|
|
6151
6447
|
view_2d_in_perspective(fov_y: number, aspect: number, z_near: number, z_2d: number, width_2d: number, height_2d: number): void;
|
|
6152
6448
|
}
|
|
@@ -6377,6 +6673,8 @@ export namespace Cogl {
|
|
|
6377
6673
|
* program will abort with an error message if there is an error during
|
|
6378
6674
|
* automatic allocation.</note>
|
|
6379
6675
|
* @returns `true` if there were no error allocating the framebuffer, else `false`.
|
|
6676
|
+
* @since 1.8
|
|
6677
|
+
* @throws GLib.Error
|
|
6380
6678
|
*/
|
|
6381
6679
|
allocate(): boolean;
|
|
6382
6680
|
|
|
@@ -6385,6 +6683,7 @@ export namespace Cogl {
|
|
|
6385
6683
|
* that includes the color buffer then the specified `color` is used.
|
|
6386
6684
|
* @param buffers A mask of {@link Cogl.BufferBit}<!-- -->'s identifying which auxiliary buffers to clear
|
|
6387
6685
|
* @param color The color to clear the color buffer too if specified in `buffers`.
|
|
6686
|
+
* @since 1.8
|
|
6388
6687
|
*/
|
|
6389
6688
|
clear(buffers: bigint | number, color: Color): void;
|
|
6390
6689
|
|
|
@@ -6396,6 +6695,7 @@ export namespace Cogl {
|
|
|
6396
6695
|
* @param green The green component of color to clear the color buffer too if specified in `buffers`.
|
|
6397
6696
|
* @param blue The blue component of color to clear the color buffer too if specified in `buffers`.
|
|
6398
6697
|
* @param alpha The alpha component of color to clear the color buffer too if specified in `buffers`.
|
|
6698
|
+
* @since 1.8
|
|
6399
6699
|
*/
|
|
6400
6700
|
clear4f(buffers: bigint | number, red: number, green: number, blue: number, alpha: number): void;
|
|
6401
6701
|
|
|
@@ -6417,6 +6717,7 @@ export namespace Cogl {
|
|
|
6417
6717
|
* framebuffer, and it's not meaningful to try and discard the color buffer of
|
|
6418
6718
|
* a {@link Cogl.Offscreen} framebuffer since they are single-buffered.
|
|
6419
6719
|
* @param buffers A {@link Cogl.BufferBit} mask of which ancillary buffers you want to discard.
|
|
6720
|
+
* @since 1.8
|
|
6420
6721
|
*/
|
|
6421
6722
|
discard_buffers(buffers: bigint | number): void;
|
|
6422
6723
|
|
|
@@ -6466,6 +6767,7 @@ export namespace Cogl {
|
|
|
6466
6767
|
* @param y_2 y coordinate lower right on screen.
|
|
6467
6768
|
* @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.
|
|
6468
6769
|
* @param tex_coords_len The length of the `tex_coords` array. (For one layer and one group of texture coordinates, this would be 4)
|
|
6770
|
+
* @since 1.10
|
|
6469
6771
|
*/
|
|
6470
6772
|
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;
|
|
6471
6773
|
|
|
@@ -6486,6 +6788,7 @@ export namespace Cogl {
|
|
|
6486
6788
|
* @param y_1 Y coordinate of the top-left corner
|
|
6487
6789
|
* @param x_2 X coordinate of the bottom-right corner
|
|
6488
6790
|
* @param y_2 Y coordinate of the bottom-right corner
|
|
6791
|
+
* @since 1.10
|
|
6489
6792
|
*/
|
|
6490
6793
|
draw_rectangle(pipeline: Pipeline, x_1: number, y_1: number, x_2: number, y_2: number): void;
|
|
6491
6794
|
|
|
@@ -6512,6 +6815,7 @@ export namespace Cogl {
|
|
|
6512
6815
|
* @param pipeline A {@link Cogl.Pipeline} state object
|
|
6513
6816
|
* @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).
|
|
6514
6817
|
* @param n_rectangles number of rectangles defined in `coordinates`.
|
|
6818
|
+
* @since 1.10
|
|
6515
6819
|
*/
|
|
6516
6820
|
draw_rectangles(pipeline: Pipeline, coordinates: number[], n_rectangles: number): void;
|
|
6517
6821
|
|
|
@@ -6551,6 +6855,7 @@ export namespace Cogl {
|
|
|
6551
6855
|
* @param t_1 T texture coordinate of the top-left coorner
|
|
6552
6856
|
* @param s_2 S texture coordinate of the bottom-right coorner
|
|
6553
6857
|
* @param t_2 T texture coordinate of the bottom-right coorner
|
|
6858
|
+
* @since 1.10
|
|
6554
6859
|
*/
|
|
6555
6860
|
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;
|
|
6556
6861
|
|
|
@@ -6592,6 +6897,7 @@ export namespace Cogl {
|
|
|
6592
6897
|
* @param pipeline A {@link Cogl.Pipeline} state object
|
|
6593
6898
|
* @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()`.
|
|
6594
6899
|
* @param n_rectangles number of rectangles to `coordinates` to draw
|
|
6900
|
+
* @since 1.10
|
|
6595
6901
|
*/
|
|
6596
6902
|
draw_textured_rectangles(pipeline: Pipeline, coordinates: number[], n_rectangles: number): void;
|
|
6597
6903
|
|
|
@@ -6605,6 +6911,7 @@ export namespace Cogl {
|
|
|
6605
6911
|
* One example might be for benchmarking purposes to be sure timing
|
|
6606
6912
|
* measurements reflect the time that the GPU is busy for not just the time it
|
|
6607
6913
|
* takes to queue rendering commands.
|
|
6914
|
+
* @since 1.10
|
|
6608
6915
|
*/
|
|
6609
6916
|
finish(): void;
|
|
6610
6917
|
|
|
@@ -6626,18 +6933,21 @@ export namespace Cogl {
|
|
|
6626
6933
|
* @param top Y position of the top clipping plane where it intersects the near clipping plane
|
|
6627
6934
|
* @param z_near The distance to the near clipping plane (Must be positive)
|
|
6628
6935
|
* @param z_far The distance to the far clipping plane (Must be positive)
|
|
6936
|
+
* @since 1.10
|
|
6629
6937
|
*/
|
|
6630
6938
|
frustum(left: number, right: number, bottom: number, top: number, z_near: number, z_far: number): void;
|
|
6631
6939
|
|
|
6632
6940
|
/**
|
|
6633
6941
|
* Retrieves the number of alpha bits of `framebuffer`
|
|
6634
6942
|
* @returns the number of bits
|
|
6943
|
+
* @since 1.8
|
|
6635
6944
|
*/
|
|
6636
6945
|
get_alpha_bits(): number;
|
|
6637
6946
|
|
|
6638
6947
|
/**
|
|
6639
6948
|
* Retrieves the number of blue bits of `framebuffer`
|
|
6640
6949
|
* @returns the number of bits
|
|
6950
|
+
* @since 1.8
|
|
6641
6951
|
*/
|
|
6642
6952
|
get_blue_bits(): number;
|
|
6643
6953
|
|
|
@@ -6646,12 +6956,14 @@ export namespace Cogl {
|
|
|
6646
6956
|
* instantiated within. This is the {@link Cogl.Context} that was passed to
|
|
6647
6957
|
* `cogl_onscreen_new()` for example.
|
|
6648
6958
|
* @returns The {@link Cogl.Context} that the given `framebuffer` was instantiated within.
|
|
6959
|
+
* @since 1.8
|
|
6649
6960
|
*/
|
|
6650
6961
|
get_context(): Context;
|
|
6651
6962
|
|
|
6652
6963
|
/**
|
|
6653
6964
|
* Retrieves the number of depth bits of `framebuffer`
|
|
6654
6965
|
* @returns the number of bits
|
|
6966
|
+
* @since 2.0
|
|
6655
6967
|
*/
|
|
6656
6968
|
get_depth_bits(): number;
|
|
6657
6969
|
|
|
@@ -6659,6 +6971,7 @@ export namespace Cogl {
|
|
|
6659
6971
|
* Queries whether depth buffer writing is enabled for `framebuffer`. This
|
|
6660
6972
|
* can be controlled via `cogl_framebuffer_set_depth_write_enabled()`.
|
|
6661
6973
|
* @returns `true` if depth writing is enabled or `false` if not.
|
|
6974
|
+
* @since 1.18
|
|
6662
6975
|
*/
|
|
6663
6976
|
get_depth_write_enabled(): boolean;
|
|
6664
6977
|
|
|
@@ -6670,18 +6983,21 @@ export namespace Cogl {
|
|
|
6670
6983
|
* display pipeline does not support dithering. This value only represents
|
|
6671
6984
|
* the user's request for dithering.</note>
|
|
6672
6985
|
* @returns `true` if dithering has been requested or `false` if not.
|
|
6986
|
+
* @since 1.8
|
|
6673
6987
|
*/
|
|
6674
6988
|
get_dither_enabled(): boolean;
|
|
6675
6989
|
|
|
6676
6990
|
/**
|
|
6677
6991
|
* Retrieves the number of green bits of `framebuffer`
|
|
6678
6992
|
* @returns the number of bits
|
|
6993
|
+
* @since 1.8
|
|
6679
6994
|
*/
|
|
6680
6995
|
get_green_bits(): number;
|
|
6681
6996
|
|
|
6682
6997
|
/**
|
|
6683
6998
|
* Queries the current height of the given `framebuffer`.
|
|
6684
6999
|
* @returns The height of `framebuffer`.
|
|
7000
|
+
* @since 1.8
|
|
6685
7001
|
*/
|
|
6686
7002
|
get_height(): number;
|
|
6687
7003
|
|
|
@@ -6689,17 +7005,20 @@ export namespace Cogl {
|
|
|
6689
7005
|
|
|
6690
7006
|
/**
|
|
6691
7007
|
* Stores the current model-view matrix in `matrix`.
|
|
7008
|
+
* @since 1.10
|
|
6692
7009
|
*/
|
|
6693
7010
|
get_modelview_matrix(): Matrix;
|
|
6694
7011
|
|
|
6695
7012
|
/**
|
|
6696
7013
|
* Stores the current projection matrix in `matrix`.
|
|
7014
|
+
* @since 1.10
|
|
6697
7015
|
*/
|
|
6698
7016
|
get_projection_matrix(): Matrix;
|
|
6699
7017
|
|
|
6700
7018
|
/**
|
|
6701
7019
|
* Retrieves the number of red bits of `framebuffer`
|
|
6702
7020
|
* @returns the number of bits
|
|
7021
|
+
* @since 1.8
|
|
6703
7022
|
*/
|
|
6704
7023
|
get_red_bits(): number;
|
|
6705
7024
|
|
|
@@ -6717,6 +7036,7 @@ export namespace Cogl {
|
|
|
6717
7036
|
* framebuffer has been allocated the value will reflect the actual
|
|
6718
7037
|
* number of samples that will be made by the GPU.
|
|
6719
7038
|
* @returns The number of point samples made per pixel when rasterizing geometry or 0 if single-sample rendering has been chosen.
|
|
7039
|
+
* @since 1.10
|
|
6720
7040
|
*/
|
|
6721
7041
|
get_samples_per_pixel(): number;
|
|
6722
7042
|
|
|
@@ -6724,6 +7044,7 @@ export namespace Cogl {
|
|
|
6724
7044
|
* Gets the current {@link Cogl.StereoMode}, which defines which stereo buffers
|
|
6725
7045
|
* should be drawn to. See `cogl_framebuffer_set_stereo_mode()`.
|
|
6726
7046
|
* @returns A {@link Cogl.StereoMode}
|
|
7047
|
+
* @since 1.20
|
|
6727
7048
|
*/
|
|
6728
7049
|
get_stereo_mode(): StereoMode;
|
|
6729
7050
|
|
|
@@ -6732,6 +7053,7 @@ export namespace Cogl {
|
|
|
6732
7053
|
* using `cogl_framebuffer_set_viewport()` or the default values which are 0, 0,
|
|
6733
7054
|
* framebuffer_width and framebuffer_height. The values are written into the
|
|
6734
7055
|
* given `viewport` array.
|
|
7056
|
+
* @since 1.8
|
|
6735
7057
|
*/
|
|
6736
7058
|
get_viewport4fv(): number[];
|
|
6737
7059
|
|
|
@@ -6739,6 +7061,7 @@ export namespace Cogl {
|
|
|
6739
7061
|
* Queries the height of the viewport as set using `cogl_framebuffer_set_viewport()`
|
|
6740
7062
|
* or the default value which is the height of the framebuffer.
|
|
6741
7063
|
* @returns The height of the viewport.
|
|
7064
|
+
* @since 1.8
|
|
6742
7065
|
*/
|
|
6743
7066
|
get_viewport_height(): number;
|
|
6744
7067
|
|
|
@@ -6746,6 +7069,7 @@ export namespace Cogl {
|
|
|
6746
7069
|
* Queries the width of the viewport as set using `cogl_framebuffer_set_viewport()`
|
|
6747
7070
|
* or the default value which is the width of the framebuffer.
|
|
6748
7071
|
* @returns The width of the viewport.
|
|
7072
|
+
* @since 1.8
|
|
6749
7073
|
*/
|
|
6750
7074
|
get_viewport_width(): number;
|
|
6751
7075
|
|
|
@@ -6753,6 +7077,7 @@ export namespace Cogl {
|
|
|
6753
7077
|
* Queries the x coordinate of the viewport origin as set using `cogl_framebuffer_set_viewport()`
|
|
6754
7078
|
* or the default value which is 0.
|
|
6755
7079
|
* @returns The x coordinate of the viewport origin.
|
|
7080
|
+
* @since 1.8
|
|
6756
7081
|
*/
|
|
6757
7082
|
get_viewport_x(): number;
|
|
6758
7083
|
|
|
@@ -6760,17 +7085,20 @@ export namespace Cogl {
|
|
|
6760
7085
|
* Queries the y coordinate of the viewport origin as set using `cogl_framebuffer_set_viewport()`
|
|
6761
7086
|
* or the default value which is 0.
|
|
6762
7087
|
* @returns The y coordinate of the viewport origin.
|
|
7088
|
+
* @since 1.8
|
|
6763
7089
|
*/
|
|
6764
7090
|
get_viewport_y(): number;
|
|
6765
7091
|
|
|
6766
7092
|
/**
|
|
6767
7093
|
* Queries the current width of the given `framebuffer`.
|
|
6768
7094
|
* @returns The width of `framebuffer`.
|
|
7095
|
+
* @since 1.8
|
|
6769
7096
|
*/
|
|
6770
7097
|
get_width(): number;
|
|
6771
7098
|
|
|
6772
7099
|
/**
|
|
6773
7100
|
* Resets the current model-view matrix to the identity matrix.
|
|
7101
|
+
* @since 1.10
|
|
6774
7102
|
*/
|
|
6775
7103
|
identity_matrix(): void;
|
|
6776
7104
|
|
|
@@ -6783,6 +7111,7 @@ export namespace Cogl {
|
|
|
6783
7111
|
* @param y_2 The y coordinate for the second horizontal clipping plane
|
|
6784
7112
|
* @param near The <emphasis>distance</emphasis> to the near clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
6785
7113
|
* @param far The <emphasis>distance</emphasis> to the far clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
7114
|
+
* @since 1.10
|
|
6786
7115
|
*/
|
|
6787
7116
|
orthographic(x_1: number, y_1: number, x_2: number, y_2: number, near: number, far: number): void;
|
|
6788
7117
|
|
|
@@ -6798,6 +7127,7 @@ export namespace Cogl {
|
|
|
6798
7127
|
* @param aspect The (width over height) aspect ratio for display
|
|
6799
7128
|
* @param z_near The distance to the near clipping plane (Must be positive, and must not be 0)
|
|
6800
7129
|
* @param z_far The distance to the far clipping plane (Must be positive)
|
|
7130
|
+
* @since 1.10
|
|
6801
7131
|
*/
|
|
6802
7132
|
perspective(fov_y: number, aspect: number, z_near: number, z_far: number): void;
|
|
6803
7133
|
|
|
@@ -6805,17 +7135,20 @@ export namespace Cogl {
|
|
|
6805
7135
|
* Reverts the clipping region to the state before the last call to
|
|
6806
7136
|
* `cogl_framebuffer_push_scissor_clip()`, `cogl_framebuffer_push_rectangle_clip()`
|
|
6807
7137
|
* `cogl_framebuffer_push_path_clip()`, or `cogl_framebuffer_push_primitive_clip()`.
|
|
7138
|
+
* @since 1.10
|
|
6808
7139
|
*/
|
|
6809
7140
|
pop_clip(): void;
|
|
6810
7141
|
|
|
6811
7142
|
/**
|
|
6812
7143
|
* Restores the model-view matrix on the top of the matrix stack.
|
|
7144
|
+
* @since 1.10
|
|
6813
7145
|
*/
|
|
6814
7146
|
pop_matrix(): void;
|
|
6815
7147
|
|
|
6816
7148
|
/**
|
|
6817
7149
|
* Copies the current model-view matrix onto the matrix stack. The matrix
|
|
6818
7150
|
* can later be restored with `cogl_framebuffer_pop_matrix()`.
|
|
7151
|
+
* @since 1.10
|
|
6819
7152
|
*/
|
|
6820
7153
|
push_matrix(): void;
|
|
6821
7154
|
|
|
@@ -6832,6 +7165,7 @@ export namespace Cogl {
|
|
|
6832
7165
|
* @param y_1 y coordinate for top left corner of the clip rectangle
|
|
6833
7166
|
* @param x_2 x coordinate for bottom right corner of the clip rectangle
|
|
6834
7167
|
* @param y_2 y coordinate for bottom right corner of the clip rectangle
|
|
7168
|
+
* @since 1.10
|
|
6835
7169
|
*/
|
|
6836
7170
|
push_rectangle_clip(x_1: number, y_1: number, x_2: number, y_2: number): void;
|
|
6837
7171
|
|
|
@@ -6853,6 +7187,7 @@ export namespace Cogl {
|
|
|
6853
7187
|
* @param y top edge of the clip rectangle in window coordinates
|
|
6854
7188
|
* @param width width of the clip rectangle
|
|
6855
7189
|
* @param height height of the clip rectangle
|
|
7190
|
+
* @since 1.10
|
|
6856
7191
|
*/
|
|
6857
7192
|
push_scissor_clip(x: number, y: number, width: number, height: number): void;
|
|
6858
7193
|
|
|
@@ -6890,6 +7225,7 @@ export namespace Cogl {
|
|
|
6890
7225
|
* @param format The pixel format to store the data in
|
|
6891
7226
|
* @param pixels The address of the buffer to store the data in
|
|
6892
7227
|
* @returns `true` if the read succeeded or `false` otherwise.
|
|
7228
|
+
* @since 1.10
|
|
6893
7229
|
*/
|
|
6894
7230
|
read_pixels(x: number, y: number, width: number, height: number, format: PixelFormat, pixels: number): boolean;
|
|
6895
7231
|
|
|
@@ -6909,6 +7245,7 @@ export namespace Cogl {
|
|
|
6909
7245
|
* @param source Identifies which auxiliary buffer you want to read (only COGL_READ_PIXELS_COLOR_BUFFER supported currently)
|
|
6910
7246
|
* @param bitmap The bitmap to store the results in.
|
|
6911
7247
|
* @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.
|
|
7248
|
+
* @since 1.10
|
|
6912
7249
|
*/
|
|
6913
7250
|
read_pixels_into_bitmap(x: number, y: number, source: ReadPixelsFlags, bitmap: Bitmap): boolean;
|
|
6914
7251
|
|
|
@@ -6933,6 +7270,7 @@ export namespace Cogl {
|
|
|
6933
7270
|
* If you are performing incremental updates to a framebuffer you
|
|
6934
7271
|
* should consider using `cogl_framebuffer_resolve_samples_region()`
|
|
6935
7272
|
* instead to avoid resolving redundant pixels.
|
|
7273
|
+
* @since 1.8
|
|
6936
7274
|
*/
|
|
6937
7275
|
resolve_samples(): void;
|
|
6938
7276
|
|
|
@@ -6962,6 +7300,7 @@ export namespace Cogl {
|
|
|
6962
7300
|
* @param y top-left y coordinate of region to resolve
|
|
6963
7301
|
* @param width width of region to resolve
|
|
6964
7302
|
* @param height height of region to resolve
|
|
7303
|
+
* @since 1.8
|
|
6965
7304
|
*/
|
|
6966
7305
|
resolve_samples_region(x: number, y: number, width: number, height: number): void;
|
|
6967
7306
|
|
|
@@ -6975,6 +7314,7 @@ export namespace Cogl {
|
|
|
6975
7314
|
* @param x X-component of vertex to rotate around.
|
|
6976
7315
|
* @param y Y-component of vertex to rotate around.
|
|
6977
7316
|
* @param z Z-component of vertex to rotate around.
|
|
7317
|
+
* @since 1.10
|
|
6978
7318
|
*/
|
|
6979
7319
|
rotate(angle: number, x: number, y: number, z: number): void;
|
|
6980
7320
|
|
|
@@ -6982,6 +7322,7 @@ export namespace Cogl {
|
|
|
6982
7322
|
* Multiplies the current model-view matrix by one that rotates
|
|
6983
7323
|
* according to the rotation described by `euler`.
|
|
6984
7324
|
* @param euler A {@link Graphene.Euler}
|
|
7325
|
+
* @since 2.0
|
|
6985
7326
|
*/
|
|
6986
7327
|
rotate_euler(euler: Graphene.Euler): void;
|
|
6987
7328
|
|
|
@@ -6991,6 +7332,7 @@ export namespace Cogl {
|
|
|
6991
7332
|
* @param x Amount to scale along the x-axis
|
|
6992
7333
|
* @param y Amount to scale along the y-axis
|
|
6993
7334
|
* @param z Amount to scale along the z-axis
|
|
7335
|
+
* @since 1.10
|
|
6994
7336
|
*/
|
|
6995
7337
|
scale(x: number, y: number, z: number): void;
|
|
6996
7338
|
|
|
@@ -7002,6 +7344,7 @@ export namespace Cogl {
|
|
|
7002
7344
|
*
|
|
7003
7345
|
* Depth buffer writing is enabled by default.
|
|
7004
7346
|
* @param depth_write_enabled `true` to enable depth writing or `false` to disable
|
|
7347
|
+
* @since 1.18
|
|
7005
7348
|
*/
|
|
7006
7349
|
set_depth_write_enabled(depth_write_enabled: boolean): void;
|
|
7007
7350
|
|
|
@@ -7020,18 +7363,21 @@ export namespace Cogl {
|
|
|
7020
7363
|
*
|
|
7021
7364
|
* Dithering is enabled by default.
|
|
7022
7365
|
* @param dither_enabled `true` to enable dithering or `false` to disable
|
|
7366
|
+
* @since 1.8
|
|
7023
7367
|
*/
|
|
7024
7368
|
set_dither_enabled(dither_enabled: boolean): void;
|
|
7025
7369
|
|
|
7026
7370
|
/**
|
|
7027
7371
|
* Sets `matrix` as the new model-view matrix.
|
|
7028
7372
|
* @param matrix the new model-view matrix
|
|
7373
|
+
* @since 1.10
|
|
7029
7374
|
*/
|
|
7030
7375
|
set_modelview_matrix(matrix: Matrix): void;
|
|
7031
7376
|
|
|
7032
7377
|
/**
|
|
7033
7378
|
* Sets `matrix` as the new projection matrix.
|
|
7034
7379
|
* @param matrix the new projection matrix
|
|
7380
|
+
* @since 1.10
|
|
7035
7381
|
*/
|
|
7036
7382
|
set_projection_matrix(matrix: Matrix): void;
|
|
7037
7383
|
|
|
@@ -7069,6 +7415,7 @@ export namespace Cogl {
|
|
|
7069
7415
|
* framebuffer has changed this can lead to redundant work being
|
|
7070
7416
|
* done.</note>
|
|
7071
7417
|
* @param samples_per_pixel The minimum number of samples per pixel
|
|
7418
|
+
* @since 1.8
|
|
7072
7419
|
*/
|
|
7073
7420
|
set_samples_per_pixel(samples_per_pixel: number): void;
|
|
7074
7421
|
|
|
@@ -7081,6 +7428,7 @@ export namespace Cogl {
|
|
|
7081
7428
|
* enabled. (See `cogl_onscreen_template_set_stereo_enabled()`,
|
|
7082
7429
|
* `cogl_framebuffer_get_is_stereo()`.)
|
|
7083
7430
|
* @param stereo_mode A {@link Cogl.StereoMode} specifying which stereo buffers should be drawn tow.
|
|
7431
|
+
* @since 1.20
|
|
7084
7432
|
*/
|
|
7085
7433
|
set_stereo_mode(stereo_mode: StereoMode): void;
|
|
7086
7434
|
|
|
@@ -7104,12 +7452,14 @@ export namespace Cogl {
|
|
|
7104
7452
|
* @param y The top-left y coordinate of the viewport origin (only integers supported currently)
|
|
7105
7453
|
* @param width The width of the viewport (only integers supported currently)
|
|
7106
7454
|
* @param height The height of the viewport (only integers supported currently)
|
|
7455
|
+
* @since 1.8
|
|
7107
7456
|
*/
|
|
7108
7457
|
set_viewport(x: number, y: number, width: number, height: number): void;
|
|
7109
7458
|
|
|
7110
7459
|
/**
|
|
7111
7460
|
* Multiplies the current model-view matrix by the given matrix.
|
|
7112
7461
|
* @param matrix the matrix to multiply with the current model-view
|
|
7462
|
+
* @since 1.10
|
|
7113
7463
|
*/
|
|
7114
7464
|
transform(matrix: Matrix): void;
|
|
7115
7465
|
|
|
@@ -7119,6 +7469,7 @@ export namespace Cogl {
|
|
|
7119
7469
|
* @param x Distance to translate along the x-axis
|
|
7120
7470
|
* @param y Distance to translate along the y-axis
|
|
7121
7471
|
* @param z Distance to translate along the z-axis
|
|
7472
|
+
* @since 1.10
|
|
7122
7473
|
*/
|
|
7123
7474
|
translate(x: number, y: number, z: number): void;
|
|
7124
7475
|
}
|
|
@@ -7181,6 +7532,7 @@ export namespace Cogl {
|
|
|
7181
7532
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
7182
7533
|
* framebuffer and rendered too.</note>
|
|
7183
7534
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
7535
|
+
* @throws GLib.Error
|
|
7184
7536
|
*/
|
|
7185
7537
|
allocate(): boolean;
|
|
7186
7538
|
|
|
@@ -7192,6 +7544,7 @@ export namespace Cogl {
|
|
|
7192
7544
|
* is {@link Cogl.TextureComponents.RGBA}. The other constructors which take
|
|
7193
7545
|
* a %CoglBitmap or a data pointer default to the same components as
|
|
7194
7546
|
* the pixel format of the data.
|
|
7547
|
+
* @since 1.18
|
|
7195
7548
|
*/
|
|
7196
7549
|
get_components(): TextureComponents;
|
|
7197
7550
|
|
|
@@ -7238,6 +7591,7 @@ export namespace Cogl {
|
|
|
7238
7591
|
*
|
|
7239
7592
|
* By default the pre-multipled state is `TRUE`.
|
|
7240
7593
|
* @returns `true` if red, green and blue components are internally stored pre-multiplied by the alpha value or `false` if not.
|
|
7594
|
+
* @since 1.18
|
|
7241
7595
|
*/
|
|
7242
7596
|
get_premultiplied(): boolean;
|
|
7243
7597
|
|
|
@@ -7270,6 +7624,8 @@ export namespace Cogl {
|
|
|
7270
7624
|
* @param sub_width Width in pixels of the subregion
|
|
7271
7625
|
* @param sub_height Height in pixels of the subregion
|
|
7272
7626
|
* @returns A newly created {@link Cogl.Texture} or `null` on failure
|
|
7627
|
+
* @since 1.2
|
|
7628
|
+
* @deprecated since 1.18: Use `cogl_sub_texture_new()`
|
|
7273
7629
|
*/
|
|
7274
7630
|
new_from_sub_texture(sub_x: number, sub_y: number, sub_width: number, sub_height: number): Texture;
|
|
7275
7631
|
|
|
@@ -7294,6 +7650,7 @@ export namespace Cogl {
|
|
|
7294
7650
|
* an image format as long as {@link Cogl.TextureComponents.RG} isn't used
|
|
7295
7651
|
* as the texture's components.
|
|
7296
7652
|
* @param components
|
|
7653
|
+
* @since 1.18
|
|
7297
7654
|
*/
|
|
7298
7655
|
set_components(components: TextureComponents): void;
|
|
7299
7656
|
|
|
@@ -7345,6 +7702,7 @@ export namespace Cogl {
|
|
|
7345
7702
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
7346
7703
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
7347
7704
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
7705
|
+
* @throws GLib.Error
|
|
7348
7706
|
*/
|
|
7349
7707
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
7350
7708
|
|
|
@@ -7371,6 +7729,7 @@ export namespace Cogl {
|
|
|
7371
7729
|
*
|
|
7372
7730
|
* By default the `premultipled` state is `TRUE`.
|
|
7373
7731
|
* @param premultiplied Whether any internally stored red, green or blue components are pre-multiplied by an alpha component.
|
|
7732
|
+
* @since 1.18
|
|
7374
7733
|
*/
|
|
7375
7734
|
set_premultiplied(premultiplied: boolean): void;
|
|
7376
7735
|
|
|
@@ -7408,6 +7767,7 @@ export namespace Cogl {
|
|
|
7408
7767
|
* @param dst_height height of destination region to write. (Must be less than or equal to the bitmap height)
|
|
7409
7768
|
* @param bitmap The source bitmap to read from
|
|
7410
7769
|
* @returns `true` if the subregion upload was successful, and `false` otherwise
|
|
7770
|
+
* @since 1.8
|
|
7411
7771
|
*/
|
|
7412
7772
|
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;
|
|
7413
7773
|
}
|