@girs/cogl-9 4.4.0 → 4.6.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-9.d.ts +209 -171
- 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-9 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.6.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-9
|
|
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-9` | the namespace as a default export, plus the ambient and global declarations |
|
|
26
|
+
| `@girs/cogl-9/ambient` | only the `gi://` module declarations |
|
|
27
|
+
| `@girs/cogl-9/import` | only the `imports.gi` declarations |
|
|
28
|
+
| `@girs/cogl-9/cogl-9` | 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-9';
|
|
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-9'
|
|
46
|
+
import '@girs/cogl-9';
|
|
32
47
|
```
|
|
33
48
|
|
|
34
|
-
`tsconfig.json`:
|
|
35
49
|
```json
|
|
36
|
-
{
|
|
37
|
-
"compilerOptions": {
|
|
38
|
-
...
|
|
39
|
-
},
|
|
40
|
-
"include": ["@girs/cogl-9"],
|
|
41
|
-
...
|
|
42
|
-
}
|
|
50
|
+
{ "include": ["@girs/cogl-9"] }
|
|
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=9';
|
|
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-9` or `@girs/cogl-9/import` in your `tsconfig` or entry point Typescript file:
|
|
59
|
+
Referencing `@girs/cogl-9/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-9'
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
`tsconfig.json`:
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"compilerOptions": {
|
|
65
|
-
...
|
|
66
|
-
},
|
|
67
|
-
"include": ["@girs/cogl-9"],
|
|
68
|
-
...
|
|
69
|
-
}
|
|
70
|
-
```
|
|
62
|
+
### As `imports.gi`
|
|
71
63
|
|
|
72
|
-
|
|
64
|
+
GJS's global object works the same way, via `@girs/cogl-9/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-9.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,38 +172,38 @@ export namespace Cogl {
|
|
|
172
172
|
* {@link Cogl.IndicesType.INT} is supported in
|
|
173
173
|
* `cogl_indices_new()`.
|
|
174
174
|
*/
|
|
175
|
-
OGL_FEATURE_ID_UNSIGNED_INT_INDICES,
|
|
175
|
+
OGL_FEATURE_ID_UNSIGNED_INT_INDICES = 0,
|
|
176
176
|
/**
|
|
177
177
|
* Whether `cogl_buffer_map()` is
|
|
178
178
|
* supported with CoglBufferAccess including read support.
|
|
179
179
|
*/
|
|
180
|
-
OGL_FEATURE_ID_MAP_BUFFER_FOR_READ,
|
|
180
|
+
OGL_FEATURE_ID_MAP_BUFFER_FOR_READ = 1,
|
|
181
181
|
/**
|
|
182
182
|
* Whether `cogl_buffer_map()` is
|
|
183
183
|
* supported with CoglBufferAccess including write support.
|
|
184
184
|
*/
|
|
185
|
-
OGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE,
|
|
186
|
-
OGL_FEATURE_ID_FENCE,
|
|
185
|
+
OGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE = 2,
|
|
186
|
+
OGL_FEATURE_ID_FENCE = 3,
|
|
187
187
|
/**
|
|
188
188
|
* Support for
|
|
189
189
|
* {@link Cogl.TextureComponents.RG} as the internal components of a
|
|
190
190
|
* texture.
|
|
191
191
|
*/
|
|
192
|
-
OGL_FEATURE_ID_TEXTURE_RG,
|
|
192
|
+
OGL_FEATURE_ID_TEXTURE_RG = 4,
|
|
193
193
|
/**
|
|
194
194
|
* Available if the age of {@link Cogl.Onscreen} back
|
|
195
195
|
* buffers are tracked and so `cogl_onscreen_get_buffer_age()` can be
|
|
196
196
|
* expected to return age values other than 0.
|
|
197
197
|
*/
|
|
198
|
-
OGL_FEATURE_ID_BUFFER_AGE,
|
|
199
|
-
OGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL,
|
|
198
|
+
OGL_FEATURE_ID_BUFFER_AGE = 5,
|
|
199
|
+
OGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL = 6,
|
|
200
200
|
/**
|
|
201
201
|
* Whether blitting using
|
|
202
202
|
* `cogl_blit_framebuffer()` is supported.
|
|
203
203
|
*/
|
|
204
|
-
OGL_FEATURE_ID_BLIT_FRAMEBUFFER,
|
|
205
|
-
OGL_FEATURE_ID_TIMESTAMP_QUERY,
|
|
206
|
-
OGL_FEATURE_ID_GET_GPU_TIME,
|
|
204
|
+
OGL_FEATURE_ID_BLIT_FRAMEBUFFER = 7,
|
|
205
|
+
OGL_FEATURE_ID_TIMESTAMP_QUERY = 8,
|
|
206
|
+
OGL_FEATURE_ID_GET_GPU_TIME = 9,
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
|
|
@@ -216,11 +216,11 @@ export namespace Cogl {
|
|
|
216
216
|
* The event was not handled, continues the
|
|
217
217
|
* processing
|
|
218
218
|
*/
|
|
219
|
-
CONTINUE,
|
|
219
|
+
CONTINUE = 0,
|
|
220
220
|
/**
|
|
221
221
|
* Remove the event, stops the processing
|
|
222
222
|
*/
|
|
223
|
-
REMOVE,
|
|
223
|
+
REMOVE = 1,
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
|
|
@@ -248,7 +248,7 @@ export namespace Cogl {
|
|
|
248
248
|
* acknowledged a frame and is ready for a
|
|
249
249
|
* new frame to be created.
|
|
250
250
|
*/
|
|
251
|
-
SYNC,
|
|
251
|
+
SYNC = 1,
|
|
252
252
|
/**
|
|
253
253
|
* Notifies that a frame has ended. This
|
|
254
254
|
* is a good time for applications to
|
|
@@ -258,7 +258,7 @@ export namespace Cogl {
|
|
|
258
258
|
* events should be expected after a
|
|
259
259
|
* `COGL_FRAME_EVENT_COMPLETE` event.
|
|
260
260
|
*/
|
|
261
|
-
COMPLETE,
|
|
261
|
+
COMPLETE = 2,
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
|
|
@@ -266,7 +266,7 @@ export namespace Cogl {
|
|
|
266
266
|
* @gir-type Enum
|
|
267
267
|
*/
|
|
268
268
|
enum FramebufferError {
|
|
269
|
-
FRAMEBUFFER_ERROR_ALLOCATE,
|
|
269
|
+
FRAMEBUFFER_ERROR_ALLOCATE = 0,
|
|
270
270
|
}
|
|
271
271
|
|
|
272
272
|
|
|
@@ -278,11 +278,11 @@ export namespace Cogl {
|
|
|
278
278
|
* @gir-type Enum
|
|
279
279
|
*/
|
|
280
280
|
enum GraphicsResetStatus {
|
|
281
|
-
NO_ERROR,
|
|
282
|
-
GUILTY_CONTEXT_RESET,
|
|
283
|
-
INNOCENT_CONTEXT_RESET,
|
|
284
|
-
UNKNOWN_CONTEXT_RESET,
|
|
285
|
-
PURGED_CONTEXT_RESET,
|
|
281
|
+
NO_ERROR = 0,
|
|
282
|
+
GUILTY_CONTEXT_RESET = 1,
|
|
283
|
+
INNOCENT_CONTEXT_RESET = 2,
|
|
284
|
+
UNKNOWN_CONTEXT_RESET = 3,
|
|
285
|
+
PURGED_CONTEXT_RESET = 4,
|
|
286
286
|
}
|
|
287
287
|
|
|
288
288
|
|
|
@@ -302,15 +302,15 @@ export namespace Cogl {
|
|
|
302
302
|
/**
|
|
303
303
|
* Your indices are unsigned bytes
|
|
304
304
|
*/
|
|
305
|
-
BYTE,
|
|
305
|
+
BYTE = 0,
|
|
306
306
|
/**
|
|
307
307
|
* Your indices are unsigned shorts
|
|
308
308
|
*/
|
|
309
|
-
SHORT,
|
|
309
|
+
SHORT = 1,
|
|
310
310
|
/**
|
|
311
311
|
* Your indices are unsigned ints
|
|
312
312
|
*/
|
|
313
|
-
INT,
|
|
313
|
+
INT = 2,
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
|
|
@@ -325,41 +325,41 @@ export namespace Cogl {
|
|
|
325
325
|
/**
|
|
326
326
|
* Never let the fragment through.
|
|
327
327
|
*/
|
|
328
|
-
NEVER,
|
|
328
|
+
NEVER = 512,
|
|
329
329
|
/**
|
|
330
330
|
* Let the fragment through if the incoming
|
|
331
331
|
* alpha value is less than the reference alpha value
|
|
332
332
|
*/
|
|
333
|
-
LESS,
|
|
333
|
+
LESS = 513,
|
|
334
334
|
/**
|
|
335
335
|
* Let the fragment through if the incoming
|
|
336
336
|
* alpha value equals the reference alpha value
|
|
337
337
|
*/
|
|
338
|
-
EQUAL,
|
|
338
|
+
EQUAL = 514,
|
|
339
339
|
/**
|
|
340
340
|
* Let the fragment through if the incoming
|
|
341
341
|
* alpha value is less than or equal to the reference alpha value
|
|
342
342
|
*/
|
|
343
|
-
LEQUAL,
|
|
343
|
+
LEQUAL = 515,
|
|
344
344
|
/**
|
|
345
345
|
* Let the fragment through if the incoming
|
|
346
346
|
* alpha value is greater than the reference alpha value
|
|
347
347
|
*/
|
|
348
|
-
GREATER,
|
|
348
|
+
GREATER = 516,
|
|
349
349
|
/**
|
|
350
350
|
* Let the fragment through if the incoming
|
|
351
351
|
* alpha value does not equal the reference alpha value
|
|
352
352
|
*/
|
|
353
|
-
NOTEQUAL,
|
|
353
|
+
NOTEQUAL = 517,
|
|
354
354
|
/**
|
|
355
355
|
* Let the fragment through if the incoming
|
|
356
356
|
* alpha value is greater than or equal to the reference alpha value.
|
|
357
357
|
*/
|
|
358
|
-
GEQUAL,
|
|
358
|
+
GEQUAL = 518,
|
|
359
359
|
/**
|
|
360
360
|
* Always let the fragment through.
|
|
361
361
|
*/
|
|
362
|
-
ALWAYS,
|
|
362
|
+
ALWAYS = 519,
|
|
363
363
|
}
|
|
364
364
|
|
|
365
365
|
|
|
@@ -376,38 +376,38 @@ export namespace Cogl {
|
|
|
376
376
|
* Measuring in manhatten distance from the,
|
|
377
377
|
* current pixel center, use the nearest texture texel
|
|
378
378
|
*/
|
|
379
|
-
NEAREST,
|
|
379
|
+
NEAREST = 9728,
|
|
380
380
|
/**
|
|
381
381
|
* Use the weighted average of the 4 texels
|
|
382
382
|
* nearest the current pixel center
|
|
383
383
|
*/
|
|
384
|
-
LINEAR,
|
|
384
|
+
LINEAR = 9729,
|
|
385
385
|
/**
|
|
386
386
|
* Select the mimap level whose
|
|
387
387
|
* texel size most closely matches the current pixel, and use the
|
|
388
388
|
* {@link Cogl.MaterialFilter.NEAREST} criterion
|
|
389
389
|
*/
|
|
390
|
-
NEAREST_MIPMAP_NEAREST,
|
|
390
|
+
NEAREST_MIPMAP_NEAREST = 9984,
|
|
391
391
|
/**
|
|
392
392
|
* Select the mimap level whose
|
|
393
393
|
* texel size most closely matches the current pixel, and use the
|
|
394
394
|
* {@link Cogl.MaterialFilter.LINEAR} criterion
|
|
395
395
|
*/
|
|
396
|
-
LINEAR_MIPMAP_NEAREST,
|
|
396
|
+
LINEAR_MIPMAP_NEAREST = 9985,
|
|
397
397
|
/**
|
|
398
398
|
* Select the two mimap levels
|
|
399
399
|
* whose texel size most closely matches the current pixel, use
|
|
400
400
|
* the {@link Cogl.MaterialFilter.NEAREST} criterion on each one and take
|
|
401
401
|
* their weighted average
|
|
402
402
|
*/
|
|
403
|
-
NEAREST_MIPMAP_LINEAR,
|
|
403
|
+
NEAREST_MIPMAP_LINEAR = 9986,
|
|
404
404
|
/**
|
|
405
405
|
* Select the two mimap levels
|
|
406
406
|
* whose texel size most closely matches the current pixel, use
|
|
407
407
|
* the {@link Cogl.MaterialFilter.LINEAR} criterion on each one and take
|
|
408
408
|
* their weighted average
|
|
409
409
|
*/
|
|
410
|
-
LINEAR_MIPMAP_LINEAR,
|
|
410
|
+
LINEAR_MIPMAP_LINEAR = 9987,
|
|
411
411
|
}
|
|
412
412
|
|
|
413
413
|
|
|
@@ -428,14 +428,14 @@ export namespace Cogl {
|
|
|
428
428
|
* The texture will be repeated. This
|
|
429
429
|
* is useful for example to draw a tiled background.
|
|
430
430
|
*/
|
|
431
|
-
REPEAT,
|
|
431
|
+
REPEAT = 10497,
|
|
432
432
|
/**
|
|
433
433
|
* The coordinates outside the
|
|
434
434
|
* range 0→1 will sample copies of the edge pixels of the
|
|
435
435
|
* texture. This is useful to avoid artifacts if only one copy of
|
|
436
436
|
* the texture is being rendered.
|
|
437
437
|
*/
|
|
438
|
-
CLAMP_TO_EDGE,
|
|
438
|
+
CLAMP_TO_EDGE = 33071,
|
|
439
439
|
/**
|
|
440
440
|
* Cogl will try to automatically
|
|
441
441
|
* decide which of the above two to use. For `cogl_rectangle()`, it
|
|
@@ -446,7 +446,7 @@ export namespace Cogl {
|
|
|
446
446
|
* layers that have point sprite coordinate generation enabled. This
|
|
447
447
|
* is the default value.
|
|
448
448
|
*/
|
|
449
|
-
AUTOMATIC,
|
|
449
|
+
AUTOMATIC = 519,
|
|
450
450
|
}
|
|
451
451
|
|
|
452
452
|
|
|
@@ -461,41 +461,41 @@ export namespace Cogl {
|
|
|
461
461
|
/**
|
|
462
462
|
* Never let the fragment through.
|
|
463
463
|
*/
|
|
464
|
-
NEVER,
|
|
464
|
+
NEVER = 512,
|
|
465
465
|
/**
|
|
466
466
|
* Let the fragment through if the incoming
|
|
467
467
|
* alpha value is less than the reference alpha value
|
|
468
468
|
*/
|
|
469
|
-
LESS,
|
|
469
|
+
LESS = 513,
|
|
470
470
|
/**
|
|
471
471
|
* Let the fragment through if the incoming
|
|
472
472
|
* alpha value equals the reference alpha value
|
|
473
473
|
*/
|
|
474
|
-
EQUAL,
|
|
474
|
+
EQUAL = 514,
|
|
475
475
|
/**
|
|
476
476
|
* Let the fragment through if the incoming
|
|
477
477
|
* alpha value is less than or equal to the reference alpha value
|
|
478
478
|
*/
|
|
479
|
-
LEQUAL,
|
|
479
|
+
LEQUAL = 515,
|
|
480
480
|
/**
|
|
481
481
|
* Let the fragment through if the incoming
|
|
482
482
|
* alpha value is greater than the reference alpha value
|
|
483
483
|
*/
|
|
484
|
-
GREATER,
|
|
484
|
+
GREATER = 516,
|
|
485
485
|
/**
|
|
486
486
|
* Let the fragment through if the incoming
|
|
487
487
|
* alpha value does not equal the reference alpha value
|
|
488
488
|
*/
|
|
489
|
-
NOTEQUAL,
|
|
489
|
+
NOTEQUAL = 517,
|
|
490
490
|
/**
|
|
491
491
|
* Let the fragment through if the incoming
|
|
492
492
|
* alpha value is greater than or equal to the reference alpha value.
|
|
493
493
|
*/
|
|
494
|
-
GEQUAL,
|
|
494
|
+
GEQUAL = 518,
|
|
495
495
|
/**
|
|
496
496
|
* Always let the fragment through.
|
|
497
497
|
*/
|
|
498
|
-
ALWAYS,
|
|
498
|
+
ALWAYS = 519,
|
|
499
499
|
}
|
|
500
500
|
|
|
501
501
|
|
|
@@ -509,19 +509,19 @@ export namespace Cogl {
|
|
|
509
509
|
* Neither face will be
|
|
510
510
|
* culled. This is the default.
|
|
511
511
|
*/
|
|
512
|
-
NONE,
|
|
512
|
+
NONE = 0,
|
|
513
513
|
/**
|
|
514
514
|
* Front faces will be culled.
|
|
515
515
|
*/
|
|
516
|
-
FRONT,
|
|
516
|
+
FRONT = 1,
|
|
517
517
|
/**
|
|
518
518
|
* Back faces will be culled.
|
|
519
519
|
*/
|
|
520
|
-
BACK,
|
|
520
|
+
BACK = 2,
|
|
521
521
|
/**
|
|
522
522
|
* All faces will be culled.
|
|
523
523
|
*/
|
|
524
|
-
BOTH,
|
|
524
|
+
BOTH = 3,
|
|
525
525
|
}
|
|
526
526
|
|
|
527
527
|
|
|
@@ -538,38 +538,38 @@ export namespace Cogl {
|
|
|
538
538
|
* Measuring in manhatten distance from the,
|
|
539
539
|
* current pixel center, use the nearest texture texel
|
|
540
540
|
*/
|
|
541
|
-
NEAREST,
|
|
541
|
+
NEAREST = 9728,
|
|
542
542
|
/**
|
|
543
543
|
* Use the weighted average of the 4 texels
|
|
544
544
|
* nearest the current pixel center
|
|
545
545
|
*/
|
|
546
|
-
LINEAR,
|
|
546
|
+
LINEAR = 9729,
|
|
547
547
|
/**
|
|
548
548
|
* Select the mimap level whose
|
|
549
549
|
* texel size most closely matches the current pixel, and use the
|
|
550
550
|
* {@link Cogl.PipelineFilter.NEAREST} criterion
|
|
551
551
|
*/
|
|
552
|
-
NEAREST_MIPMAP_NEAREST,
|
|
552
|
+
NEAREST_MIPMAP_NEAREST = 9984,
|
|
553
553
|
/**
|
|
554
554
|
* Select the mimap level whose
|
|
555
555
|
* texel size most closely matches the current pixel, and use the
|
|
556
556
|
* {@link Cogl.PipelineFilter.LINEAR} criterion
|
|
557
557
|
*/
|
|
558
|
-
LINEAR_MIPMAP_NEAREST,
|
|
558
|
+
LINEAR_MIPMAP_NEAREST = 9985,
|
|
559
559
|
/**
|
|
560
560
|
* Select the two mimap levels
|
|
561
561
|
* whose texel size most closely matches the current pixel, use
|
|
562
562
|
* the {@link Cogl.PipelineFilter.NEAREST} criterion on each one and take
|
|
563
563
|
* their weighted average
|
|
564
564
|
*/
|
|
565
|
-
NEAREST_MIPMAP_LINEAR,
|
|
565
|
+
NEAREST_MIPMAP_LINEAR = 9986,
|
|
566
566
|
/**
|
|
567
567
|
* Select the two mimap levels
|
|
568
568
|
* whose texel size most closely matches the current pixel, use
|
|
569
569
|
* the {@link Cogl.PipelineFilter.LINEAR} criterion on each one and take
|
|
570
570
|
* their weighted average
|
|
571
571
|
*/
|
|
572
|
-
LINEAR_MIPMAP_LINEAR,
|
|
572
|
+
LINEAR_MIPMAP_LINEAR = 9987,
|
|
573
573
|
}
|
|
574
574
|
|
|
575
575
|
|
|
@@ -590,15 +590,15 @@ export namespace Cogl {
|
|
|
590
590
|
* The texture will be repeated. This
|
|
591
591
|
* is useful for example to draw a tiled background.
|
|
592
592
|
*/
|
|
593
|
-
REPEAT,
|
|
594
|
-
MIRRORED_REPEAT,
|
|
593
|
+
REPEAT = 10497,
|
|
594
|
+
MIRRORED_REPEAT = 33648,
|
|
595
595
|
/**
|
|
596
596
|
* The coordinates outside the
|
|
597
597
|
* range 0→1 will sample copies of the edge pixels of the
|
|
598
598
|
* texture. This is useful to avoid artifacts if only one copy of
|
|
599
599
|
* the texture is being rendered.
|
|
600
600
|
*/
|
|
601
|
-
CLAMP_TO_EDGE,
|
|
601
|
+
CLAMP_TO_EDGE = 33071,
|
|
602
602
|
/**
|
|
603
603
|
* Cogl will try to automatically
|
|
604
604
|
* decide which of the above two to use. For `cogl_rectangle()`, it
|
|
@@ -609,7 +609,7 @@ export namespace Cogl {
|
|
|
609
609
|
* layers that have point sprite coordinate generation enabled. This
|
|
610
610
|
* is the default value.
|
|
611
611
|
*/
|
|
612
|
-
AUTOMATIC,
|
|
612
|
+
AUTOMATIC = 519,
|
|
613
613
|
}
|
|
614
614
|
|
|
615
615
|
|
|
@@ -617,8 +617,8 @@ export namespace Cogl {
|
|
|
617
617
|
* @gir-type Enum
|
|
618
618
|
*/
|
|
619
619
|
enum RendererError {
|
|
620
|
-
XLIB_DISPLAY_OPEN,
|
|
621
|
-
BAD_CONSTRAINT,
|
|
620
|
+
XLIB_DISPLAY_OPEN = 0,
|
|
621
|
+
BAD_CONSTRAINT = 1,
|
|
622
622
|
}
|
|
623
623
|
|
|
624
624
|
|
|
@@ -645,11 +645,11 @@ export namespace Cogl {
|
|
|
645
645
|
/**
|
|
646
646
|
* A program for processing vertices
|
|
647
647
|
*/
|
|
648
|
-
VERTEX,
|
|
648
|
+
VERTEX = 0,
|
|
649
649
|
/**
|
|
650
650
|
* A program for processing fragments
|
|
651
651
|
*/
|
|
652
|
-
FRAGMENT,
|
|
652
|
+
FRAGMENT = 1,
|
|
653
653
|
}
|
|
654
654
|
|
|
655
655
|
|
|
@@ -662,15 +662,15 @@ export namespace Cogl {
|
|
|
662
662
|
/**
|
|
663
663
|
* draw to both stereo buffers
|
|
664
664
|
*/
|
|
665
|
-
BOTH,
|
|
665
|
+
BOTH = 0,
|
|
666
666
|
/**
|
|
667
667
|
* draw only to the left stereo buffer
|
|
668
668
|
*/
|
|
669
|
-
LEFT,
|
|
669
|
+
LEFT = 1,
|
|
670
670
|
/**
|
|
671
671
|
* draw only to the left stereo buffer
|
|
672
672
|
*/
|
|
673
|
-
RIGHT,
|
|
673
|
+
RIGHT = 2,
|
|
674
674
|
}
|
|
675
675
|
|
|
676
676
|
|
|
@@ -700,12 +700,12 @@ export namespace Cogl {
|
|
|
700
700
|
* You tried to use a feature or
|
|
701
701
|
* configuration not currently available.
|
|
702
702
|
*/
|
|
703
|
-
UNSUPPORTED,
|
|
703
|
+
UNSUPPORTED = 0,
|
|
704
704
|
/**
|
|
705
705
|
* You tried to allocate a resource
|
|
706
706
|
* such as a texture and there wasn't enough memory.
|
|
707
707
|
*/
|
|
708
|
-
NO_MEMORY,
|
|
708
|
+
NO_MEMORY = 1,
|
|
709
709
|
}
|
|
710
710
|
|
|
711
711
|
|
|
@@ -718,25 +718,25 @@ export namespace Cogl {
|
|
|
718
718
|
/**
|
|
719
719
|
* Only the alpha component
|
|
720
720
|
*/
|
|
721
|
-
A,
|
|
721
|
+
A = 1,
|
|
722
722
|
/**
|
|
723
723
|
* Red and green components. Note that
|
|
724
724
|
* this can only be used if the {@link Cogl.FeatureID.OGL_FEATURE_ID_TEXTURE_RG} feature
|
|
725
725
|
* is advertised.
|
|
726
726
|
*/
|
|
727
|
-
RG,
|
|
727
|
+
RG = 2,
|
|
728
728
|
/**
|
|
729
729
|
* Red, green and blue components
|
|
730
730
|
*/
|
|
731
|
-
RGB,
|
|
731
|
+
RGB = 3,
|
|
732
732
|
/**
|
|
733
733
|
* Red, green, blue and alpha components
|
|
734
734
|
*/
|
|
735
|
-
RGBA,
|
|
735
|
+
RGBA = 4,
|
|
736
736
|
/**
|
|
737
737
|
* Only a depth component
|
|
738
738
|
*/
|
|
739
|
-
DEPTH,
|
|
739
|
+
DEPTH = 5,
|
|
740
740
|
}
|
|
741
741
|
|
|
742
742
|
|
|
@@ -749,17 +749,17 @@ export namespace Cogl {
|
|
|
749
749
|
/**
|
|
750
750
|
* Unsupported size
|
|
751
751
|
*/
|
|
752
|
-
SIZE,
|
|
752
|
+
SIZE = 0,
|
|
753
753
|
/**
|
|
754
754
|
* Unsupported format
|
|
755
755
|
*/
|
|
756
|
-
FORMAT,
|
|
757
|
-
BAD_PARAMETER,
|
|
756
|
+
FORMAT = 1,
|
|
757
|
+
BAD_PARAMETER = 2,
|
|
758
758
|
/**
|
|
759
759
|
* A primitive texture type that is
|
|
760
760
|
* unsupported by the driver was used
|
|
761
761
|
*/
|
|
762
|
-
TYPE,
|
|
762
|
+
TYPE = 3,
|
|
763
763
|
}
|
|
764
764
|
|
|
765
765
|
|
|
@@ -773,35 +773,35 @@ export namespace Cogl {
|
|
|
773
773
|
* FIXME, equivalent to
|
|
774
774
|
* <constant>GL_POINTS</constant>
|
|
775
775
|
*/
|
|
776
|
-
POINTS,
|
|
776
|
+
POINTS = 0,
|
|
777
777
|
/**
|
|
778
778
|
* FIXME, equivalent to <constant>GL_LINES</constant>
|
|
779
779
|
*/
|
|
780
|
-
LINES,
|
|
780
|
+
LINES = 1,
|
|
781
781
|
/**
|
|
782
782
|
* FIXME, equivalent to
|
|
783
783
|
* <constant>GL_LINE_LOOP</constant>
|
|
784
784
|
*/
|
|
785
|
-
LINE_LOOP,
|
|
785
|
+
LINE_LOOP = 2,
|
|
786
786
|
/**
|
|
787
787
|
* FIXME, equivalent to
|
|
788
788
|
* <constant>GL_LINE_STRIP</constant>
|
|
789
789
|
*/
|
|
790
|
-
LINE_STRIP,
|
|
790
|
+
LINE_STRIP = 3,
|
|
791
791
|
/**
|
|
792
792
|
* FIXME, equivalent to
|
|
793
793
|
* <constant>GL_TRIANGLES</constant>
|
|
794
794
|
*/
|
|
795
|
-
TRIANGLES,
|
|
795
|
+
TRIANGLES = 4,
|
|
796
796
|
/**
|
|
797
797
|
* FIXME, equivalent to
|
|
798
798
|
* <constant>GL_TRIANGLE_STRIP</constant>
|
|
799
799
|
*/
|
|
800
|
-
TRIANGLE_STRIP,
|
|
800
|
+
TRIANGLE_STRIP = 5,
|
|
801
801
|
/**
|
|
802
802
|
* FIXME, equivalent to <constant>GL_TRIANGLE_FAN</constant>
|
|
803
803
|
*/
|
|
804
|
-
TRIANGLE_FAN,
|
|
804
|
+
TRIANGLE_FAN = 6,
|
|
805
805
|
}
|
|
806
806
|
|
|
807
807
|
|
|
@@ -815,11 +815,11 @@ export namespace Cogl {
|
|
|
815
815
|
/**
|
|
816
816
|
* Vertices are in a clockwise order
|
|
817
817
|
*/
|
|
818
|
-
CLOCKWISE,
|
|
818
|
+
CLOCKWISE = 0,
|
|
819
819
|
/**
|
|
820
820
|
* Vertices are in a counter-clockwise order
|
|
821
821
|
*/
|
|
822
|
-
COUNTER_CLOCKWISE,
|
|
822
|
+
COUNTER_CLOCKWISE = 1,
|
|
823
823
|
}
|
|
824
824
|
|
|
825
825
|
|
|
@@ -827,38 +827,60 @@ export namespace Cogl {
|
|
|
827
827
|
* @gir-type Enum
|
|
828
828
|
*/
|
|
829
829
|
enum WinsysFeature {
|
|
830
|
-
MULTIPLE_ONSCREEN,
|
|
831
|
-
VBLANK_COUNTER,
|
|
832
|
-
VBLANK_WAIT,
|
|
833
|
-
TEXTURE_FROM_PIXMAP,
|
|
834
|
-
SWAP_BUFFERS_EVENT,
|
|
835
|
-
SWAP_REGION,
|
|
836
|
-
SWAP_REGION_THROTTLE,
|
|
837
|
-
SWAP_REGION_SYNCHRONIZED,
|
|
838
|
-
BUFFER_AGE,
|
|
839
|
-
SYNC_AND_COMPLETE_EVENT,
|
|
840
|
-
N_FEATURES,
|
|
830
|
+
MULTIPLE_ONSCREEN = 0,
|
|
831
|
+
VBLANK_COUNTER = 1,
|
|
832
|
+
VBLANK_WAIT = 2,
|
|
833
|
+
TEXTURE_FROM_PIXMAP = 3,
|
|
834
|
+
SWAP_BUFFERS_EVENT = 4,
|
|
835
|
+
SWAP_REGION = 5,
|
|
836
|
+
SWAP_REGION_THROTTLE = 6,
|
|
837
|
+
SWAP_REGION_SYNCHRONIZED = 7,
|
|
838
|
+
BUFFER_AGE = 8,
|
|
839
|
+
SYNC_AND_COMPLETE_EVENT = 9,
|
|
840
|
+
N_FEATURES = 10,
|
|
841
841
|
}
|
|
842
842
|
|
|
843
843
|
|
|
844
|
+
/**
|
|
845
|
+
* @default 64
|
|
846
|
+
*/
|
|
844
847
|
const AFIRST_BIT: number;
|
|
845
848
|
|
|
849
|
+
/**
|
|
850
|
+
* @default 16
|
|
851
|
+
*/
|
|
846
852
|
const A_BIT: number;
|
|
847
853
|
|
|
854
|
+
/**
|
|
855
|
+
* @default 32
|
|
856
|
+
*/
|
|
848
857
|
const BGR_BIT: number;
|
|
849
858
|
|
|
859
|
+
/**
|
|
860
|
+
* @default 256
|
|
861
|
+
*/
|
|
850
862
|
const DEPTH_BIT: number;
|
|
851
863
|
|
|
852
864
|
/**
|
|
853
865
|
* The maximum number of planes of a pixel format (see also
|
|
854
866
|
* `cogl_pixel_format_get_planes()`).
|
|
867
|
+
* @default 4
|
|
855
868
|
*/
|
|
856
869
|
const PIXEL_FORMAT_MAX_PLANES: number;
|
|
857
870
|
|
|
871
|
+
/**
|
|
872
|
+
* @default 128
|
|
873
|
+
*/
|
|
858
874
|
const PREMULT_BIT: number;
|
|
859
875
|
|
|
876
|
+
/**
|
|
877
|
+
* @default 512
|
|
878
|
+
*/
|
|
860
879
|
const STENCIL_BIT: number;
|
|
861
880
|
|
|
881
|
+
/**
|
|
882
|
+
* @default 127
|
|
883
|
+
*/
|
|
862
884
|
const TEXTURE_MAX_WASTE: number;
|
|
863
885
|
|
|
864
886
|
function blend_string_error_quark(): number;
|
|
@@ -911,6 +933,7 @@ export namespace Cogl {
|
|
|
911
933
|
* @param dst_y Destination y position
|
|
912
934
|
* @param width Width of region to copy
|
|
913
935
|
* @param height Height of region to copy
|
|
936
|
+
* @throws GLib.Error
|
|
914
937
|
*/
|
|
915
938
|
function blit_framebuffer(framebuffer: Framebuffer, dst: Framebuffer, src_x: number, src_y: number, dst_x: number, dst_y: number, width: number, height: number): boolean;
|
|
916
939
|
|
|
@@ -1359,6 +1382,7 @@ export namespace Cogl {
|
|
|
1359
1382
|
* @returns A newly created {@link Cogl.Texture} or `null` on failure
|
|
1360
1383
|
* @since 0.8
|
|
1361
1384
|
* @deprecated since 1.18: Use specific constructors such as `cogl_texture_2d_new_from_file()`
|
|
1385
|
+
* @throws GLib.Error
|
|
1362
1386
|
*/
|
|
1363
1387
|
function texture_new_from_file(filename: string, flags: TextureFlags, internal_format: PixelFormat): Texture;
|
|
1364
1388
|
|
|
@@ -1436,15 +1460,15 @@ export namespace Cogl {
|
|
|
1436
1460
|
/**
|
|
1437
1461
|
* Selects the primary color buffer
|
|
1438
1462
|
*/
|
|
1439
|
-
COLOR,
|
|
1463
|
+
COLOR = 1,
|
|
1440
1464
|
/**
|
|
1441
1465
|
* Selects the depth buffer
|
|
1442
1466
|
*/
|
|
1443
|
-
DEPTH,
|
|
1467
|
+
DEPTH = 2,
|
|
1444
1468
|
/**
|
|
1445
1469
|
* Selects the stencil buffer
|
|
1446
1470
|
*/
|
|
1447
|
-
STENCIL,
|
|
1471
|
+
STENCIL = 4,
|
|
1448
1472
|
}
|
|
1449
1473
|
|
|
1450
1474
|
|
|
@@ -1457,11 +1481,11 @@ export namespace Cogl {
|
|
|
1457
1481
|
/**
|
|
1458
1482
|
* FIXME
|
|
1459
1483
|
*/
|
|
1460
|
-
WINDOW_BUFFER,
|
|
1484
|
+
WINDOW_BUFFER = 2,
|
|
1461
1485
|
/**
|
|
1462
1486
|
* FIXME
|
|
1463
1487
|
*/
|
|
1464
|
-
OFFSCREEN_BUFFER,
|
|
1488
|
+
OFFSCREEN_BUFFER = 4,
|
|
1465
1489
|
}
|
|
1466
1490
|
|
|
1467
1491
|
|
|
@@ -1469,8 +1493,8 @@ export namespace Cogl {
|
|
|
1469
1493
|
* @gir-type Flags
|
|
1470
1494
|
*/
|
|
1471
1495
|
enum EglImageFlags {
|
|
1472
|
-
NONE,
|
|
1473
|
-
NO_GET_DATA,
|
|
1496
|
+
NONE = 0,
|
|
1497
|
+
NO_GET_DATA = 1,
|
|
1474
1498
|
}
|
|
1475
1499
|
|
|
1476
1500
|
|
|
@@ -1500,152 +1524,152 @@ export namespace Cogl {
|
|
|
1500
1524
|
/**
|
|
1501
1525
|
* Any format
|
|
1502
1526
|
*/
|
|
1503
|
-
ANY,
|
|
1527
|
+
ANY = 0,
|
|
1504
1528
|
/**
|
|
1505
1529
|
* 8 bits alpha mask
|
|
1506
1530
|
*/
|
|
1507
|
-
A_8,
|
|
1531
|
+
A_8 = 17,
|
|
1508
1532
|
/**
|
|
1509
1533
|
* RGB, 16 bits
|
|
1510
1534
|
*/
|
|
1511
|
-
RGB_565,
|
|
1535
|
+
RGB_565 = 4,
|
|
1512
1536
|
/**
|
|
1513
1537
|
* RGBA, 16 bits
|
|
1514
1538
|
*/
|
|
1515
|
-
RGBA_4444,
|
|
1539
|
+
RGBA_4444 = 21,
|
|
1516
1540
|
/**
|
|
1517
1541
|
* RGBA, 16 bits
|
|
1518
1542
|
*/
|
|
1519
|
-
RGBA_5551,
|
|
1543
|
+
RGBA_5551 = 22,
|
|
1520
1544
|
/**
|
|
1521
1545
|
* Not currently supported
|
|
1522
1546
|
*/
|
|
1523
|
-
YUV,
|
|
1547
|
+
YUV = 7,
|
|
1524
1548
|
/**
|
|
1525
1549
|
* Single luminance component
|
|
1526
1550
|
*/
|
|
1527
|
-
G_8,
|
|
1551
|
+
G_8 = 8,
|
|
1528
1552
|
/**
|
|
1529
1553
|
* RG, 16 bits. Note that red-green textures
|
|
1530
1554
|
* are only available if {@link Cogl.FeatureID.OGL_FEATURE_ID_TEXTURE_RG} is advertised.
|
|
1531
1555
|
* See `cogl_texture_set_components()` for details.
|
|
1532
1556
|
*/
|
|
1533
|
-
RG_88,
|
|
1557
|
+
RG_88 = 9,
|
|
1534
1558
|
/**
|
|
1535
1559
|
* RGB, 24 bits
|
|
1536
1560
|
*/
|
|
1537
|
-
RGB_888,
|
|
1561
|
+
RGB_888 = 2,
|
|
1538
1562
|
/**
|
|
1539
1563
|
* BGR, 24 bits
|
|
1540
1564
|
*/
|
|
1541
|
-
BGR_888,
|
|
1565
|
+
BGR_888 = 34,
|
|
1542
1566
|
/**
|
|
1543
1567
|
* RGBA, 32 bits
|
|
1544
1568
|
*/
|
|
1545
|
-
RGBA_8888,
|
|
1569
|
+
RGBA_8888 = 19,
|
|
1546
1570
|
/**
|
|
1547
1571
|
* BGRA, 32 bits
|
|
1548
1572
|
*/
|
|
1549
|
-
BGRA_8888,
|
|
1573
|
+
BGRA_8888 = 51,
|
|
1550
1574
|
/**
|
|
1551
1575
|
* ARGB, 32 bits
|
|
1552
1576
|
*/
|
|
1553
|
-
ARGB_8888,
|
|
1577
|
+
ARGB_8888 = 83,
|
|
1554
1578
|
/**
|
|
1555
1579
|
* ABGR, 32 bits
|
|
1556
1580
|
*/
|
|
1557
|
-
ABGR_8888,
|
|
1581
|
+
ABGR_8888 = 115,
|
|
1558
1582
|
/**
|
|
1559
1583
|
* RGBA, 32 bits, 10 bpc
|
|
1560
1584
|
*/
|
|
1561
|
-
RGBA_1010102,
|
|
1585
|
+
RGBA_1010102 = 29,
|
|
1562
1586
|
/**
|
|
1563
1587
|
* BGRA, 32 bits, 10 bpc
|
|
1564
1588
|
*/
|
|
1565
|
-
BGRA_1010102,
|
|
1589
|
+
BGRA_1010102 = 61,
|
|
1566
1590
|
/**
|
|
1567
1591
|
* ARGB, 32 bits, 10 bpc
|
|
1568
1592
|
*/
|
|
1569
|
-
ARGB_2101010,
|
|
1593
|
+
ARGB_2101010 = 93,
|
|
1570
1594
|
/**
|
|
1571
1595
|
* ABGR, 32 bits, 10 bpc
|
|
1572
1596
|
*/
|
|
1573
|
-
ABGR_2101010,
|
|
1597
|
+
ABGR_2101010 = 125,
|
|
1574
1598
|
/**
|
|
1575
1599
|
* RGBA half floating point, 64 bit
|
|
1576
1600
|
*/
|
|
1577
|
-
RGBA_FP_16161616,
|
|
1601
|
+
RGBA_FP_16161616 = 27,
|
|
1578
1602
|
/**
|
|
1579
1603
|
* BGRA half floating point, 64 bit
|
|
1580
1604
|
*/
|
|
1581
|
-
BGRA_FP_16161616,
|
|
1605
|
+
BGRA_FP_16161616 = 59,
|
|
1582
1606
|
/**
|
|
1583
1607
|
* ARGB half floating point, 64 bit
|
|
1584
1608
|
*/
|
|
1585
|
-
ARGB_FP_16161616,
|
|
1609
|
+
ARGB_FP_16161616 = 91,
|
|
1586
1610
|
/**
|
|
1587
1611
|
* ABGR half floating point, 64 bit
|
|
1588
1612
|
*/
|
|
1589
|
-
ABGR_FP_16161616,
|
|
1613
|
+
ABGR_FP_16161616 = 123,
|
|
1590
1614
|
/**
|
|
1591
1615
|
* Premultiplied RGBA, 32 bits
|
|
1592
1616
|
*/
|
|
1593
|
-
RGBA_8888_PRE,
|
|
1617
|
+
RGBA_8888_PRE = 147,
|
|
1594
1618
|
/**
|
|
1595
1619
|
* Premultiplied BGRA, 32 bits
|
|
1596
1620
|
*/
|
|
1597
|
-
BGRA_8888_PRE,
|
|
1621
|
+
BGRA_8888_PRE = 179,
|
|
1598
1622
|
/**
|
|
1599
1623
|
* Premultiplied ARGB, 32 bits
|
|
1600
1624
|
*/
|
|
1601
|
-
ARGB_8888_PRE,
|
|
1625
|
+
ARGB_8888_PRE = 211,
|
|
1602
1626
|
/**
|
|
1603
1627
|
* Premultiplied ABGR, 32 bits
|
|
1604
1628
|
*/
|
|
1605
|
-
ABGR_8888_PRE,
|
|
1629
|
+
ABGR_8888_PRE = 243,
|
|
1606
1630
|
/**
|
|
1607
1631
|
* Premultiplied RGBA, 16 bits
|
|
1608
1632
|
*/
|
|
1609
|
-
RGBA_4444_PRE,
|
|
1633
|
+
RGBA_4444_PRE = 149,
|
|
1610
1634
|
/**
|
|
1611
1635
|
* Premultiplied RGBA, 16 bits
|
|
1612
1636
|
*/
|
|
1613
|
-
RGBA_5551_PRE,
|
|
1637
|
+
RGBA_5551_PRE = 150,
|
|
1614
1638
|
/**
|
|
1615
1639
|
* Premultiplied RGBA, 32 bits, 10 bpc
|
|
1616
1640
|
*/
|
|
1617
|
-
RGBA_1010102_PRE,
|
|
1641
|
+
RGBA_1010102_PRE = 157,
|
|
1618
1642
|
/**
|
|
1619
1643
|
* Premultiplied BGRA, 32 bits, 10 bpc
|
|
1620
1644
|
*/
|
|
1621
|
-
BGRA_1010102_PRE,
|
|
1645
|
+
BGRA_1010102_PRE = 189,
|
|
1622
1646
|
/**
|
|
1623
1647
|
* Premultiplied ARGB, 32 bits, 10 bpc
|
|
1624
1648
|
*/
|
|
1625
|
-
ARGB_2101010_PRE,
|
|
1649
|
+
ARGB_2101010_PRE = 221,
|
|
1626
1650
|
/**
|
|
1627
1651
|
* Premultiplied ABGR, 32 bits, 10 bpc
|
|
1628
1652
|
*/
|
|
1629
|
-
ABGR_2101010_PRE,
|
|
1653
|
+
ABGR_2101010_PRE = 253,
|
|
1630
1654
|
/**
|
|
1631
1655
|
* Premultiplied RGBA half floating point, 64 bit
|
|
1632
1656
|
*/
|
|
1633
|
-
RGBA_FP_16161616_PRE,
|
|
1657
|
+
RGBA_FP_16161616_PRE = 155,
|
|
1634
1658
|
/**
|
|
1635
1659
|
* Premultiplied BGRA half floating point, 64 bit
|
|
1636
1660
|
*/
|
|
1637
|
-
BGRA_FP_16161616_PRE,
|
|
1661
|
+
BGRA_FP_16161616_PRE = 187,
|
|
1638
1662
|
/**
|
|
1639
1663
|
* Premultiplied ARGB half floating point, 64 bit
|
|
1640
1664
|
*/
|
|
1641
|
-
ARGB_FP_16161616_PRE,
|
|
1665
|
+
ARGB_FP_16161616_PRE = 219,
|
|
1642
1666
|
/**
|
|
1643
1667
|
* Premultiplied ABGR half floating point, 64 bit
|
|
1644
1668
|
*/
|
|
1645
|
-
ABGR_FP_16161616_PRE,
|
|
1646
|
-
DEPTH_16,
|
|
1647
|
-
DEPTH_32,
|
|
1648
|
-
DEPTH_24_STENCIL_8,
|
|
1669
|
+
ABGR_FP_16161616_PRE = 251,
|
|
1670
|
+
DEPTH_16 = 265,
|
|
1671
|
+
DEPTH_32 = 259,
|
|
1672
|
+
DEPTH_24_STENCIL_8 = 771,
|
|
1649
1673
|
}
|
|
1650
1674
|
|
|
1651
1675
|
|
|
@@ -1658,7 +1682,7 @@ export namespace Cogl {
|
|
|
1658
1682
|
/**
|
|
1659
1683
|
* Read from the color buffer
|
|
1660
1684
|
*/
|
|
1661
|
-
READ_PIXELS_COLOR_BUFFER,
|
|
1685
|
+
READ_PIXELS_COLOR_BUFFER = 1,
|
|
1662
1686
|
}
|
|
1663
1687
|
|
|
1664
1688
|
|
|
@@ -1671,7 +1695,7 @@ export namespace Cogl {
|
|
|
1671
1695
|
/**
|
|
1672
1696
|
* No flags specified
|
|
1673
1697
|
*/
|
|
1674
|
-
NONE,
|
|
1698
|
+
NONE = 0,
|
|
1675
1699
|
/**
|
|
1676
1700
|
* Disables the automatic generation of
|
|
1677
1701
|
* the mipmap pyramid from the base level image whenever it is
|
|
@@ -1679,16 +1703,16 @@ export namespace Cogl {
|
|
|
1679
1703
|
* rendered with a mipmap filter so it should be free to leave out
|
|
1680
1704
|
* this flag when using other filtering modes
|
|
1681
1705
|
*/
|
|
1682
|
-
NO_AUTO_MIPMAP,
|
|
1706
|
+
NO_AUTO_MIPMAP = 1,
|
|
1683
1707
|
/**
|
|
1684
1708
|
* Disables the slicing of the texture
|
|
1685
1709
|
*/
|
|
1686
|
-
NO_SLICING,
|
|
1710
|
+
NO_SLICING = 2,
|
|
1687
1711
|
/**
|
|
1688
1712
|
* Disables the insertion of the texture inside
|
|
1689
1713
|
* the texture atlas used by Cogl
|
|
1690
1714
|
*/
|
|
1691
|
-
NO_ATLAS,
|
|
1715
|
+
NO_ATLAS = 4,
|
|
1692
1716
|
}
|
|
1693
1717
|
|
|
1694
1718
|
|
|
@@ -2019,6 +2043,7 @@ export namespace Cogl {
|
|
|
2019
2043
|
* automatic allocation.</note>
|
|
2020
2044
|
* @returns `true` if there were no error allocating the framebuffer, else `false`.
|
|
2021
2045
|
* @since 1.8
|
|
2046
|
+
* @throws GLib.Error
|
|
2022
2047
|
*/
|
|
2023
2048
|
allocate(): boolean;
|
|
2024
2049
|
|
|
@@ -3603,6 +3628,7 @@ export namespace Cogl {
|
|
|
3603
3628
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired blend function.
|
|
3604
3629
|
* @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).
|
|
3605
3630
|
* @since 2.0
|
|
3631
|
+
* @throws GLib.Error
|
|
3606
3632
|
*/
|
|
3607
3633
|
set_blend(blend_string: string): boolean;
|
|
3608
3634
|
|
|
@@ -3768,6 +3794,7 @@ export namespace Cogl {
|
|
|
3768
3794
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired texture combine function.
|
|
3769
3795
|
* @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
|
|
3770
3796
|
* @since 2.0
|
|
3797
|
+
* @throws GLib.Error
|
|
3771
3798
|
*/
|
|
3772
3799
|
set_layer_combine(layer_index: number, blend_string: string): boolean;
|
|
3773
3800
|
|
|
@@ -3835,6 +3862,7 @@ export namespace Cogl {
|
|
|
3835
3862
|
* @param enable whether to enable point sprite coord generation.
|
|
3836
3863
|
* @returns `true` if the function succeeds, `false` otherwise.
|
|
3837
3864
|
* @since 2.0
|
|
3865
|
+
* @throws GLib.Error
|
|
3838
3866
|
*/
|
|
3839
3867
|
set_layer_point_sprite_coords_enabled(layer_index: number, enable: boolean): boolean;
|
|
3840
3868
|
|
|
@@ -3885,6 +3913,7 @@ export namespace Cogl {
|
|
|
3885
3913
|
* @param enable whether to enable per-vertex point size
|
|
3886
3914
|
* @returns `true` if the change succeeded or `false` otherwise
|
|
3887
3915
|
* @since 2.0
|
|
3916
|
+
* @throws GLib.Error
|
|
3888
3917
|
*/
|
|
3889
3918
|
set_per_vertex_point_size(enable: boolean): boolean;
|
|
3890
3919
|
|
|
@@ -4102,6 +4131,7 @@ export namespace Cogl {
|
|
|
4102
4131
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
4103
4132
|
* framebuffer and rendered too.</note>
|
|
4104
4133
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
4134
|
+
* @throws GLib.Error
|
|
4105
4135
|
*/
|
|
4106
4136
|
allocate(): boolean;
|
|
4107
4137
|
|
|
@@ -4271,6 +4301,7 @@ export namespace Cogl {
|
|
|
4271
4301
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
4272
4302
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
4273
4303
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
4304
|
+
* @throws GLib.Error
|
|
4274
4305
|
*/
|
|
4275
4306
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
4276
4307
|
|
|
@@ -4383,6 +4414,7 @@ export namespace Cogl {
|
|
|
4383
4414
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
4384
4415
|
* framebuffer and rendered too.</note>
|
|
4385
4416
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
4417
|
+
* @throws GLib.Error
|
|
4386
4418
|
*/
|
|
4387
4419
|
allocate(): boolean;
|
|
4388
4420
|
|
|
@@ -4552,6 +4584,7 @@ export namespace Cogl {
|
|
|
4552
4584
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
4553
4585
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
4554
4586
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
4587
|
+
* @throws GLib.Error
|
|
4555
4588
|
*/
|
|
4556
4589
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
4557
4590
|
|
|
@@ -5049,6 +5082,7 @@ export namespace Cogl {
|
|
|
5049
5082
|
* @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).
|
|
5050
5083
|
* @since 1.0
|
|
5051
5084
|
* @deprecated since 1.16: Use `cogl_pipeline_set_blend()` instead
|
|
5085
|
+
* @throws GLib.Error
|
|
5052
5086
|
*/
|
|
5053
5087
|
set_blend(blend_string: string): boolean;
|
|
5054
5088
|
|
|
@@ -5188,6 +5222,7 @@ export namespace Cogl {
|
|
|
5188
5222
|
* @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
|
|
5189
5223
|
* @since 1.0
|
|
5190
5224
|
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_combine()` instead
|
|
5225
|
+
* @throws GLib.Error
|
|
5191
5226
|
*/
|
|
5192
5227
|
set_layer_combine(layer_index: number, blend_string: string): boolean;
|
|
5193
5228
|
|
|
@@ -5232,6 +5267,7 @@ export namespace Cogl {
|
|
|
5232
5267
|
* @returns `true` if the function succeeds, `false` otherwise.
|
|
5233
5268
|
* @since 1.4
|
|
5234
5269
|
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_point_sprite_coords_enabled()` instead
|
|
5270
|
+
* @throws GLib.Error
|
|
5235
5271
|
*/
|
|
5236
5272
|
set_layer_point_sprite_coords_enabled(layer_index: number, enable: boolean): boolean;
|
|
5237
5273
|
|
|
@@ -5549,6 +5585,7 @@ export namespace Cogl {
|
|
|
5549
5585
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
5550
5586
|
* framebuffer and rendered too.</note>
|
|
5551
5587
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
5588
|
+
* @throws GLib.Error
|
|
5552
5589
|
*/
|
|
5553
5590
|
allocate(): boolean;
|
|
5554
5591
|
|
|
@@ -5718,6 +5755,7 @@ export namespace Cogl {
|
|
|
5718
5755
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
5719
5756
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
5720
5757
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
5758
|
+
* @throws GLib.Error
|
|
5721
5759
|
*/
|
|
5722
5760
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
5723
5761
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/cogl-9",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"description": "GJS TypeScript type definitions for Cogl-9",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "cogl-9.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.6.0",
|
|
35
|
+
"@girs/cairo-1.0": "^4.6.0",
|
|
36
|
+
"@girs/gobject-2.0": "^4.6.0",
|
|
37
|
+
"@girs/glib-2.0": "^4.6.0",
|
|
38
|
+
"@girs/graphene-1.0": "^4.6.0",
|
|
39
|
+
"@girs/gl-1.0": "^4.6.0" },
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"typescript": "*"
|
|
42
42
|
},
|