@girs/cogl-6 4.4.0 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -41
- package/cogl-6.d.ts +203 -163
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -4,82 +4,77 @@
|
|
|
4
4
|

|
|
5
5
|

|
|
6
6
|
|
|
7
|
+
GJS TypeScript type definitions for Cogl-6 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.5.0.
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
This package contains type declarations only. It ships no runtime code, so it adds
|
|
10
|
+
nothing to your program and works with any bundler or none at all.
|
|
9
11
|
|
|
10
12
|
## Install
|
|
11
13
|
|
|
12
|
-
Install the type definitions with npm:
|
|
13
14
|
```bash
|
|
14
15
|
npm install @girs/cogl-6
|
|
15
16
|
```
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
Any package manager works. The package has no dependencies beyond other `@girs/*`
|
|
19
|
+
type packages.
|
|
20
|
+
|
|
21
|
+
## What it exports
|
|
22
|
+
|
|
23
|
+
| Import | What you get |
|
|
24
|
+
|---|---|
|
|
25
|
+
| `@girs/cogl-6` | the namespace as a default export, plus the ambient and global declarations |
|
|
26
|
+
| `@girs/cogl-6/ambient` | only the `gi://` module declarations |
|
|
27
|
+
| `@girs/cogl-6/import` | only the `imports.gi` declarations |
|
|
28
|
+
| `@girs/cogl-6/cogl-6` | the namespace, without the side-effecting declarations |
|
|
29
|
+
|
|
30
|
+
## Three ways to import
|
|
31
|
+
|
|
32
|
+
Which one you use depends on how you write imports elsewhere, not on your toolchain.
|
|
33
|
+
|
|
34
|
+
### As a module
|
|
18
35
|
|
|
19
|
-
Import it like any other module:
|
|
20
36
|
```ts
|
|
21
37
|
import Cogl from '@girs/cogl-6';
|
|
22
38
|
```
|
|
23
39
|
|
|
24
|
-
###
|
|
40
|
+
### As `gi://`
|
|
25
41
|
|
|
26
|
-
|
|
27
|
-
|
|
42
|
+
GJS resolves `gi://` at runtime. To give it types, reference the package once, either
|
|
43
|
+
from your entry point or from `tsconfig.json`:
|
|
28
44
|
|
|
29
|
-
`index.ts`:
|
|
30
45
|
```ts
|
|
31
|
-
import '@girs/cogl-6'
|
|
46
|
+
import '@girs/cogl-6';
|
|
32
47
|
```
|
|
33
48
|
|
|
34
|
-
`tsconfig.json`:
|
|
35
49
|
```json
|
|
36
|
-
{
|
|
37
|
-
"compilerOptions": {
|
|
38
|
-
...
|
|
39
|
-
},
|
|
40
|
-
"include": ["@girs/cogl-6"],
|
|
41
|
-
...
|
|
42
|
-
}
|
|
50
|
+
{ "include": ["@girs/cogl-6"] }
|
|
43
51
|
```
|
|
44
52
|
|
|
45
|
-
|
|
53
|
+
Then the runtime spelling type-checks:
|
|
46
54
|
|
|
47
55
|
```ts
|
|
48
56
|
import Cogl from 'gi://Cogl?version=6';
|
|
49
57
|
```
|
|
50
58
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
GJS's global `imports.gi` works too, with types.
|
|
54
|
-
For this you need to include `@girs/cogl-6` or `@girs/cogl-6/import` in your `tsconfig` or entry point Typescript file:
|
|
59
|
+
Referencing `@girs/cogl-6/ambient` instead pulls in these declarations
|
|
60
|
+
alone. See [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules).
|
|
55
61
|
|
|
56
|
-
`
|
|
57
|
-
```ts
|
|
58
|
-
import '@girs/cogl-6'
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
`tsconfig.json`:
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"compilerOptions": {
|
|
65
|
-
...
|
|
66
|
-
},
|
|
67
|
-
"include": ["@girs/cogl-6"],
|
|
68
|
-
...
|
|
69
|
-
}
|
|
70
|
-
```
|
|
62
|
+
### As `imports.gi`
|
|
71
63
|
|
|
72
|
-
|
|
64
|
+
GJS's global object works the same way, via `@girs/cogl-6/import`:
|
|
73
65
|
|
|
74
66
|
```ts
|
|
75
67
|
const Cogl = imports.gi.Cogl;
|
|
76
68
|
```
|
|
77
69
|
|
|
78
|
-
|
|
70
|
+
## Building
|
|
79
71
|
|
|
80
|
-
|
|
72
|
+
The declarations need no build step. If you bundle, every bundler works, since there is
|
|
73
|
+
no runtime code to resolve. The [examples](https://github.com/gjsify/ts-for-gir/tree/main/examples)
|
|
74
|
+
show working setups for several.
|
|
81
75
|
|
|
82
76
|
## Other packages
|
|
83
77
|
|
|
84
|
-
|
|
78
|
+
Every pre-generated package is at [gjsify/types](https://github.com/gjsify/types).
|
|
79
|
+
|
|
85
80
|
|
package/cogl-6.d.ts
CHANGED
|
@@ -33,25 +33,25 @@ export namespace Cogl {
|
|
|
33
33
|
/**
|
|
34
34
|
* Data is the same size of a byte
|
|
35
35
|
*/
|
|
36
|
-
BYTE,
|
|
36
|
+
BYTE = 5120,
|
|
37
37
|
/**
|
|
38
38
|
* Data is the same size of an
|
|
39
39
|
* unsigned byte
|
|
40
40
|
*/
|
|
41
|
-
UNSIGNED_BYTE,
|
|
41
|
+
UNSIGNED_BYTE = 5121,
|
|
42
42
|
/**
|
|
43
43
|
* Data is the same size of a short integer
|
|
44
44
|
*/
|
|
45
|
-
SHORT,
|
|
45
|
+
SHORT = 5122,
|
|
46
46
|
/**
|
|
47
47
|
* Data is the same size of
|
|
48
48
|
* an unsigned short integer
|
|
49
49
|
*/
|
|
50
|
-
UNSIGNED_SHORT,
|
|
50
|
+
UNSIGNED_SHORT = 5123,
|
|
51
51
|
/**
|
|
52
52
|
* Data is the same size of a float
|
|
53
53
|
*/
|
|
54
|
-
FLOAT,
|
|
54
|
+
FLOAT = 5126,
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
|
|
@@ -69,15 +69,15 @@ export namespace Cogl {
|
|
|
69
69
|
* Generic failure code, something went
|
|
70
70
|
* wrong.
|
|
71
71
|
*/
|
|
72
|
-
FAILED,
|
|
72
|
+
FAILED = 0,
|
|
73
73
|
/**
|
|
74
74
|
* Unknown image type.
|
|
75
75
|
*/
|
|
76
|
-
UNKNOWN_TYPE,
|
|
76
|
+
UNKNOWN_TYPE = 1,
|
|
77
77
|
/**
|
|
78
78
|
* An image file was broken somehow.
|
|
79
79
|
*/
|
|
80
|
-
CORRUPT_IMAGE,
|
|
80
|
+
CORRUPT_IMAGE = 2,
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
|
|
@@ -90,20 +90,20 @@ export namespace Cogl {
|
|
|
90
90
|
/**
|
|
91
91
|
* Generic parse error
|
|
92
92
|
*/
|
|
93
|
-
PARSE_ERROR,
|
|
93
|
+
PARSE_ERROR = 0,
|
|
94
94
|
/**
|
|
95
95
|
* Argument parse error
|
|
96
96
|
*/
|
|
97
|
-
ARGUMENT_PARSE_ERROR,
|
|
97
|
+
ARGUMENT_PARSE_ERROR = 1,
|
|
98
98
|
/**
|
|
99
99
|
* Internal parser error
|
|
100
100
|
*/
|
|
101
|
-
INVALID_ERROR,
|
|
101
|
+
INVALID_ERROR = 2,
|
|
102
102
|
/**
|
|
103
103
|
* Blend string not
|
|
104
104
|
* supported by the GPU
|
|
105
105
|
*/
|
|
106
|
-
GPU_UNSUPPORTED_ERROR,
|
|
106
|
+
GPU_UNSUPPORTED_ERROR = 3,
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
|
|
@@ -121,41 +121,41 @@ export namespace Cogl {
|
|
|
121
121
|
/**
|
|
122
122
|
* Never passes.
|
|
123
123
|
*/
|
|
124
|
-
NEVER,
|
|
124
|
+
NEVER = 512,
|
|
125
125
|
/**
|
|
126
126
|
* Passes if the fragment's depth
|
|
127
127
|
* value is less than the value currently in the depth buffer.
|
|
128
128
|
*/
|
|
129
|
-
LESS,
|
|
129
|
+
LESS = 513,
|
|
130
130
|
/**
|
|
131
131
|
* Passes if the fragment's depth
|
|
132
132
|
* value is equal to the value currently in the depth buffer.
|
|
133
133
|
*/
|
|
134
|
-
EQUAL,
|
|
134
|
+
EQUAL = 514,
|
|
135
135
|
/**
|
|
136
136
|
* Passes if the fragment's depth
|
|
137
137
|
* value is less or equal to the value currently in the depth buffer.
|
|
138
138
|
*/
|
|
139
|
-
LEQUAL,
|
|
139
|
+
LEQUAL = 515,
|
|
140
140
|
/**
|
|
141
141
|
* Passes if the fragment's depth
|
|
142
142
|
* value is greater than the value currently in the depth buffer.
|
|
143
143
|
*/
|
|
144
|
-
GREATER,
|
|
144
|
+
GREATER = 516,
|
|
145
145
|
/**
|
|
146
146
|
* Passes if the fragment's depth
|
|
147
147
|
* value is not equal to the value currently in the depth buffer.
|
|
148
148
|
*/
|
|
149
|
-
NOTEQUAL,
|
|
149
|
+
NOTEQUAL = 517,
|
|
150
150
|
/**
|
|
151
151
|
* Passes if the fragment's depth
|
|
152
152
|
* value greater than or equal to the value currently in the depth buffer.
|
|
153
153
|
*/
|
|
154
|
-
GEQUAL,
|
|
154
|
+
GEQUAL = 518,
|
|
155
155
|
/**
|
|
156
156
|
* Always passes.
|
|
157
157
|
*/
|
|
158
|
-
ALWAYS,
|
|
158
|
+
ALWAYS = 519,
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
|
|
@@ -172,41 +172,41 @@ export namespace Cogl {
|
|
|
172
172
|
* {@link Cogl.IndicesType.INT} is supported in
|
|
173
173
|
* `cogl_indices_new()`.
|
|
174
174
|
*/
|
|
175
|
-
OGL_FEATURE_ID_UNSIGNED_INT_INDICES,
|
|
175
|
+
OGL_FEATURE_ID_UNSIGNED_INT_INDICES = 0,
|
|
176
176
|
/**
|
|
177
177
|
* Whether `cogl_buffer_map()` is
|
|
178
178
|
* supported with CoglBufferAccess including read support.
|
|
179
179
|
*/
|
|
180
|
-
OGL_FEATURE_ID_MAP_BUFFER_FOR_READ,
|
|
180
|
+
OGL_FEATURE_ID_MAP_BUFFER_FOR_READ = 1,
|
|
181
181
|
/**
|
|
182
182
|
* Whether `cogl_buffer_map()` is
|
|
183
183
|
* supported with CoglBufferAccess including write support.
|
|
184
184
|
*/
|
|
185
|
-
OGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE,
|
|
185
|
+
OGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE = 2,
|
|
186
186
|
/**
|
|
187
187
|
* Available if the window system supports reporting an event
|
|
188
188
|
* for swap buffer completions.
|
|
189
189
|
*/
|
|
190
|
-
OGL_FEATURE_ID_SWAP_BUFFERS_EVENT,
|
|
190
|
+
OGL_FEATURE_ID_SWAP_BUFFERS_EVENT = 3,
|
|
191
191
|
/**
|
|
192
192
|
* Whether frame presentation
|
|
193
193
|
* time stamps will be recorded in `CoglFrameInfo` objects.
|
|
194
194
|
*/
|
|
195
|
-
OGL_FEATURE_ID_PRESENTATION_TIME,
|
|
196
|
-
OGL_FEATURE_ID_FENCE,
|
|
195
|
+
OGL_FEATURE_ID_PRESENTATION_TIME = 4,
|
|
196
|
+
OGL_FEATURE_ID_FENCE = 5,
|
|
197
197
|
/**
|
|
198
198
|
* Support for
|
|
199
199
|
* {@link Cogl.TextureComponents.RG} as the internal components of a
|
|
200
200
|
* texture.
|
|
201
201
|
*/
|
|
202
|
-
OGL_FEATURE_ID_TEXTURE_RG,
|
|
202
|
+
OGL_FEATURE_ID_TEXTURE_RG = 6,
|
|
203
203
|
/**
|
|
204
204
|
* Available if the age of {@link Cogl.Onscreen} back
|
|
205
205
|
* buffers are tracked and so `cogl_onscreen_get_buffer_age()` can be
|
|
206
206
|
* expected to return age values other than 0.
|
|
207
207
|
*/
|
|
208
|
-
OGL_FEATURE_ID_BUFFER_AGE,
|
|
209
|
-
OGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL,
|
|
208
|
+
OGL_FEATURE_ID_BUFFER_AGE = 7,
|
|
209
|
+
OGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL = 8,
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
|
|
@@ -219,11 +219,11 @@ export namespace Cogl {
|
|
|
219
219
|
* The event was not handled, continues the
|
|
220
220
|
* processing
|
|
221
221
|
*/
|
|
222
|
-
CONTINUE,
|
|
222
|
+
CONTINUE = 0,
|
|
223
223
|
/**
|
|
224
224
|
* Remove the event, stops the processing
|
|
225
225
|
*/
|
|
226
|
-
REMOVE,
|
|
226
|
+
REMOVE = 1,
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
|
|
@@ -251,7 +251,7 @@ export namespace Cogl {
|
|
|
251
251
|
* acknowledged a frame and is ready for a
|
|
252
252
|
* new frame to be created.
|
|
253
253
|
*/
|
|
254
|
-
SYNC,
|
|
254
|
+
SYNC = 1,
|
|
255
255
|
/**
|
|
256
256
|
* Notifies that a frame has ended. This
|
|
257
257
|
* is a good time for applications to
|
|
@@ -261,7 +261,7 @@ export namespace Cogl {
|
|
|
261
261
|
* events should be expected after a
|
|
262
262
|
* `COGL_FRAME_EVENT_COMPLETE` event.
|
|
263
263
|
*/
|
|
264
|
-
COMPLETE,
|
|
264
|
+
COMPLETE = 2,
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
|
|
@@ -269,7 +269,7 @@ export namespace Cogl {
|
|
|
269
269
|
* @gir-type Enum
|
|
270
270
|
*/
|
|
271
271
|
enum FramebufferError {
|
|
272
|
-
FRAMEBUFFER_ERROR_ALLOCATE,
|
|
272
|
+
FRAMEBUFFER_ERROR_ALLOCATE = 0,
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
|
|
@@ -281,11 +281,11 @@ export namespace Cogl {
|
|
|
281
281
|
* @gir-type Enum
|
|
282
282
|
*/
|
|
283
283
|
enum GraphicsResetStatus {
|
|
284
|
-
NO_ERROR,
|
|
285
|
-
GUILTY_CONTEXT_RESET,
|
|
286
|
-
INNOCENT_CONTEXT_RESET,
|
|
287
|
-
UNKNOWN_CONTEXT_RESET,
|
|
288
|
-
PURGED_CONTEXT_RESET,
|
|
284
|
+
NO_ERROR = 0,
|
|
285
|
+
GUILTY_CONTEXT_RESET = 1,
|
|
286
|
+
INNOCENT_CONTEXT_RESET = 2,
|
|
287
|
+
UNKNOWN_CONTEXT_RESET = 3,
|
|
288
|
+
PURGED_CONTEXT_RESET = 4,
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
|
|
@@ -305,15 +305,15 @@ export namespace Cogl {
|
|
|
305
305
|
/**
|
|
306
306
|
* Your indices are unsigned bytes
|
|
307
307
|
*/
|
|
308
|
-
BYTE,
|
|
308
|
+
BYTE = 0,
|
|
309
309
|
/**
|
|
310
310
|
* Your indices are unsigned shorts
|
|
311
311
|
*/
|
|
312
|
-
SHORT,
|
|
312
|
+
SHORT = 1,
|
|
313
313
|
/**
|
|
314
314
|
* Your indices are unsigned ints
|
|
315
315
|
*/
|
|
316
|
-
INT,
|
|
316
|
+
INT = 2,
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
|
|
@@ -328,41 +328,41 @@ export namespace Cogl {
|
|
|
328
328
|
/**
|
|
329
329
|
* Never let the fragment through.
|
|
330
330
|
*/
|
|
331
|
-
NEVER,
|
|
331
|
+
NEVER = 512,
|
|
332
332
|
/**
|
|
333
333
|
* Let the fragment through if the incoming
|
|
334
334
|
* alpha value is less than the reference alpha value
|
|
335
335
|
*/
|
|
336
|
-
LESS,
|
|
336
|
+
LESS = 513,
|
|
337
337
|
/**
|
|
338
338
|
* Let the fragment through if the incoming
|
|
339
339
|
* alpha value equals the reference alpha value
|
|
340
340
|
*/
|
|
341
|
-
EQUAL,
|
|
341
|
+
EQUAL = 514,
|
|
342
342
|
/**
|
|
343
343
|
* Let the fragment through if the incoming
|
|
344
344
|
* alpha value is less than or equal to the reference alpha value
|
|
345
345
|
*/
|
|
346
|
-
LEQUAL,
|
|
346
|
+
LEQUAL = 515,
|
|
347
347
|
/**
|
|
348
348
|
* Let the fragment through if the incoming
|
|
349
349
|
* alpha value is greater than the reference alpha value
|
|
350
350
|
*/
|
|
351
|
-
GREATER,
|
|
351
|
+
GREATER = 516,
|
|
352
352
|
/**
|
|
353
353
|
* Let the fragment through if the incoming
|
|
354
354
|
* alpha value does not equal the reference alpha value
|
|
355
355
|
*/
|
|
356
|
-
NOTEQUAL,
|
|
356
|
+
NOTEQUAL = 517,
|
|
357
357
|
/**
|
|
358
358
|
* Let the fragment through if the incoming
|
|
359
359
|
* alpha value is greater than or equal to the reference alpha value.
|
|
360
360
|
*/
|
|
361
|
-
GEQUAL,
|
|
361
|
+
GEQUAL = 518,
|
|
362
362
|
/**
|
|
363
363
|
* Always let the fragment through.
|
|
364
364
|
*/
|
|
365
|
-
ALWAYS,
|
|
365
|
+
ALWAYS = 519,
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
|
|
@@ -379,38 +379,38 @@ export namespace Cogl {
|
|
|
379
379
|
* Measuring in manhatten distance from the,
|
|
380
380
|
* current pixel center, use the nearest texture texel
|
|
381
381
|
*/
|
|
382
|
-
NEAREST,
|
|
382
|
+
NEAREST = 9728,
|
|
383
383
|
/**
|
|
384
384
|
* Use the weighted average of the 4 texels
|
|
385
385
|
* nearest the current pixel center
|
|
386
386
|
*/
|
|
387
|
-
LINEAR,
|
|
387
|
+
LINEAR = 9729,
|
|
388
388
|
/**
|
|
389
389
|
* Select the mimap level whose
|
|
390
390
|
* texel size most closely matches the current pixel, and use the
|
|
391
391
|
* {@link Cogl.MaterialFilter.NEAREST} criterion
|
|
392
392
|
*/
|
|
393
|
-
NEAREST_MIPMAP_NEAREST,
|
|
393
|
+
NEAREST_MIPMAP_NEAREST = 9984,
|
|
394
394
|
/**
|
|
395
395
|
* Select the mimap level whose
|
|
396
396
|
* texel size most closely matches the current pixel, and use the
|
|
397
397
|
* {@link Cogl.MaterialFilter.LINEAR} criterion
|
|
398
398
|
*/
|
|
399
|
-
LINEAR_MIPMAP_NEAREST,
|
|
399
|
+
LINEAR_MIPMAP_NEAREST = 9985,
|
|
400
400
|
/**
|
|
401
401
|
* Select the two mimap levels
|
|
402
402
|
* whose texel size most closely matches the current pixel, use
|
|
403
403
|
* the {@link Cogl.MaterialFilter.NEAREST} criterion on each one and take
|
|
404
404
|
* their weighted average
|
|
405
405
|
*/
|
|
406
|
-
NEAREST_MIPMAP_LINEAR,
|
|
406
|
+
NEAREST_MIPMAP_LINEAR = 9986,
|
|
407
407
|
/**
|
|
408
408
|
* Select the two mimap levels
|
|
409
409
|
* whose texel size most closely matches the current pixel, use
|
|
410
410
|
* the {@link Cogl.MaterialFilter.LINEAR} criterion on each one and take
|
|
411
411
|
* their weighted average
|
|
412
412
|
*/
|
|
413
|
-
LINEAR_MIPMAP_LINEAR,
|
|
413
|
+
LINEAR_MIPMAP_LINEAR = 9987,
|
|
414
414
|
}
|
|
415
415
|
|
|
416
416
|
|
|
@@ -431,14 +431,14 @@ export namespace Cogl {
|
|
|
431
431
|
* The texture will be repeated. This
|
|
432
432
|
* is useful for example to draw a tiled background.
|
|
433
433
|
*/
|
|
434
|
-
REPEAT,
|
|
434
|
+
REPEAT = 10497,
|
|
435
435
|
/**
|
|
436
436
|
* The coordinates outside the
|
|
437
437
|
* range 0→1 will sample copies of the edge pixels of the
|
|
438
438
|
* texture. This is useful to avoid artifacts if only one copy of
|
|
439
439
|
* the texture is being rendered.
|
|
440
440
|
*/
|
|
441
|
-
CLAMP_TO_EDGE,
|
|
441
|
+
CLAMP_TO_EDGE = 33071,
|
|
442
442
|
/**
|
|
443
443
|
* Cogl will try to automatically
|
|
444
444
|
* decide which of the above two to use. For `cogl_rectangle()`, it
|
|
@@ -449,7 +449,7 @@ export namespace Cogl {
|
|
|
449
449
|
* layers that have point sprite coordinate generation enabled. This
|
|
450
450
|
* is the default value.
|
|
451
451
|
*/
|
|
452
|
-
AUTOMATIC,
|
|
452
|
+
AUTOMATIC = 519,
|
|
453
453
|
}
|
|
454
454
|
|
|
455
455
|
|
|
@@ -464,41 +464,41 @@ export namespace Cogl {
|
|
|
464
464
|
/**
|
|
465
465
|
* Never let the fragment through.
|
|
466
466
|
*/
|
|
467
|
-
NEVER,
|
|
467
|
+
NEVER = 512,
|
|
468
468
|
/**
|
|
469
469
|
* Let the fragment through if the incoming
|
|
470
470
|
* alpha value is less than the reference alpha value
|
|
471
471
|
*/
|
|
472
|
-
LESS,
|
|
472
|
+
LESS = 513,
|
|
473
473
|
/**
|
|
474
474
|
* Let the fragment through if the incoming
|
|
475
475
|
* alpha value equals the reference alpha value
|
|
476
476
|
*/
|
|
477
|
-
EQUAL,
|
|
477
|
+
EQUAL = 514,
|
|
478
478
|
/**
|
|
479
479
|
* Let the fragment through if the incoming
|
|
480
480
|
* alpha value is less than or equal to the reference alpha value
|
|
481
481
|
*/
|
|
482
|
-
LEQUAL,
|
|
482
|
+
LEQUAL = 515,
|
|
483
483
|
/**
|
|
484
484
|
* Let the fragment through if the incoming
|
|
485
485
|
* alpha value is greater than the reference alpha value
|
|
486
486
|
*/
|
|
487
|
-
GREATER,
|
|
487
|
+
GREATER = 516,
|
|
488
488
|
/**
|
|
489
489
|
* Let the fragment through if the incoming
|
|
490
490
|
* alpha value does not equal the reference alpha value
|
|
491
491
|
*/
|
|
492
|
-
NOTEQUAL,
|
|
492
|
+
NOTEQUAL = 517,
|
|
493
493
|
/**
|
|
494
494
|
* Let the fragment through if the incoming
|
|
495
495
|
* alpha value is greater than or equal to the reference alpha value.
|
|
496
496
|
*/
|
|
497
|
-
GEQUAL,
|
|
497
|
+
GEQUAL = 518,
|
|
498
498
|
/**
|
|
499
499
|
* Always let the fragment through.
|
|
500
500
|
*/
|
|
501
|
-
ALWAYS,
|
|
501
|
+
ALWAYS = 519,
|
|
502
502
|
}
|
|
503
503
|
|
|
504
504
|
|
|
@@ -512,19 +512,19 @@ export namespace Cogl {
|
|
|
512
512
|
* Neither face will be
|
|
513
513
|
* culled. This is the default.
|
|
514
514
|
*/
|
|
515
|
-
NONE,
|
|
515
|
+
NONE = 0,
|
|
516
516
|
/**
|
|
517
517
|
* Front faces will be culled.
|
|
518
518
|
*/
|
|
519
|
-
FRONT,
|
|
519
|
+
FRONT = 1,
|
|
520
520
|
/**
|
|
521
521
|
* Back faces will be culled.
|
|
522
522
|
*/
|
|
523
|
-
BACK,
|
|
523
|
+
BACK = 2,
|
|
524
524
|
/**
|
|
525
525
|
* All faces will be culled.
|
|
526
526
|
*/
|
|
527
|
-
BOTH,
|
|
527
|
+
BOTH = 3,
|
|
528
528
|
}
|
|
529
529
|
|
|
530
530
|
|
|
@@ -541,38 +541,38 @@ export namespace Cogl {
|
|
|
541
541
|
* Measuring in manhatten distance from the,
|
|
542
542
|
* current pixel center, use the nearest texture texel
|
|
543
543
|
*/
|
|
544
|
-
NEAREST,
|
|
544
|
+
NEAREST = 9728,
|
|
545
545
|
/**
|
|
546
546
|
* Use the weighted average of the 4 texels
|
|
547
547
|
* nearest the current pixel center
|
|
548
548
|
*/
|
|
549
|
-
LINEAR,
|
|
549
|
+
LINEAR = 9729,
|
|
550
550
|
/**
|
|
551
551
|
* Select the mimap level whose
|
|
552
552
|
* texel size most closely matches the current pixel, and use the
|
|
553
553
|
* {@link Cogl.PipelineFilter.NEAREST} criterion
|
|
554
554
|
*/
|
|
555
|
-
NEAREST_MIPMAP_NEAREST,
|
|
555
|
+
NEAREST_MIPMAP_NEAREST = 9984,
|
|
556
556
|
/**
|
|
557
557
|
* Select the mimap level whose
|
|
558
558
|
* texel size most closely matches the current pixel, and use the
|
|
559
559
|
* {@link Cogl.PipelineFilter.LINEAR} criterion
|
|
560
560
|
*/
|
|
561
|
-
LINEAR_MIPMAP_NEAREST,
|
|
561
|
+
LINEAR_MIPMAP_NEAREST = 9985,
|
|
562
562
|
/**
|
|
563
563
|
* Select the two mimap levels
|
|
564
564
|
* whose texel size most closely matches the current pixel, use
|
|
565
565
|
* the {@link Cogl.PipelineFilter.NEAREST} criterion on each one and take
|
|
566
566
|
* their weighted average
|
|
567
567
|
*/
|
|
568
|
-
NEAREST_MIPMAP_LINEAR,
|
|
568
|
+
NEAREST_MIPMAP_LINEAR = 9986,
|
|
569
569
|
/**
|
|
570
570
|
* Select the two mimap levels
|
|
571
571
|
* whose texel size most closely matches the current pixel, use
|
|
572
572
|
* the {@link Cogl.PipelineFilter.LINEAR} criterion on each one and take
|
|
573
573
|
* their weighted average
|
|
574
574
|
*/
|
|
575
|
-
LINEAR_MIPMAP_LINEAR,
|
|
575
|
+
LINEAR_MIPMAP_LINEAR = 9987,
|
|
576
576
|
}
|
|
577
577
|
|
|
578
578
|
|
|
@@ -593,15 +593,15 @@ export namespace Cogl {
|
|
|
593
593
|
* The texture will be repeated. This
|
|
594
594
|
* is useful for example to draw a tiled background.
|
|
595
595
|
*/
|
|
596
|
-
REPEAT,
|
|
597
|
-
MIRRORED_REPEAT,
|
|
596
|
+
REPEAT = 10497,
|
|
597
|
+
MIRRORED_REPEAT = 33648,
|
|
598
598
|
/**
|
|
599
599
|
* The coordinates outside the
|
|
600
600
|
* range 0→1 will sample copies of the edge pixels of the
|
|
601
601
|
* texture. This is useful to avoid artifacts if only one copy of
|
|
602
602
|
* the texture is being rendered.
|
|
603
603
|
*/
|
|
604
|
-
CLAMP_TO_EDGE,
|
|
604
|
+
CLAMP_TO_EDGE = 33071,
|
|
605
605
|
/**
|
|
606
606
|
* Cogl will try to automatically
|
|
607
607
|
* decide which of the above two to use. For `cogl_rectangle()`, it
|
|
@@ -612,7 +612,7 @@ export namespace Cogl {
|
|
|
612
612
|
* layers that have point sprite coordinate generation enabled. This
|
|
613
613
|
* is the default value.
|
|
614
614
|
*/
|
|
615
|
-
AUTOMATIC,
|
|
615
|
+
AUTOMATIC = 519,
|
|
616
616
|
}
|
|
617
617
|
|
|
618
618
|
|
|
@@ -620,8 +620,8 @@ export namespace Cogl {
|
|
|
620
620
|
* @gir-type Enum
|
|
621
621
|
*/
|
|
622
622
|
enum RendererError {
|
|
623
|
-
XLIB_DISPLAY_OPEN,
|
|
624
|
-
BAD_CONSTRAINT,
|
|
623
|
+
XLIB_DISPLAY_OPEN = 0,
|
|
624
|
+
BAD_CONSTRAINT = 1,
|
|
625
625
|
}
|
|
626
626
|
|
|
627
627
|
|
|
@@ -634,11 +634,11 @@ export namespace Cogl {
|
|
|
634
634
|
/**
|
|
635
635
|
* A program for proccessing vertices
|
|
636
636
|
*/
|
|
637
|
-
VERTEX,
|
|
637
|
+
VERTEX = 0,
|
|
638
638
|
/**
|
|
639
639
|
* A program for processing fragments
|
|
640
640
|
*/
|
|
641
|
-
FRAGMENT,
|
|
641
|
+
FRAGMENT = 1,
|
|
642
642
|
}
|
|
643
643
|
|
|
644
644
|
|
|
@@ -651,15 +651,15 @@ export namespace Cogl {
|
|
|
651
651
|
/**
|
|
652
652
|
* draw to both stereo buffers
|
|
653
653
|
*/
|
|
654
|
-
BOTH,
|
|
654
|
+
BOTH = 0,
|
|
655
655
|
/**
|
|
656
656
|
* draw only to the left stereo buffer
|
|
657
657
|
*/
|
|
658
|
-
LEFT,
|
|
658
|
+
LEFT = 1,
|
|
659
659
|
/**
|
|
660
660
|
* draw only to the left stereo buffer
|
|
661
661
|
*/
|
|
662
|
-
RIGHT,
|
|
662
|
+
RIGHT = 2,
|
|
663
663
|
}
|
|
664
664
|
|
|
665
665
|
|
|
@@ -689,12 +689,12 @@ export namespace Cogl {
|
|
|
689
689
|
* You tried to use a feature or
|
|
690
690
|
* configuration not currently available.
|
|
691
691
|
*/
|
|
692
|
-
UNSUPPORTED,
|
|
692
|
+
UNSUPPORTED = 0,
|
|
693
693
|
/**
|
|
694
694
|
* You tried to allocate a resource
|
|
695
695
|
* such as a texture and there wasn't enough memory.
|
|
696
696
|
*/
|
|
697
|
-
NO_MEMORY,
|
|
697
|
+
NO_MEMORY = 1,
|
|
698
698
|
}
|
|
699
699
|
|
|
700
700
|
|
|
@@ -707,25 +707,25 @@ export namespace Cogl {
|
|
|
707
707
|
/**
|
|
708
708
|
* Only the alpha component
|
|
709
709
|
*/
|
|
710
|
-
A,
|
|
710
|
+
A = 1,
|
|
711
711
|
/**
|
|
712
712
|
* Red and green components. Note that
|
|
713
713
|
* this can only be used if the {@link Cogl.FeatureID.OGL_FEATURE_ID_TEXTURE_RG} feature
|
|
714
714
|
* is advertised.
|
|
715
715
|
*/
|
|
716
|
-
RG,
|
|
716
|
+
RG = 2,
|
|
717
717
|
/**
|
|
718
718
|
* Red, green and blue components
|
|
719
719
|
*/
|
|
720
|
-
RGB,
|
|
720
|
+
RGB = 3,
|
|
721
721
|
/**
|
|
722
722
|
* Red, green, blue and alpha components
|
|
723
723
|
*/
|
|
724
|
-
RGBA,
|
|
724
|
+
RGBA = 4,
|
|
725
725
|
/**
|
|
726
726
|
* Only a depth component
|
|
727
727
|
*/
|
|
728
|
-
DEPTH,
|
|
728
|
+
DEPTH = 5,
|
|
729
729
|
}
|
|
730
730
|
|
|
731
731
|
|
|
@@ -738,17 +738,17 @@ export namespace Cogl {
|
|
|
738
738
|
/**
|
|
739
739
|
* Unsupported size
|
|
740
740
|
*/
|
|
741
|
-
SIZE,
|
|
741
|
+
SIZE = 0,
|
|
742
742
|
/**
|
|
743
743
|
* Unsupported format
|
|
744
744
|
*/
|
|
745
|
-
FORMAT,
|
|
746
|
-
BAD_PARAMETER,
|
|
745
|
+
FORMAT = 1,
|
|
746
|
+
BAD_PARAMETER = 2,
|
|
747
747
|
/**
|
|
748
748
|
* A primitive texture type that is
|
|
749
749
|
* unsupported by the driver was used
|
|
750
750
|
*/
|
|
751
|
-
TYPE,
|
|
751
|
+
TYPE = 3,
|
|
752
752
|
}
|
|
753
753
|
|
|
754
754
|
|
|
@@ -762,35 +762,35 @@ export namespace Cogl {
|
|
|
762
762
|
* FIXME, equivalent to
|
|
763
763
|
* <constant>GL_POINTS</constant>
|
|
764
764
|
*/
|
|
765
|
-
POINTS,
|
|
765
|
+
POINTS = 0,
|
|
766
766
|
/**
|
|
767
767
|
* FIXME, equivalent to <constant>GL_LINES</constant>
|
|
768
768
|
*/
|
|
769
|
-
LINES,
|
|
769
|
+
LINES = 1,
|
|
770
770
|
/**
|
|
771
771
|
* FIXME, equivalent to
|
|
772
772
|
* <constant>GL_LINE_LOOP</constant>
|
|
773
773
|
*/
|
|
774
|
-
LINE_LOOP,
|
|
774
|
+
LINE_LOOP = 2,
|
|
775
775
|
/**
|
|
776
776
|
* FIXME, equivalent to
|
|
777
777
|
* <constant>GL_LINE_STRIP</constant>
|
|
778
778
|
*/
|
|
779
|
-
LINE_STRIP,
|
|
779
|
+
LINE_STRIP = 3,
|
|
780
780
|
/**
|
|
781
781
|
* FIXME, equivalent to
|
|
782
782
|
* <constant>GL_TRIANGLES</constant>
|
|
783
783
|
*/
|
|
784
|
-
TRIANGLES,
|
|
784
|
+
TRIANGLES = 4,
|
|
785
785
|
/**
|
|
786
786
|
* FIXME, equivalent to
|
|
787
787
|
* <constant>GL_TRIANGLE_STRIP</constant>
|
|
788
788
|
*/
|
|
789
|
-
TRIANGLE_STRIP,
|
|
789
|
+
TRIANGLE_STRIP = 5,
|
|
790
790
|
/**
|
|
791
791
|
* FIXME, equivalent to <constant>GL_TRIANGLE_FAN</constant>
|
|
792
792
|
*/
|
|
793
|
-
TRIANGLE_FAN,
|
|
793
|
+
TRIANGLE_FAN = 6,
|
|
794
794
|
}
|
|
795
795
|
|
|
796
796
|
|
|
@@ -804,11 +804,11 @@ export namespace Cogl {
|
|
|
804
804
|
/**
|
|
805
805
|
* Vertices are in a clockwise order
|
|
806
806
|
*/
|
|
807
|
-
CLOCKWISE,
|
|
807
|
+
CLOCKWISE = 0,
|
|
808
808
|
/**
|
|
809
809
|
* Vertices are in a counter-clockwise order
|
|
810
810
|
*/
|
|
811
|
-
COUNTER_CLOCKWISE,
|
|
811
|
+
COUNTER_CLOCKWISE = 1,
|
|
812
812
|
}
|
|
813
813
|
|
|
814
814
|
|
|
@@ -816,39 +816,61 @@ export namespace Cogl {
|
|
|
816
816
|
* @gir-type Enum
|
|
817
817
|
*/
|
|
818
818
|
enum WinsysFeature {
|
|
819
|
-
MULTIPLE_ONSCREEN,
|
|
820
|
-
SWAP_THROTTLE,
|
|
821
|
-
VBLANK_COUNTER,
|
|
822
|
-
VBLANK_WAIT,
|
|
823
|
-
TEXTURE_FROM_PIXMAP,
|
|
824
|
-
SWAP_BUFFERS_EVENT,
|
|
825
|
-
SWAP_REGION,
|
|
826
|
-
SWAP_REGION_THROTTLE,
|
|
827
|
-
SWAP_REGION_SYNCHRONIZED,
|
|
828
|
-
BUFFER_AGE,
|
|
829
|
-
SYNC_AND_COMPLETE_EVENT,
|
|
830
|
-
N_FEATURES,
|
|
819
|
+
MULTIPLE_ONSCREEN = 0,
|
|
820
|
+
SWAP_THROTTLE = 1,
|
|
821
|
+
VBLANK_COUNTER = 2,
|
|
822
|
+
VBLANK_WAIT = 3,
|
|
823
|
+
TEXTURE_FROM_PIXMAP = 4,
|
|
824
|
+
SWAP_BUFFERS_EVENT = 5,
|
|
825
|
+
SWAP_REGION = 6,
|
|
826
|
+
SWAP_REGION_THROTTLE = 7,
|
|
827
|
+
SWAP_REGION_SYNCHRONIZED = 8,
|
|
828
|
+
BUFFER_AGE = 9,
|
|
829
|
+
SYNC_AND_COMPLETE_EVENT = 10,
|
|
830
|
+
N_FEATURES = 11,
|
|
831
831
|
}
|
|
832
832
|
|
|
833
833
|
|
|
834
|
+
/**
|
|
835
|
+
* @default 64
|
|
836
|
+
*/
|
|
834
837
|
const AFIRST_BIT: number;
|
|
835
838
|
|
|
839
|
+
/**
|
|
840
|
+
* @default 16
|
|
841
|
+
*/
|
|
836
842
|
const A_BIT: number;
|
|
837
843
|
|
|
844
|
+
/**
|
|
845
|
+
* @default 32
|
|
846
|
+
*/
|
|
838
847
|
const BGR_BIT: number;
|
|
839
848
|
|
|
849
|
+
/**
|
|
850
|
+
* @default 256
|
|
851
|
+
*/
|
|
840
852
|
const DEPTH_BIT: number;
|
|
841
853
|
|
|
842
854
|
/**
|
|
843
855
|
* The maximum number of planes of a pixel format (see also
|
|
844
856
|
* `cogl_pixel_format_get_planes()`).
|
|
857
|
+
* @default 4
|
|
845
858
|
*/
|
|
846
859
|
const PIXEL_FORMAT_MAX_PLANES: number;
|
|
847
860
|
|
|
861
|
+
/**
|
|
862
|
+
* @default 128
|
|
863
|
+
*/
|
|
848
864
|
const PREMULT_BIT: number;
|
|
849
865
|
|
|
866
|
+
/**
|
|
867
|
+
* @default 512
|
|
868
|
+
*/
|
|
850
869
|
const STENCIL_BIT: number;
|
|
851
870
|
|
|
871
|
+
/**
|
|
872
|
+
* @default 127
|
|
873
|
+
*/
|
|
852
874
|
const TEXTURE_MAX_WASTE: number;
|
|
853
875
|
|
|
854
876
|
function blend_string_error_quark(): number;
|
|
@@ -901,6 +923,7 @@ export namespace Cogl {
|
|
|
901
923
|
* @param dst_y Destination y position
|
|
902
924
|
* @param width Width of region to copy
|
|
903
925
|
* @param height Height of region to copy
|
|
926
|
+
* @throws GLib.Error
|
|
904
927
|
*/
|
|
905
928
|
function blit_framebuffer(src: Framebuffer, dest: Framebuffer, src_x: number, src_y: number, dst_x: number, dst_y: number, width: number, height: number): boolean;
|
|
906
929
|
|
|
@@ -1397,6 +1420,7 @@ export namespace Cogl {
|
|
|
1397
1420
|
* @returns A newly created {@link Cogl.Texture} or `null` on failure
|
|
1398
1421
|
* @since 0.8
|
|
1399
1422
|
* @deprecated since 1.18: Use specific constructors such as `cogl_texture_2d_new_from_file()`
|
|
1423
|
+
* @throws GLib.Error
|
|
1400
1424
|
*/
|
|
1401
1425
|
function texture_new_from_file(filename: string, flags: TextureFlags, internal_format: PixelFormat): Texture;
|
|
1402
1426
|
|
|
@@ -1483,15 +1507,15 @@ export namespace Cogl {
|
|
|
1483
1507
|
/**
|
|
1484
1508
|
* Selects the primary color buffer
|
|
1485
1509
|
*/
|
|
1486
|
-
COLOR,
|
|
1510
|
+
COLOR = 1,
|
|
1487
1511
|
/**
|
|
1488
1512
|
* Selects the depth buffer
|
|
1489
1513
|
*/
|
|
1490
|
-
DEPTH,
|
|
1514
|
+
DEPTH = 2,
|
|
1491
1515
|
/**
|
|
1492
1516
|
* Selects the stencil buffer
|
|
1493
1517
|
*/
|
|
1494
|
-
STENCIL,
|
|
1518
|
+
STENCIL = 4,
|
|
1495
1519
|
}
|
|
1496
1520
|
|
|
1497
1521
|
|
|
@@ -1504,11 +1528,11 @@ export namespace Cogl {
|
|
|
1504
1528
|
/**
|
|
1505
1529
|
* FIXME
|
|
1506
1530
|
*/
|
|
1507
|
-
WINDOW_BUFFER,
|
|
1531
|
+
WINDOW_BUFFER = 2,
|
|
1508
1532
|
/**
|
|
1509
1533
|
* FIXME
|
|
1510
1534
|
*/
|
|
1511
|
-
OFFSCREEN_BUFFER,
|
|
1535
|
+
OFFSCREEN_BUFFER = 4,
|
|
1512
1536
|
}
|
|
1513
1537
|
|
|
1514
1538
|
|
|
@@ -1516,8 +1540,8 @@ export namespace Cogl {
|
|
|
1516
1540
|
* @gir-type Flags
|
|
1517
1541
|
*/
|
|
1518
1542
|
enum EglImageFlags {
|
|
1519
|
-
NONE,
|
|
1520
|
-
NO_GET_DATA,
|
|
1543
|
+
NONE = 0,
|
|
1544
|
+
NO_GET_DATA = 1,
|
|
1521
1545
|
}
|
|
1522
1546
|
|
|
1523
1547
|
|
|
@@ -1547,120 +1571,120 @@ export namespace Cogl {
|
|
|
1547
1571
|
/**
|
|
1548
1572
|
* Any format
|
|
1549
1573
|
*/
|
|
1550
|
-
ANY,
|
|
1574
|
+
ANY = 0,
|
|
1551
1575
|
/**
|
|
1552
1576
|
* 8 bits alpha mask
|
|
1553
1577
|
*/
|
|
1554
|
-
A_8,
|
|
1578
|
+
A_8 = 17,
|
|
1555
1579
|
/**
|
|
1556
1580
|
* RGB, 16 bits
|
|
1557
1581
|
*/
|
|
1558
|
-
RGB_565,
|
|
1582
|
+
RGB_565 = 4,
|
|
1559
1583
|
/**
|
|
1560
1584
|
* RGBA, 16 bits
|
|
1561
1585
|
*/
|
|
1562
|
-
RGBA_4444,
|
|
1586
|
+
RGBA_4444 = 21,
|
|
1563
1587
|
/**
|
|
1564
1588
|
* RGBA, 16 bits
|
|
1565
1589
|
*/
|
|
1566
|
-
RGBA_5551,
|
|
1590
|
+
RGBA_5551 = 22,
|
|
1567
1591
|
/**
|
|
1568
1592
|
* Not currently supported
|
|
1569
1593
|
*/
|
|
1570
|
-
YUV,
|
|
1594
|
+
YUV = 7,
|
|
1571
1595
|
/**
|
|
1572
1596
|
* Single luminance component
|
|
1573
1597
|
*/
|
|
1574
|
-
G_8,
|
|
1598
|
+
G_8 = 8,
|
|
1575
1599
|
/**
|
|
1576
1600
|
* RG, 16 bits. Note that red-green textures
|
|
1577
1601
|
* are only available if {@link Cogl.FeatureID.OGL_FEATURE_ID_TEXTURE_RG} is advertised.
|
|
1578
1602
|
* See `cogl_texture_set_components()` for details.
|
|
1579
1603
|
*/
|
|
1580
|
-
RG_88,
|
|
1604
|
+
RG_88 = 9,
|
|
1581
1605
|
/**
|
|
1582
1606
|
* RGB, 24 bits
|
|
1583
1607
|
*/
|
|
1584
|
-
RGB_888,
|
|
1608
|
+
RGB_888 = 2,
|
|
1585
1609
|
/**
|
|
1586
1610
|
* BGR, 24 bits
|
|
1587
1611
|
*/
|
|
1588
|
-
BGR_888,
|
|
1612
|
+
BGR_888 = 34,
|
|
1589
1613
|
/**
|
|
1590
1614
|
* RGBA, 32 bits
|
|
1591
1615
|
*/
|
|
1592
|
-
RGBA_8888,
|
|
1616
|
+
RGBA_8888 = 19,
|
|
1593
1617
|
/**
|
|
1594
1618
|
* BGRA, 32 bits
|
|
1595
1619
|
*/
|
|
1596
|
-
BGRA_8888,
|
|
1620
|
+
BGRA_8888 = 51,
|
|
1597
1621
|
/**
|
|
1598
1622
|
* ARGB, 32 bits
|
|
1599
1623
|
*/
|
|
1600
|
-
ARGB_8888,
|
|
1624
|
+
ARGB_8888 = 83,
|
|
1601
1625
|
/**
|
|
1602
1626
|
* ABGR, 32 bits
|
|
1603
1627
|
*/
|
|
1604
|
-
ABGR_8888,
|
|
1628
|
+
ABGR_8888 = 115,
|
|
1605
1629
|
/**
|
|
1606
1630
|
* RGBA, 32 bits, 10 bpc
|
|
1607
1631
|
*/
|
|
1608
|
-
RGBA_1010102,
|
|
1632
|
+
RGBA_1010102 = 29,
|
|
1609
1633
|
/**
|
|
1610
1634
|
* BGRA, 32 bits, 10 bpc
|
|
1611
1635
|
*/
|
|
1612
|
-
BGRA_1010102,
|
|
1636
|
+
BGRA_1010102 = 61,
|
|
1613
1637
|
/**
|
|
1614
1638
|
* ARGB, 32 bits, 10 bpc
|
|
1615
1639
|
*/
|
|
1616
|
-
ARGB_2101010,
|
|
1640
|
+
ARGB_2101010 = 93,
|
|
1617
1641
|
/**
|
|
1618
1642
|
* ABGR, 32 bits, 10 bpc
|
|
1619
1643
|
*/
|
|
1620
|
-
ABGR_2101010,
|
|
1644
|
+
ABGR_2101010 = 125,
|
|
1621
1645
|
/**
|
|
1622
1646
|
* Premultiplied RGBA, 32 bits
|
|
1623
1647
|
*/
|
|
1624
|
-
RGBA_8888_PRE,
|
|
1648
|
+
RGBA_8888_PRE = 147,
|
|
1625
1649
|
/**
|
|
1626
1650
|
* Premultiplied BGRA, 32 bits
|
|
1627
1651
|
*/
|
|
1628
|
-
BGRA_8888_PRE,
|
|
1652
|
+
BGRA_8888_PRE = 179,
|
|
1629
1653
|
/**
|
|
1630
1654
|
* Premultiplied ARGB, 32 bits
|
|
1631
1655
|
*/
|
|
1632
|
-
ARGB_8888_PRE,
|
|
1656
|
+
ARGB_8888_PRE = 211,
|
|
1633
1657
|
/**
|
|
1634
1658
|
* Premultiplied ABGR, 32 bits
|
|
1635
1659
|
*/
|
|
1636
|
-
ABGR_8888_PRE,
|
|
1660
|
+
ABGR_8888_PRE = 243,
|
|
1637
1661
|
/**
|
|
1638
1662
|
* Premultiplied RGBA, 16 bits
|
|
1639
1663
|
*/
|
|
1640
|
-
RGBA_4444_PRE,
|
|
1664
|
+
RGBA_4444_PRE = 149,
|
|
1641
1665
|
/**
|
|
1642
1666
|
* Premultiplied RGBA, 16 bits
|
|
1643
1667
|
*/
|
|
1644
|
-
RGBA_5551_PRE,
|
|
1668
|
+
RGBA_5551_PRE = 150,
|
|
1645
1669
|
/**
|
|
1646
1670
|
* Premultiplied RGBA, 32 bits, 10 bpc
|
|
1647
1671
|
*/
|
|
1648
|
-
RGBA_1010102_PRE,
|
|
1672
|
+
RGBA_1010102_PRE = 157,
|
|
1649
1673
|
/**
|
|
1650
1674
|
* Premultiplied BGRA, 32 bits, 10 bpc
|
|
1651
1675
|
*/
|
|
1652
|
-
BGRA_1010102_PRE,
|
|
1676
|
+
BGRA_1010102_PRE = 189,
|
|
1653
1677
|
/**
|
|
1654
1678
|
* Premultiplied ARGB, 32 bits, 10 bpc
|
|
1655
1679
|
*/
|
|
1656
|
-
ARGB_2101010_PRE,
|
|
1680
|
+
ARGB_2101010_PRE = 221,
|
|
1657
1681
|
/**
|
|
1658
1682
|
* Premultiplied ABGR, 32 bits, 10 bpc
|
|
1659
1683
|
*/
|
|
1660
|
-
ABGR_2101010_PRE,
|
|
1661
|
-
DEPTH_16,
|
|
1662
|
-
DEPTH_32,
|
|
1663
|
-
DEPTH_24_STENCIL_8,
|
|
1684
|
+
ABGR_2101010_PRE = 253,
|
|
1685
|
+
DEPTH_16 = 265,
|
|
1686
|
+
DEPTH_32 = 259,
|
|
1687
|
+
DEPTH_24_STENCIL_8 = 771,
|
|
1664
1688
|
}
|
|
1665
1689
|
|
|
1666
1690
|
|
|
@@ -1673,7 +1697,7 @@ export namespace Cogl {
|
|
|
1673
1697
|
/**
|
|
1674
1698
|
* Read from the color buffer
|
|
1675
1699
|
*/
|
|
1676
|
-
READ_PIXELS_COLOR_BUFFER,
|
|
1700
|
+
READ_PIXELS_COLOR_BUFFER = 1,
|
|
1677
1701
|
}
|
|
1678
1702
|
|
|
1679
1703
|
|
|
@@ -1686,7 +1710,7 @@ export namespace Cogl {
|
|
|
1686
1710
|
/**
|
|
1687
1711
|
* No flags specified
|
|
1688
1712
|
*/
|
|
1689
|
-
NONE,
|
|
1713
|
+
NONE = 0,
|
|
1690
1714
|
/**
|
|
1691
1715
|
* Disables the automatic generation of
|
|
1692
1716
|
* the mipmap pyramid from the base level image whenever it is
|
|
@@ -1694,16 +1718,16 @@ export namespace Cogl {
|
|
|
1694
1718
|
* rendered with a mipmap filter so it should be free to leave out
|
|
1695
1719
|
* this flag when using other filtering modes
|
|
1696
1720
|
*/
|
|
1697
|
-
NO_AUTO_MIPMAP,
|
|
1721
|
+
NO_AUTO_MIPMAP = 1,
|
|
1698
1722
|
/**
|
|
1699
1723
|
* Disables the slicing of the texture
|
|
1700
1724
|
*/
|
|
1701
|
-
NO_SLICING,
|
|
1725
|
+
NO_SLICING = 2,
|
|
1702
1726
|
/**
|
|
1703
1727
|
* Disables the insertion of the texture inside
|
|
1704
1728
|
* the texture atlas used by Cogl
|
|
1705
1729
|
*/
|
|
1706
|
-
NO_ATLAS,
|
|
1730
|
+
NO_ATLAS = 4,
|
|
1707
1731
|
}
|
|
1708
1732
|
|
|
1709
1733
|
|
|
@@ -1876,6 +1900,7 @@ export namespace Cogl {
|
|
|
1876
1900
|
* automatic allocation.</note>
|
|
1877
1901
|
* @returns `true` if there were no error allocating the framebuffer, else `false`.
|
|
1878
1902
|
* @since 1.8
|
|
1903
|
+
* @throws GLib.Error
|
|
1879
1904
|
*/
|
|
1880
1905
|
allocate(): boolean;
|
|
1881
1906
|
|
|
@@ -3023,6 +3048,7 @@ export namespace Cogl {
|
|
|
3023
3048
|
* automatic allocation.</note>
|
|
3024
3049
|
* @returns `true` if there were no error allocating the framebuffer, else `false`.
|
|
3025
3050
|
* @since 1.8
|
|
3051
|
+
* @throws GLib.Error
|
|
3026
3052
|
*/
|
|
3027
3053
|
allocate(): boolean;
|
|
3028
3054
|
|
|
@@ -4106,6 +4132,7 @@ export namespace Cogl {
|
|
|
4106
4132
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired blend function.
|
|
4107
4133
|
* @returns `true` if the blend string was successfully parsed, and the described blending is supported by the underlying driver/hardware. If there was an error, `false` is returned and `error` is set accordingly (if present).
|
|
4108
4134
|
* @since 2.0
|
|
4135
|
+
* @throws GLib.Error
|
|
4109
4136
|
*/
|
|
4110
4137
|
set_blend(blend_string: string): boolean;
|
|
4111
4138
|
|
|
@@ -4271,6 +4298,7 @@ export namespace Cogl {
|
|
|
4271
4298
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired texture combine function.
|
|
4272
4299
|
* @returns `true` if the blend string was successfully parsed, and the described texture combining is supported by the underlying driver and or hardware. On failure, `false` is returned and `error` is set
|
|
4273
4300
|
* @since 2.0
|
|
4301
|
+
* @throws GLib.Error
|
|
4274
4302
|
*/
|
|
4275
4303
|
set_layer_combine(layer_index: number, blend_string: string): boolean;
|
|
4276
4304
|
|
|
@@ -4338,6 +4366,7 @@ export namespace Cogl {
|
|
|
4338
4366
|
* @param enable whether to enable point sprite coord generation.
|
|
4339
4367
|
* @returns `true` if the function succeeds, `false` otherwise.
|
|
4340
4368
|
* @since 2.0
|
|
4369
|
+
* @throws GLib.Error
|
|
4341
4370
|
*/
|
|
4342
4371
|
set_layer_point_sprite_coords_enabled(layer_index: number, enable: boolean): boolean;
|
|
4343
4372
|
|
|
@@ -4388,6 +4417,7 @@ export namespace Cogl {
|
|
|
4388
4417
|
* @param enable whether to enable per-vertex point size
|
|
4389
4418
|
* @returns `true` if the change suceeded or `false` otherwise
|
|
4390
4419
|
* @since 2.0
|
|
4420
|
+
* @throws GLib.Error
|
|
4391
4421
|
*/
|
|
4392
4422
|
set_per_vertex_point_size(enable: boolean): boolean;
|
|
4393
4423
|
|
|
@@ -4605,6 +4635,7 @@ export namespace Cogl {
|
|
|
4605
4635
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
4606
4636
|
* framebuffer and rendered too.</note>
|
|
4607
4637
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
4638
|
+
* @throws GLib.Error
|
|
4608
4639
|
*/
|
|
4609
4640
|
allocate(): boolean;
|
|
4610
4641
|
|
|
@@ -4774,6 +4805,7 @@ export namespace Cogl {
|
|
|
4774
4805
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
4775
4806
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
4776
4807
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
4808
|
+
* @throws GLib.Error
|
|
4777
4809
|
*/
|
|
4778
4810
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
4779
4811
|
|
|
@@ -4886,6 +4918,7 @@ export namespace Cogl {
|
|
|
4886
4918
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
4887
4919
|
* framebuffer and rendered too.</note>
|
|
4888
4920
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
4921
|
+
* @throws GLib.Error
|
|
4889
4922
|
*/
|
|
4890
4923
|
allocate(): boolean;
|
|
4891
4924
|
|
|
@@ -5055,6 +5088,7 @@ export namespace Cogl {
|
|
|
5055
5088
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
5056
5089
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
5057
5090
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
5091
|
+
* @throws GLib.Error
|
|
5058
5092
|
*/
|
|
5059
5093
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
5060
5094
|
|
|
@@ -5539,6 +5573,7 @@ export namespace Cogl {
|
|
|
5539
5573
|
* @returns `true` if the blend string was successfully parsed, and the described blending is supported by the underlying driver/hardware. If there was an error, `false` is returned and `error` is set accordingly (if present).
|
|
5540
5574
|
* @since 1.0
|
|
5541
5575
|
* @deprecated since 1.16: Use `cogl_pipeline_set_blend()` instead
|
|
5576
|
+
* @throws GLib.Error
|
|
5542
5577
|
*/
|
|
5543
5578
|
set_blend(blend_string: string): boolean;
|
|
5544
5579
|
|
|
@@ -5678,6 +5713,7 @@ export namespace Cogl {
|
|
|
5678
5713
|
* @returns `true` if the blend string was successfully parsed, and the described texture combining is supported by the underlying driver and or hardware. On failure, `false` is returned and `error` is set
|
|
5679
5714
|
* @since 1.0
|
|
5680
5715
|
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_combine()` instead
|
|
5716
|
+
* @throws GLib.Error
|
|
5681
5717
|
*/
|
|
5682
5718
|
set_layer_combine(layer_index: number, blend_string: string): boolean;
|
|
5683
5719
|
|
|
@@ -5722,6 +5758,7 @@ export namespace Cogl {
|
|
|
5722
5758
|
* @returns `true` if the function succeeds, `false` otherwise.
|
|
5723
5759
|
* @since 1.4
|
|
5724
5760
|
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_point_sprite_coords_enabled()` instead
|
|
5761
|
+
* @throws GLib.Error
|
|
5725
5762
|
*/
|
|
5726
5763
|
set_layer_point_sprite_coords_enabled(layer_index: number, enable: boolean): boolean;
|
|
5727
5764
|
|
|
@@ -6453,6 +6490,7 @@ export namespace Cogl {
|
|
|
6453
6490
|
* automatic allocation.</note>
|
|
6454
6491
|
* @returns `true` if there were no error allocating the framebuffer, else `false`.
|
|
6455
6492
|
* @since 1.8
|
|
6493
|
+
* @throws GLib.Error
|
|
6456
6494
|
*/
|
|
6457
6495
|
allocate(): boolean;
|
|
6458
6496
|
|
|
@@ -7310,6 +7348,7 @@ export namespace Cogl {
|
|
|
7310
7348
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
7311
7349
|
* framebuffer and rendered too.</note>
|
|
7312
7350
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
7351
|
+
* @throws GLib.Error
|
|
7313
7352
|
*/
|
|
7314
7353
|
allocate(): boolean;
|
|
7315
7354
|
|
|
@@ -7479,6 +7518,7 @@ export namespace Cogl {
|
|
|
7479
7518
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
7480
7519
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
7481
7520
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
7521
|
+
* @throws GLib.Error
|
|
7482
7522
|
*/
|
|
7483
7523
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
7484
7524
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/cogl-6",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "GJS TypeScript type definitions for Cogl-6",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "cogl-6.js",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"test": "tsc --project tsconfig.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@girs/gjs": "^4.
|
|
35
|
-
"@girs/cairo-1.0": "^4.
|
|
36
|
-
"@girs/gobject-2.0": "^4.
|
|
37
|
-
"@girs/glib-2.0": "^4.
|
|
38
|
-
"@girs/graphene-1.0": "^4.
|
|
39
|
-
"@girs/gl-1.0": "^4.
|
|
34
|
+
"@girs/gjs": "^4.5.0",
|
|
35
|
+
"@girs/cairo-1.0": "^4.5.0",
|
|
36
|
+
"@girs/gobject-2.0": "^4.5.0",
|
|
37
|
+
"@girs/glib-2.0": "^4.5.0",
|
|
38
|
+
"@girs/graphene-1.0": "^4.5.0",
|
|
39
|
+
"@girs/gl-1.0": "^4.5.0" },
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"typescript": "*"
|
|
42
42
|
},
|