@girs/cogl-15 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-15.d.ts +238 -190
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -4,82 +4,77 @@
|
|
|
4
4
|

|
|
5
5
|

|
|
6
6
|
|
|
7
|
+
GJS TypeScript type definitions for Cogl-15 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-15
|
|
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-15` | the namespace as a default export, plus the ambient and global declarations |
|
|
26
|
+
| `@girs/cogl-15/ambient` | only the `gi://` module declarations |
|
|
27
|
+
| `@girs/cogl-15/import` | only the `imports.gi` declarations |
|
|
28
|
+
| `@girs/cogl-15/cogl-15` | 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-15';
|
|
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-15'
|
|
46
|
+
import '@girs/cogl-15';
|
|
32
47
|
```
|
|
33
48
|
|
|
34
|
-
`tsconfig.json`:
|
|
35
49
|
```json
|
|
36
|
-
{
|
|
37
|
-
"compilerOptions": {
|
|
38
|
-
...
|
|
39
|
-
},
|
|
40
|
-
"include": ["@girs/cogl-15"],
|
|
41
|
-
...
|
|
42
|
-
}
|
|
50
|
+
{ "include": ["@girs/cogl-15"] }
|
|
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=15';
|
|
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-15` or `@girs/cogl-15/import` in your `tsconfig` or entry point Typescript file:
|
|
59
|
+
Referencing `@girs/cogl-15/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-15'
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
`tsconfig.json`:
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"compilerOptions": {
|
|
65
|
-
...
|
|
66
|
-
},
|
|
67
|
-
"include": ["@girs/cogl-15"],
|
|
68
|
-
...
|
|
69
|
-
}
|
|
70
|
-
```
|
|
62
|
+
### As `imports.gi`
|
|
71
63
|
|
|
72
|
-
|
|
64
|
+
GJS's global object works the same way, via `@girs/cogl-15/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-15.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
|
|
|
@@ -66,11 +66,11 @@ export namespace Cogl {
|
|
|
66
66
|
* @gir-type Enum
|
|
67
67
|
*/
|
|
68
68
|
enum BufferBindTarget {
|
|
69
|
-
PIXEL_PACK,
|
|
70
|
-
PIXEL_UNPACK,
|
|
71
|
-
ATTRIBUTE_BUFFER,
|
|
72
|
-
INDEX_BUFFER,
|
|
73
|
-
COUNT,
|
|
69
|
+
PIXEL_PACK = 0,
|
|
70
|
+
PIXEL_UNPACK = 1,
|
|
71
|
+
ATTRIBUTE_BUFFER = 2,
|
|
72
|
+
INDEX_BUFFER = 3,
|
|
73
|
+
COUNT = 4,
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
|
|
@@ -90,16 +90,16 @@ export namespace Cogl {
|
|
|
90
90
|
/**
|
|
91
91
|
* the buffer will not change over time
|
|
92
92
|
*/
|
|
93
|
-
STATIC,
|
|
93
|
+
STATIC = 0,
|
|
94
94
|
/**
|
|
95
95
|
* the buffer will change from time to time
|
|
96
96
|
*/
|
|
97
|
-
DYNAMIC,
|
|
97
|
+
DYNAMIC = 1,
|
|
98
98
|
/**
|
|
99
99
|
* the buffer will be used once or a couple of
|
|
100
100
|
* times
|
|
101
101
|
*/
|
|
102
|
-
STREAM,
|
|
102
|
+
STREAM = 2,
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
|
|
@@ -117,41 +117,41 @@ export namespace Cogl {
|
|
|
117
117
|
/**
|
|
118
118
|
* Never passes.
|
|
119
119
|
*/
|
|
120
|
-
NEVER,
|
|
120
|
+
NEVER = 512,
|
|
121
121
|
/**
|
|
122
122
|
* Passes if the fragment's depth
|
|
123
123
|
* value is less than the value currently in the depth buffer.
|
|
124
124
|
*/
|
|
125
|
-
LESS,
|
|
125
|
+
LESS = 513,
|
|
126
126
|
/**
|
|
127
127
|
* Passes if the fragment's depth
|
|
128
128
|
* value is equal to the value currently in the depth buffer.
|
|
129
129
|
*/
|
|
130
|
-
EQUAL,
|
|
130
|
+
EQUAL = 514,
|
|
131
131
|
/**
|
|
132
132
|
* Passes if the fragment's depth
|
|
133
133
|
* value is less or equal to the value currently in the depth buffer.
|
|
134
134
|
*/
|
|
135
|
-
LEQUAL,
|
|
135
|
+
LEQUAL = 515,
|
|
136
136
|
/**
|
|
137
137
|
* Passes if the fragment's depth
|
|
138
138
|
* value is greater than the value currently in the depth buffer.
|
|
139
139
|
*/
|
|
140
|
-
GREATER,
|
|
140
|
+
GREATER = 516,
|
|
141
141
|
/**
|
|
142
142
|
* Passes if the fragment's depth
|
|
143
143
|
* value is not equal to the value currently in the depth buffer.
|
|
144
144
|
*/
|
|
145
|
-
NOTEQUAL,
|
|
145
|
+
NOTEQUAL = 517,
|
|
146
146
|
/**
|
|
147
147
|
* Passes if the fragment's depth
|
|
148
148
|
* value greater than or equal to the value currently in the depth buffer.
|
|
149
149
|
*/
|
|
150
|
-
GEQUAL,
|
|
150
|
+
GEQUAL = 518,
|
|
151
151
|
/**
|
|
152
152
|
* Always passes.
|
|
153
153
|
*/
|
|
154
|
-
ALWAYS,
|
|
154
|
+
ALWAYS = 519,
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
|
|
@@ -164,19 +164,19 @@ export namespace Cogl {
|
|
|
164
164
|
/**
|
|
165
165
|
* Implies no preference for which driver is used
|
|
166
166
|
*/
|
|
167
|
-
ANY,
|
|
167
|
+
ANY = 0,
|
|
168
168
|
/**
|
|
169
169
|
* A No-Op driver.
|
|
170
170
|
*/
|
|
171
|
-
NOP,
|
|
171
|
+
NOP = 1,
|
|
172
172
|
/**
|
|
173
173
|
* An OpenGL driver using the core GL 3.1 profile
|
|
174
174
|
*/
|
|
175
|
-
GL3,
|
|
175
|
+
GL3 = 2,
|
|
176
176
|
/**
|
|
177
177
|
* An OpenGL ES 2.0 driver.
|
|
178
178
|
*/
|
|
179
|
-
GLES2,
|
|
179
|
+
GLES2 = 3,
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
|
|
@@ -192,52 +192,52 @@ export namespace Cogl {
|
|
|
192
192
|
* {@link Cogl.IndicesType.INT} is supported in
|
|
193
193
|
* `cogl_indices_new()`.
|
|
194
194
|
*/
|
|
195
|
-
OGL_FEATURE_ID_UNSIGNED_INT_INDICES,
|
|
195
|
+
OGL_FEATURE_ID_UNSIGNED_INT_INDICES = 0,
|
|
196
196
|
/**
|
|
197
197
|
* Whether `cogl_buffer_map()` is
|
|
198
198
|
* supported with CoglBufferAccess including read support.
|
|
199
199
|
*/
|
|
200
|
-
OGL_FEATURE_ID_MAP_BUFFER_FOR_READ,
|
|
200
|
+
OGL_FEATURE_ID_MAP_BUFFER_FOR_READ = 1,
|
|
201
201
|
/**
|
|
202
202
|
* Whether `cogl_buffer_map()` is
|
|
203
203
|
* supported with CoglBufferAccess including write support.
|
|
204
204
|
*/
|
|
205
|
-
OGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE,
|
|
206
|
-
OGL_FEATURE_ID_FENCE,
|
|
205
|
+
OGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE = 2,
|
|
206
|
+
OGL_FEATURE_ID_FENCE = 3,
|
|
207
207
|
/**
|
|
208
208
|
* Support for
|
|
209
209
|
* {@link Cogl.TextureComponents.RG} as the internal components of a
|
|
210
210
|
* texture.
|
|
211
211
|
*/
|
|
212
|
-
OGL_FEATURE_ID_TEXTURE_RG,
|
|
212
|
+
OGL_FEATURE_ID_TEXTURE_RG = 4,
|
|
213
213
|
/**
|
|
214
214
|
* Support for 10bpc RGBA formats
|
|
215
215
|
*/
|
|
216
|
-
OGL_FEATURE_ID_TEXTURE_RGBA1010102,
|
|
216
|
+
OGL_FEATURE_ID_TEXTURE_RGBA1010102 = 5,
|
|
217
217
|
/**
|
|
218
218
|
* Support for half float formats
|
|
219
219
|
*/
|
|
220
|
-
OGL_FEATURE_ID_TEXTURE_HALF_FLOAT,
|
|
220
|
+
OGL_FEATURE_ID_TEXTURE_HALF_FLOAT = 6,
|
|
221
221
|
/**
|
|
222
222
|
* Support for 16bpc formats
|
|
223
223
|
*/
|
|
224
|
-
OGL_FEATURE_ID_TEXTURE_NORM16,
|
|
224
|
+
OGL_FEATURE_ID_TEXTURE_NORM16 = 7,
|
|
225
225
|
/**
|
|
226
226
|
* Available if the age of {@link Cogl.Onscreen} back
|
|
227
227
|
* buffers are tracked and so `cogl_onscreen_get_buffer_age()` can be
|
|
228
228
|
* expected to return age values other than 0.
|
|
229
229
|
*/
|
|
230
|
-
OGL_FEATURE_ID_BUFFER_AGE,
|
|
231
|
-
OGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL,
|
|
230
|
+
OGL_FEATURE_ID_BUFFER_AGE = 8,
|
|
231
|
+
OGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL = 9,
|
|
232
232
|
/**
|
|
233
233
|
* Whether blitting using
|
|
234
234
|
* `cogl_blit_framebuffer()` is supported.
|
|
235
235
|
* `COGL_FEATURE_ID_SYNC_FD`
|
|
236
236
|
* `cogl_context_get_latest_sync_fd()` is supported.
|
|
237
237
|
*/
|
|
238
|
-
OGL_FEATURE_ID_BLIT_FRAMEBUFFER,
|
|
239
|
-
OGL_FEATURE_ID_TIMESTAMP_QUERY,
|
|
240
|
-
OGL_FEATURE_ID_SYNC_FD,
|
|
238
|
+
OGL_FEATURE_ID_BLIT_FRAMEBUFFER = 10,
|
|
239
|
+
OGL_FEATURE_ID_TIMESTAMP_QUERY = 11,
|
|
240
|
+
OGL_FEATURE_ID_SYNC_FD = 12,
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
|
|
@@ -250,11 +250,11 @@ export namespace Cogl {
|
|
|
250
250
|
* The event was not handled, continues the
|
|
251
251
|
* processing
|
|
252
252
|
*/
|
|
253
|
-
CONTINUE,
|
|
253
|
+
CONTINUE = 0,
|
|
254
254
|
/**
|
|
255
255
|
* Remove the event, stops the processing
|
|
256
256
|
*/
|
|
257
|
-
REMOVE,
|
|
257
|
+
REMOVE = 1,
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
|
|
@@ -281,7 +281,7 @@ export namespace Cogl {
|
|
|
281
281
|
* acknowledged a frame and is ready for a
|
|
282
282
|
* new frame to be created.
|
|
283
283
|
*/
|
|
284
|
-
SYNC,
|
|
284
|
+
SYNC = 1,
|
|
285
285
|
/**
|
|
286
286
|
* Notifies that a frame has ended. This
|
|
287
287
|
* is a good time for applications to
|
|
@@ -291,7 +291,7 @@ export namespace Cogl {
|
|
|
291
291
|
* events should be expected after a
|
|
292
292
|
* `COGL_FRAME_EVENT_COMPLETE` event.
|
|
293
293
|
*/
|
|
294
|
-
COMPLETE,
|
|
294
|
+
COMPLETE = 2,
|
|
295
295
|
}
|
|
296
296
|
|
|
297
297
|
|
|
@@ -299,7 +299,7 @@ export namespace Cogl {
|
|
|
299
299
|
* @gir-type Enum
|
|
300
300
|
*/
|
|
301
301
|
enum FramebufferError {
|
|
302
|
-
FRAMEBUFFER_ERROR_ALLOCATE,
|
|
302
|
+
FRAMEBUFFER_ERROR_ALLOCATE = 0,
|
|
303
303
|
}
|
|
304
304
|
|
|
305
305
|
|
|
@@ -311,11 +311,11 @@ export namespace Cogl {
|
|
|
311
311
|
* @gir-type Enum
|
|
312
312
|
*/
|
|
313
313
|
enum GraphicsResetStatus {
|
|
314
|
-
NO_ERROR,
|
|
315
|
-
GUILTY_CONTEXT_RESET,
|
|
316
|
-
INNOCENT_CONTEXT_RESET,
|
|
317
|
-
UNKNOWN_CONTEXT_RESET,
|
|
318
|
-
PURGED_CONTEXT_RESET,
|
|
314
|
+
NO_ERROR = 0,
|
|
315
|
+
GUILTY_CONTEXT_RESET = 1,
|
|
316
|
+
INNOCENT_CONTEXT_RESET = 2,
|
|
317
|
+
UNKNOWN_CONTEXT_RESET = 3,
|
|
318
|
+
PURGED_CONTEXT_RESET = 4,
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
|
|
@@ -335,15 +335,15 @@ export namespace Cogl {
|
|
|
335
335
|
/**
|
|
336
336
|
* Your indices are unsigned bytes
|
|
337
337
|
*/
|
|
338
|
-
BYTE,
|
|
338
|
+
BYTE = 0,
|
|
339
339
|
/**
|
|
340
340
|
* Your indices are unsigned shorts
|
|
341
341
|
*/
|
|
342
|
-
SHORT,
|
|
342
|
+
SHORT = 1,
|
|
343
343
|
/**
|
|
344
344
|
* Your indices are unsigned ints
|
|
345
345
|
*/
|
|
346
|
-
INT,
|
|
346
|
+
INT = 2,
|
|
347
347
|
}
|
|
348
348
|
|
|
349
349
|
|
|
@@ -358,41 +358,41 @@ export namespace Cogl {
|
|
|
358
358
|
/**
|
|
359
359
|
* Never let the fragment through.
|
|
360
360
|
*/
|
|
361
|
-
NEVER,
|
|
361
|
+
NEVER = 512,
|
|
362
362
|
/**
|
|
363
363
|
* Let the fragment through if the incoming
|
|
364
364
|
* alpha value is less than the reference alpha value
|
|
365
365
|
*/
|
|
366
|
-
LESS,
|
|
366
|
+
LESS = 513,
|
|
367
367
|
/**
|
|
368
368
|
* Let the fragment through if the incoming
|
|
369
369
|
* alpha value equals the reference alpha value
|
|
370
370
|
*/
|
|
371
|
-
EQUAL,
|
|
371
|
+
EQUAL = 514,
|
|
372
372
|
/**
|
|
373
373
|
* Let the fragment through if the incoming
|
|
374
374
|
* alpha value is less than or equal to the reference alpha value
|
|
375
375
|
*/
|
|
376
|
-
LEQUAL,
|
|
376
|
+
LEQUAL = 515,
|
|
377
377
|
/**
|
|
378
378
|
* Let the fragment through if the incoming
|
|
379
379
|
* alpha value is greater than the reference alpha value
|
|
380
380
|
*/
|
|
381
|
-
GREATER,
|
|
381
|
+
GREATER = 516,
|
|
382
382
|
/**
|
|
383
383
|
* Let the fragment through if the incoming
|
|
384
384
|
* alpha value does not equal the reference alpha value
|
|
385
385
|
*/
|
|
386
|
-
NOTEQUAL,
|
|
386
|
+
NOTEQUAL = 517,
|
|
387
387
|
/**
|
|
388
388
|
* Let the fragment through if the incoming
|
|
389
389
|
* alpha value is greater than or equal to the reference alpha value.
|
|
390
390
|
*/
|
|
391
|
-
GEQUAL,
|
|
391
|
+
GEQUAL = 518,
|
|
392
392
|
/**
|
|
393
393
|
* Always let the fragment through.
|
|
394
394
|
*/
|
|
395
|
-
ALWAYS,
|
|
395
|
+
ALWAYS = 519,
|
|
396
396
|
}
|
|
397
397
|
|
|
398
398
|
|
|
@@ -406,19 +406,19 @@ export namespace Cogl {
|
|
|
406
406
|
* Neither face will be
|
|
407
407
|
* culled. This is the default.
|
|
408
408
|
*/
|
|
409
|
-
NONE,
|
|
409
|
+
NONE = 0,
|
|
410
410
|
/**
|
|
411
411
|
* Front faces will be culled.
|
|
412
412
|
*/
|
|
413
|
-
FRONT,
|
|
413
|
+
FRONT = 1,
|
|
414
414
|
/**
|
|
415
415
|
* Back faces will be culled.
|
|
416
416
|
*/
|
|
417
|
-
BACK,
|
|
417
|
+
BACK = 2,
|
|
418
418
|
/**
|
|
419
419
|
* All faces will be culled.
|
|
420
420
|
*/
|
|
421
|
-
BOTH,
|
|
421
|
+
BOTH = 3,
|
|
422
422
|
}
|
|
423
423
|
|
|
424
424
|
|
|
@@ -435,38 +435,38 @@ export namespace Cogl {
|
|
|
435
435
|
* Measuring in manhatten distance from the,
|
|
436
436
|
* current pixel center, use the nearest texture texel
|
|
437
437
|
*/
|
|
438
|
-
NEAREST,
|
|
438
|
+
NEAREST = 9728,
|
|
439
439
|
/**
|
|
440
440
|
* Use the weighted average of the 4 texels
|
|
441
441
|
* nearest the current pixel center
|
|
442
442
|
*/
|
|
443
|
-
LINEAR,
|
|
443
|
+
LINEAR = 9729,
|
|
444
444
|
/**
|
|
445
445
|
* Select the mimap level whose
|
|
446
446
|
* texel size most closely matches the current pixel, and use the
|
|
447
447
|
* {@link Cogl.PipelineFilter.NEAREST} criterion
|
|
448
448
|
*/
|
|
449
|
-
NEAREST_MIPMAP_NEAREST,
|
|
449
|
+
NEAREST_MIPMAP_NEAREST = 9984,
|
|
450
450
|
/**
|
|
451
451
|
* Select the mimap level whose
|
|
452
452
|
* texel size most closely matches the current pixel, and use the
|
|
453
453
|
* {@link Cogl.PipelineFilter.LINEAR} criterion
|
|
454
454
|
*/
|
|
455
|
-
LINEAR_MIPMAP_NEAREST,
|
|
455
|
+
LINEAR_MIPMAP_NEAREST = 9985,
|
|
456
456
|
/**
|
|
457
457
|
* Select the two mimap levels
|
|
458
458
|
* whose texel size most closely matches the current pixel, use
|
|
459
459
|
* the {@link Cogl.PipelineFilter.NEAREST} criterion on each one and take
|
|
460
460
|
* their weighted average
|
|
461
461
|
*/
|
|
462
|
-
NEAREST_MIPMAP_LINEAR,
|
|
462
|
+
NEAREST_MIPMAP_LINEAR = 9986,
|
|
463
463
|
/**
|
|
464
464
|
* Select the two mimap levels
|
|
465
465
|
* whose texel size most closely matches the current pixel, use
|
|
466
466
|
* the {@link Cogl.PipelineFilter.LINEAR} criterion on each one and take
|
|
467
467
|
* their weighted average
|
|
468
468
|
*/
|
|
469
|
-
LINEAR_MIPMAP_LINEAR,
|
|
469
|
+
LINEAR_MIPMAP_LINEAR = 9987,
|
|
470
470
|
}
|
|
471
471
|
|
|
472
472
|
|
|
@@ -486,15 +486,15 @@ export namespace Cogl {
|
|
|
486
486
|
* The texture will be repeated. This
|
|
487
487
|
* is useful for example to draw a tiled background.
|
|
488
488
|
*/
|
|
489
|
-
REPEAT,
|
|
490
|
-
MIRRORED_REPEAT,
|
|
489
|
+
REPEAT = 10497,
|
|
490
|
+
MIRRORED_REPEAT = 33648,
|
|
491
491
|
/**
|
|
492
492
|
* The coordinates outside the
|
|
493
493
|
* range 0→1 will sample copies of the edge pixels of the
|
|
494
494
|
* texture. This is useful to avoid artifacts if only one copy of
|
|
495
495
|
* the texture is being rendered.
|
|
496
496
|
*/
|
|
497
|
-
CLAMP_TO_EDGE,
|
|
497
|
+
CLAMP_TO_EDGE = 33071,
|
|
498
498
|
/**
|
|
499
499
|
* Cogl will try to automatically
|
|
500
500
|
* decide which of the above two to use. For `cogl_rectangle()`, it
|
|
@@ -505,7 +505,7 @@ export namespace Cogl {
|
|
|
505
505
|
* layers that have point sprite coordinate generation enabled. This
|
|
506
506
|
* is the default value.
|
|
507
507
|
*/
|
|
508
|
-
AUTOMATIC,
|
|
508
|
+
AUTOMATIC = 519,
|
|
509
509
|
}
|
|
510
510
|
|
|
511
511
|
|
|
@@ -541,206 +541,206 @@ export namespace Cogl {
|
|
|
541
541
|
/**
|
|
542
542
|
* Any format
|
|
543
543
|
*/
|
|
544
|
-
ANY,
|
|
544
|
+
ANY = 0,
|
|
545
545
|
/**
|
|
546
546
|
* 8 bits alpha mask
|
|
547
547
|
*/
|
|
548
|
-
A_8,
|
|
548
|
+
A_8 = 17,
|
|
549
549
|
/**
|
|
550
550
|
* RGB, 16 bits
|
|
551
551
|
*/
|
|
552
|
-
RGB_565,
|
|
552
|
+
RGB_565 = 4,
|
|
553
553
|
/**
|
|
554
554
|
* RGBA, 16 bits
|
|
555
555
|
*/
|
|
556
|
-
RGBA_4444,
|
|
556
|
+
RGBA_4444 = 21,
|
|
557
557
|
/**
|
|
558
558
|
* RGBA, 16 bits
|
|
559
559
|
*/
|
|
560
|
-
RGBA_5551,
|
|
560
|
+
RGBA_5551 = 22,
|
|
561
561
|
/**
|
|
562
562
|
* Not currently supported
|
|
563
563
|
*/
|
|
564
|
-
YUV,
|
|
564
|
+
YUV = 7,
|
|
565
565
|
/**
|
|
566
566
|
* Single luminance component
|
|
567
567
|
*/
|
|
568
|
-
R_8,
|
|
568
|
+
R_8 = 8,
|
|
569
569
|
/**
|
|
570
570
|
* RG, 16 bits. Note that red-green textures
|
|
571
571
|
* are only available if {@link Cogl.FeatureID.OGL_FEATURE_ID_TEXTURE_RG} is advertised.
|
|
572
572
|
* See `cogl_texture_set_components()` for details.
|
|
573
573
|
*/
|
|
574
|
-
RG_88,
|
|
574
|
+
RG_88 = 9,
|
|
575
575
|
/**
|
|
576
576
|
* RGB, 24 bits
|
|
577
577
|
*/
|
|
578
|
-
RGB_888,
|
|
578
|
+
RGB_888 = 2,
|
|
579
579
|
/**
|
|
580
580
|
* BGR, 24 bits
|
|
581
581
|
*/
|
|
582
|
-
BGR_888,
|
|
582
|
+
BGR_888 = 34,
|
|
583
583
|
/**
|
|
584
584
|
* RGBX, 32 bits
|
|
585
585
|
*/
|
|
586
|
-
RGBX_8888,
|
|
586
|
+
RGBX_8888 = 3,
|
|
587
587
|
/**
|
|
588
588
|
* RGBA, 32 bits
|
|
589
589
|
*/
|
|
590
|
-
RGBA_8888,
|
|
590
|
+
RGBA_8888 = 19,
|
|
591
591
|
/**
|
|
592
592
|
* BGRX, 32 bits
|
|
593
593
|
*/
|
|
594
|
-
BGRX_8888,
|
|
594
|
+
BGRX_8888 = 35,
|
|
595
595
|
/**
|
|
596
596
|
* BGRA, 32 bits
|
|
597
597
|
*/
|
|
598
|
-
BGRA_8888,
|
|
598
|
+
BGRA_8888 = 51,
|
|
599
599
|
/**
|
|
600
600
|
* XRGB, 32 bits
|
|
601
601
|
*/
|
|
602
|
-
XRGB_8888,
|
|
602
|
+
XRGB_8888 = 67,
|
|
603
603
|
/**
|
|
604
604
|
* ARGB, 32 bits
|
|
605
605
|
*/
|
|
606
|
-
ARGB_8888,
|
|
606
|
+
ARGB_8888 = 83,
|
|
607
607
|
/**
|
|
608
608
|
* XBGR, 32 bits
|
|
609
609
|
*/
|
|
610
|
-
XBGR_8888,
|
|
610
|
+
XBGR_8888 = 99,
|
|
611
611
|
/**
|
|
612
612
|
* ABGR, 32 bits
|
|
613
613
|
*/
|
|
614
|
-
ABGR_8888,
|
|
614
|
+
ABGR_8888 = 115,
|
|
615
615
|
/**
|
|
616
616
|
* Premultiplied RGBA, 32 bits
|
|
617
617
|
*/
|
|
618
|
-
RGBA_8888_PRE,
|
|
618
|
+
RGBA_8888_PRE = 147,
|
|
619
619
|
/**
|
|
620
620
|
* Premultiplied BGRA, 32 bits
|
|
621
621
|
*/
|
|
622
|
-
BGRA_8888_PRE,
|
|
622
|
+
BGRA_8888_PRE = 179,
|
|
623
623
|
/**
|
|
624
624
|
* Premultiplied ARGB, 32 bits
|
|
625
625
|
*/
|
|
626
|
-
ARGB_8888_PRE,
|
|
626
|
+
ARGB_8888_PRE = 211,
|
|
627
627
|
/**
|
|
628
628
|
* Premultiplied ABGR, 32 bits
|
|
629
629
|
*/
|
|
630
|
-
ABGR_8888_PRE,
|
|
630
|
+
ABGR_8888_PRE = 243,
|
|
631
631
|
/**
|
|
632
632
|
* Premultiplied RGBA, 16 bits
|
|
633
633
|
*/
|
|
634
|
-
RGBA_4444_PRE,
|
|
634
|
+
RGBA_4444_PRE = 149,
|
|
635
635
|
/**
|
|
636
636
|
* Premultiplied RGBA, 16 bits
|
|
637
637
|
*/
|
|
638
|
-
RGBA_5551_PRE,
|
|
638
|
+
RGBA_5551_PRE = 150,
|
|
639
639
|
/**
|
|
640
640
|
* RGBA, 32 bits, 10 bpc
|
|
641
641
|
*/
|
|
642
|
-
RGBA_1010102,
|
|
642
|
+
RGBA_1010102 = 29,
|
|
643
643
|
/**
|
|
644
644
|
* BGRA, 32 bits, 10 bpc
|
|
645
645
|
*/
|
|
646
|
-
BGRA_1010102,
|
|
646
|
+
BGRA_1010102 = 61,
|
|
647
647
|
/**
|
|
648
648
|
* XRGB, 32 bits, 10 bpc
|
|
649
649
|
*/
|
|
650
|
-
XRGB_2101010,
|
|
650
|
+
XRGB_2101010 = 77,
|
|
651
651
|
/**
|
|
652
652
|
* ARGB, 32 bits, 10 bpc
|
|
653
653
|
*/
|
|
654
|
-
ARGB_2101010,
|
|
654
|
+
ARGB_2101010 = 93,
|
|
655
655
|
/**
|
|
656
656
|
* XBGR, 32 bits, 10 bpc
|
|
657
657
|
*/
|
|
658
|
-
XBGR_2101010,
|
|
658
|
+
XBGR_2101010 = 109,
|
|
659
659
|
/**
|
|
660
660
|
* ABGR, 32 bits, 10 bpc
|
|
661
661
|
*/
|
|
662
|
-
ABGR_2101010,
|
|
662
|
+
ABGR_2101010 = 125,
|
|
663
663
|
/**
|
|
664
664
|
* Premultiplied RGBA, 32 bits, 10 bpc
|
|
665
665
|
*/
|
|
666
|
-
RGBA_1010102_PRE,
|
|
666
|
+
RGBA_1010102_PRE = 157,
|
|
667
667
|
/**
|
|
668
668
|
* Premultiplied BGRA, 32 bits, 10 bpc
|
|
669
669
|
*/
|
|
670
|
-
BGRA_1010102_PRE,
|
|
670
|
+
BGRA_1010102_PRE = 189,
|
|
671
671
|
/**
|
|
672
672
|
* Premultiplied ARGB, 32 bits, 10 bpc
|
|
673
673
|
*/
|
|
674
|
-
ARGB_2101010_PRE,
|
|
674
|
+
ARGB_2101010_PRE = 221,
|
|
675
675
|
/**
|
|
676
676
|
* Premultiplied ABGR, 32 bits, 10 bpc
|
|
677
677
|
*/
|
|
678
|
-
ABGR_2101010_PRE,
|
|
678
|
+
ABGR_2101010_PRE = 253,
|
|
679
679
|
/**
|
|
680
680
|
* RGBX half floating point, 64 bit
|
|
681
681
|
*/
|
|
682
|
-
RGBX_FP_16161616,
|
|
682
|
+
RGBX_FP_16161616 = 11,
|
|
683
683
|
/**
|
|
684
684
|
* RGBA half floating point, 64 bit
|
|
685
685
|
*/
|
|
686
|
-
RGBA_FP_16161616,
|
|
686
|
+
RGBA_FP_16161616 = 27,
|
|
687
687
|
/**
|
|
688
688
|
* BGRX half floating point, 64 bit
|
|
689
689
|
*/
|
|
690
|
-
BGRX_FP_16161616,
|
|
690
|
+
BGRX_FP_16161616 = 43,
|
|
691
691
|
/**
|
|
692
692
|
* BGRA half floating point, 64 bit
|
|
693
693
|
*/
|
|
694
|
-
BGRA_FP_16161616,
|
|
695
|
-
XRGB_FP_16161616,
|
|
694
|
+
BGRA_FP_16161616 = 59,
|
|
695
|
+
XRGB_FP_16161616 = 75,
|
|
696
696
|
/**
|
|
697
697
|
* ARGB half floating point, 64 bit
|
|
698
698
|
*/
|
|
699
|
-
ARGB_FP_16161616,
|
|
700
|
-
XBGR_FP_16161616,
|
|
699
|
+
ARGB_FP_16161616 = 91,
|
|
700
|
+
XBGR_FP_16161616 = 107,
|
|
701
701
|
/**
|
|
702
702
|
* ABGR half floating point, 64 bit
|
|
703
703
|
*/
|
|
704
|
-
ABGR_FP_16161616,
|
|
704
|
+
ABGR_FP_16161616 = 123,
|
|
705
705
|
/**
|
|
706
706
|
* Premultiplied RGBA half floating point, 64 bit
|
|
707
707
|
*/
|
|
708
|
-
RGBA_FP_16161616_PRE,
|
|
708
|
+
RGBA_FP_16161616_PRE = 155,
|
|
709
709
|
/**
|
|
710
710
|
* Premultiplied BGRA half floating point, 64 bit
|
|
711
711
|
*/
|
|
712
|
-
BGRA_FP_16161616_PRE,
|
|
712
|
+
BGRA_FP_16161616_PRE = 187,
|
|
713
713
|
/**
|
|
714
714
|
* Premultiplied ARGB half floating point, 64 bit
|
|
715
715
|
*/
|
|
716
|
-
ARGB_FP_16161616_PRE,
|
|
716
|
+
ARGB_FP_16161616_PRE = 219,
|
|
717
717
|
/**
|
|
718
718
|
* Premultiplied ABGR half floating point, 64 bit
|
|
719
719
|
*/
|
|
720
|
-
ABGR_FP_16161616_PRE,
|
|
720
|
+
ABGR_FP_16161616_PRE = 251,
|
|
721
721
|
/**
|
|
722
722
|
* RGBA floating point, 128 bit
|
|
723
723
|
*/
|
|
724
|
-
RGBA_FP_32323232,
|
|
724
|
+
RGBA_FP_32323232 = 28,
|
|
725
725
|
/**
|
|
726
726
|
* Premultiplied RGBA floating point, 128 bit
|
|
727
727
|
*/
|
|
728
|
-
RGBA_FP_32323232_PRE,
|
|
728
|
+
RGBA_FP_32323232_PRE = 156,
|
|
729
729
|
/**
|
|
730
730
|
* Single luminance component, 16 bits
|
|
731
731
|
*/
|
|
732
|
-
R_16,
|
|
732
|
+
R_16 = 14,
|
|
733
733
|
/**
|
|
734
734
|
* RG, 32 bits
|
|
735
735
|
*/
|
|
736
|
-
RG_1616,
|
|
736
|
+
RG_1616 = 15,
|
|
737
737
|
/**
|
|
738
738
|
* RGBA, 64 bits, 16bpc
|
|
739
739
|
*/
|
|
740
|
-
RGBA_16161616,
|
|
741
|
-
RGBA_16161616_PRE,
|
|
742
|
-
DEPTH_16,
|
|
743
|
-
DEPTH_24_STENCIL_8,
|
|
740
|
+
RGBA_16161616 = 26,
|
|
741
|
+
RGBA_16161616_PRE = 154,
|
|
742
|
+
DEPTH_16 = 265,
|
|
743
|
+
DEPTH_24_STENCIL_8 = 771,
|
|
744
744
|
}
|
|
745
745
|
|
|
746
746
|
|
|
@@ -748,8 +748,8 @@ export namespace Cogl {
|
|
|
748
748
|
* @gir-type Enum
|
|
749
749
|
*/
|
|
750
750
|
enum RendererError {
|
|
751
|
-
XLIB_DISPLAY_OPEN,
|
|
752
|
-
BAD_CONSTRAINT,
|
|
751
|
+
XLIB_DISPLAY_OPEN = 0,
|
|
752
|
+
BAD_CONSTRAINT = 1,
|
|
753
753
|
}
|
|
754
754
|
|
|
755
755
|
|
|
@@ -760,7 +760,7 @@ export namespace Cogl {
|
|
|
760
760
|
/**
|
|
761
761
|
* Scanout inhibited
|
|
762
762
|
*/
|
|
763
|
-
SCANOUT_ERROR_INHIBITED,
|
|
763
|
+
SCANOUT_ERROR_INHIBITED = 0,
|
|
764
764
|
}
|
|
765
765
|
|
|
766
766
|
|
|
@@ -772,11 +772,11 @@ export namespace Cogl {
|
|
|
772
772
|
/**
|
|
773
773
|
* A program for processing vertices
|
|
774
774
|
*/
|
|
775
|
-
VERTEX,
|
|
775
|
+
VERTEX = 0,
|
|
776
776
|
/**
|
|
777
777
|
* A program for processing fragments
|
|
778
778
|
*/
|
|
779
|
-
FRAGMENT,
|
|
779
|
+
FRAGMENT = 1,
|
|
780
780
|
}
|
|
781
781
|
|
|
782
782
|
|
|
@@ -994,50 +994,50 @@ export namespace Cogl {
|
|
|
994
994
|
* A hook for the entire vertex processing
|
|
995
995
|
* stage of the pipeline.
|
|
996
996
|
*/
|
|
997
|
-
VERTEX,
|
|
997
|
+
VERTEX = 0,
|
|
998
998
|
/**
|
|
999
999
|
* A hook for the vertex transformation.
|
|
1000
1000
|
*/
|
|
1001
|
-
VERTEX_TRANSFORM,
|
|
1001
|
+
VERTEX_TRANSFORM = 1,
|
|
1002
1002
|
/**
|
|
1003
1003
|
* A hook for declaring global data
|
|
1004
1004
|
* that can be shared with all other snippets that are on a vertex
|
|
1005
1005
|
* hook.
|
|
1006
1006
|
*/
|
|
1007
|
-
VERTEX_GLOBALS,
|
|
1007
|
+
VERTEX_GLOBALS = 2,
|
|
1008
1008
|
/**
|
|
1009
1009
|
* A hook for manipulating the point
|
|
1010
1010
|
* size of a vertex. This is only used if
|
|
1011
1011
|
* `cogl_pipeline_set_per_vertex_point_size()` is enabled on the
|
|
1012
1012
|
* pipeline.
|
|
1013
1013
|
*/
|
|
1014
|
-
POINT_SIZE,
|
|
1014
|
+
POINT_SIZE = 3,
|
|
1015
1015
|
/**
|
|
1016
1016
|
* A hook for the entire fragment
|
|
1017
1017
|
* processing stage of the pipeline.
|
|
1018
1018
|
*/
|
|
1019
|
-
FRAGMENT,
|
|
1019
|
+
FRAGMENT = 2048,
|
|
1020
1020
|
/**
|
|
1021
1021
|
* A hook for declaring global
|
|
1022
1022
|
* data wthat can be shared with all other snippets that are on a
|
|
1023
1023
|
* fragment hook.
|
|
1024
1024
|
*/
|
|
1025
|
-
FRAGMENT_GLOBALS,
|
|
1025
|
+
FRAGMENT_GLOBALS = 2049,
|
|
1026
1026
|
/**
|
|
1027
1027
|
* A hook for applying the
|
|
1028
1028
|
* layer matrix to a texture coordinate for a layer.
|
|
1029
1029
|
*/
|
|
1030
|
-
TEXTURE_COORD_TRANSFORM,
|
|
1030
|
+
TEXTURE_COORD_TRANSFORM = 4096,
|
|
1031
1031
|
/**
|
|
1032
1032
|
* A hook for the fragment
|
|
1033
1033
|
* processing of a particular layer.
|
|
1034
1034
|
*/
|
|
1035
|
-
LAYER_FRAGMENT,
|
|
1035
|
+
LAYER_FRAGMENT = 6144,
|
|
1036
1036
|
/**
|
|
1037
1037
|
* A hook for the texture lookup
|
|
1038
1038
|
* stage of a given layer in a pipeline.
|
|
1039
1039
|
*/
|
|
1040
|
-
TEXTURE_LOOKUP,
|
|
1040
|
+
TEXTURE_LOOKUP = 6145,
|
|
1041
1041
|
}
|
|
1042
1042
|
|
|
1043
1043
|
|
|
@@ -1063,12 +1063,12 @@ export namespace Cogl {
|
|
|
1063
1063
|
* You tried to use a feature or
|
|
1064
1064
|
* configuration not currently available.
|
|
1065
1065
|
*/
|
|
1066
|
-
UNSUPPORTED,
|
|
1066
|
+
UNSUPPORTED = 0,
|
|
1067
1067
|
/**
|
|
1068
1068
|
* You tried to allocate a resource
|
|
1069
1069
|
* such as a texture and there wasn't enough memory.
|
|
1070
1070
|
*/
|
|
1071
|
-
NO_MEMORY,
|
|
1071
|
+
NO_MEMORY = 1,
|
|
1072
1072
|
}
|
|
1073
1073
|
|
|
1074
1074
|
|
|
@@ -1080,25 +1080,25 @@ export namespace Cogl {
|
|
|
1080
1080
|
/**
|
|
1081
1081
|
* Only the alpha component
|
|
1082
1082
|
*/
|
|
1083
|
-
A,
|
|
1083
|
+
A = 1,
|
|
1084
1084
|
/**
|
|
1085
1085
|
* Red and green components. Note that
|
|
1086
1086
|
* this can only be used if the {@link Cogl.FeatureID.OGL_FEATURE_ID_TEXTURE_RG} feature
|
|
1087
1087
|
* is advertised.
|
|
1088
1088
|
*/
|
|
1089
|
-
RG,
|
|
1089
|
+
RG = 2,
|
|
1090
1090
|
/**
|
|
1091
1091
|
* Red, green and blue components
|
|
1092
1092
|
*/
|
|
1093
|
-
RGB,
|
|
1093
|
+
RGB = 3,
|
|
1094
1094
|
/**
|
|
1095
1095
|
* Red, green, blue and alpha components
|
|
1096
1096
|
*/
|
|
1097
|
-
RGBA,
|
|
1097
|
+
RGBA = 4,
|
|
1098
1098
|
/**
|
|
1099
1099
|
* Only a depth component
|
|
1100
1100
|
*/
|
|
1101
|
-
DEPTH,
|
|
1101
|
+
DEPTH = 5,
|
|
1102
1102
|
}
|
|
1103
1103
|
|
|
1104
1104
|
|
|
@@ -1110,17 +1110,17 @@ export namespace Cogl {
|
|
|
1110
1110
|
/**
|
|
1111
1111
|
* Unsupported size
|
|
1112
1112
|
*/
|
|
1113
|
-
SIZE,
|
|
1113
|
+
SIZE = 0,
|
|
1114
1114
|
/**
|
|
1115
1115
|
* Unsupported format
|
|
1116
1116
|
*/
|
|
1117
|
-
FORMAT,
|
|
1118
|
-
BAD_PARAMETER,
|
|
1117
|
+
FORMAT = 1,
|
|
1118
|
+
BAD_PARAMETER = 2,
|
|
1119
1119
|
/**
|
|
1120
1120
|
* A primitive texture type that is
|
|
1121
1121
|
* unsupported by the driver was used
|
|
1122
1122
|
*/
|
|
1123
|
-
TYPE,
|
|
1123
|
+
TYPE = 3,
|
|
1124
1124
|
}
|
|
1125
1125
|
|
|
1126
1126
|
|
|
@@ -1132,31 +1132,31 @@ export namespace Cogl {
|
|
|
1132
1132
|
/**
|
|
1133
1133
|
* FIXME, equivalent to `GL_POINTS`
|
|
1134
1134
|
*/
|
|
1135
|
-
POINTS,
|
|
1135
|
+
POINTS = 0,
|
|
1136
1136
|
/**
|
|
1137
1137
|
* FIXME, equivalent to `GL_LINES`
|
|
1138
1138
|
*/
|
|
1139
|
-
LINES,
|
|
1139
|
+
LINES = 1,
|
|
1140
1140
|
/**
|
|
1141
1141
|
* FIXME, equivalent to `GL_LINE_LOOP`
|
|
1142
1142
|
*/
|
|
1143
|
-
LINE_LOOP,
|
|
1143
|
+
LINE_LOOP = 2,
|
|
1144
1144
|
/**
|
|
1145
1145
|
* FIXME, equivalent to `GL_LINE_STRIP`
|
|
1146
1146
|
*/
|
|
1147
|
-
LINE_STRIP,
|
|
1147
|
+
LINE_STRIP = 3,
|
|
1148
1148
|
/**
|
|
1149
1149
|
* FIXME, equivalent to `GL_TRIANGLES`
|
|
1150
1150
|
*/
|
|
1151
|
-
TRIANGLES,
|
|
1151
|
+
TRIANGLES = 4,
|
|
1152
1152
|
/**
|
|
1153
1153
|
* FIXME, equivalent to `GL_TRIANGLE_STRIP`
|
|
1154
1154
|
*/
|
|
1155
|
-
TRIANGLE_STRIP,
|
|
1155
|
+
TRIANGLE_STRIP = 5,
|
|
1156
1156
|
/**
|
|
1157
1157
|
* FIXME, equivalent to `GL_TRIANGLE_FAN`
|
|
1158
1158
|
*/
|
|
1159
|
-
TRIANGLE_FAN,
|
|
1159
|
+
TRIANGLE_FAN = 6,
|
|
1160
1160
|
}
|
|
1161
1161
|
|
|
1162
1162
|
|
|
@@ -1170,11 +1170,11 @@ export namespace Cogl {
|
|
|
1170
1170
|
/**
|
|
1171
1171
|
* Vertices are in a clockwise order
|
|
1172
1172
|
*/
|
|
1173
|
-
CLOCKWISE,
|
|
1173
|
+
CLOCKWISE = 0,
|
|
1174
1174
|
/**
|
|
1175
1175
|
* Vertices are in a counter-clockwise order
|
|
1176
1176
|
*/
|
|
1177
|
-
COUNTER_CLOCKWISE,
|
|
1177
|
+
COUNTER_CLOCKWISE = 1,
|
|
1178
1178
|
}
|
|
1179
1179
|
|
|
1180
1180
|
|
|
@@ -1182,16 +1182,16 @@ export namespace Cogl {
|
|
|
1182
1182
|
* @gir-type Enum
|
|
1183
1183
|
*/
|
|
1184
1184
|
enum WinsysFeature {
|
|
1185
|
-
VBLANK_COUNTER,
|
|
1186
|
-
VBLANK_WAIT,
|
|
1187
|
-
TEXTURE_FROM_PIXMAP,
|
|
1188
|
-
SWAP_BUFFERS_EVENT,
|
|
1189
|
-
SWAP_REGION,
|
|
1190
|
-
SWAP_REGION_THROTTLE,
|
|
1191
|
-
SWAP_REGION_SYNCHRONIZED,
|
|
1192
|
-
BUFFER_AGE,
|
|
1193
|
-
SYNC_AND_COMPLETE_EVENT,
|
|
1194
|
-
N_FEATURES,
|
|
1185
|
+
VBLANK_COUNTER = 0,
|
|
1186
|
+
VBLANK_WAIT = 1,
|
|
1187
|
+
TEXTURE_FROM_PIXMAP = 2,
|
|
1188
|
+
SWAP_BUFFERS_EVENT = 3,
|
|
1189
|
+
SWAP_REGION = 4,
|
|
1190
|
+
SWAP_REGION_THROTTLE = 5,
|
|
1191
|
+
SWAP_REGION_SYNCHRONIZED = 6,
|
|
1192
|
+
BUFFER_AGE = 7,
|
|
1193
|
+
SYNC_AND_COMPLETE_EVENT = 8,
|
|
1194
|
+
N_FEATURES = 9,
|
|
1195
1195
|
}
|
|
1196
1196
|
|
|
1197
1197
|
|
|
@@ -1206,41 +1206,63 @@ export namespace Cogl {
|
|
|
1206
1206
|
/**
|
|
1207
1207
|
* Implies no preference for which backend is used
|
|
1208
1208
|
*/
|
|
1209
|
-
ANY,
|
|
1209
|
+
ANY = 0,
|
|
1210
1210
|
/**
|
|
1211
1211
|
* Use the no-op stub backend
|
|
1212
1212
|
*/
|
|
1213
|
-
STUB,
|
|
1213
|
+
STUB = 1,
|
|
1214
1214
|
/**
|
|
1215
1215
|
* Use the GLX window system binding API
|
|
1216
1216
|
*/
|
|
1217
|
-
GLX,
|
|
1217
|
+
GLX = 2,
|
|
1218
1218
|
/**
|
|
1219
1219
|
* Use EGL with the X window system via XLib
|
|
1220
1220
|
*/
|
|
1221
|
-
EGL_XLIB,
|
|
1222
|
-
CUSTOM,
|
|
1221
|
+
EGL_XLIB = 3,
|
|
1222
|
+
CUSTOM = 4,
|
|
1223
1223
|
}
|
|
1224
1224
|
|
|
1225
1225
|
|
|
1226
|
+
/**
|
|
1227
|
+
* @default 64
|
|
1228
|
+
*/
|
|
1226
1229
|
const AFIRST_BIT: number;
|
|
1227
1230
|
|
|
1231
|
+
/**
|
|
1232
|
+
* @default 16
|
|
1233
|
+
*/
|
|
1228
1234
|
const A_BIT: number;
|
|
1229
1235
|
|
|
1236
|
+
/**
|
|
1237
|
+
* @default 32
|
|
1238
|
+
*/
|
|
1230
1239
|
const BGR_BIT: number;
|
|
1231
1240
|
|
|
1241
|
+
/**
|
|
1242
|
+
* @default 256
|
|
1243
|
+
*/
|
|
1232
1244
|
const DEPTH_BIT: number;
|
|
1233
1245
|
|
|
1234
1246
|
/**
|
|
1235
1247
|
* The maximum number of planes of a pixel format (see also
|
|
1236
1248
|
* `cogl_pixel_format_get_planes()`).
|
|
1249
|
+
* @default 4
|
|
1237
1250
|
*/
|
|
1238
1251
|
const PIXEL_FORMAT_MAX_PLANES: number;
|
|
1239
1252
|
|
|
1253
|
+
/**
|
|
1254
|
+
* @default 128
|
|
1255
|
+
*/
|
|
1240
1256
|
const PREMULT_BIT: number;
|
|
1241
1257
|
|
|
1258
|
+
/**
|
|
1259
|
+
* @default 512
|
|
1260
|
+
*/
|
|
1242
1261
|
const STENCIL_BIT: number;
|
|
1243
1262
|
|
|
1263
|
+
/**
|
|
1264
|
+
* @default 127
|
|
1265
|
+
*/
|
|
1244
1266
|
const TEXTURE_MAX_WASTE: number;
|
|
1245
1267
|
|
|
1246
1268
|
/**
|
|
@@ -1291,6 +1313,7 @@ export namespace Cogl {
|
|
|
1291
1313
|
* @param dst_y Destination y position
|
|
1292
1314
|
* @param width Width of region to copy
|
|
1293
1315
|
* @param height Height of region to copy
|
|
1316
|
+
* @throws GLib.Error
|
|
1294
1317
|
*/
|
|
1295
1318
|
function blit_framebuffer(framebuffer: Framebuffer, dst: Framebuffer, src_x: number, src_y: number, dst_x: number, dst_y: number, width: number, height: number): boolean;
|
|
1296
1319
|
|
|
@@ -1531,11 +1554,13 @@ export namespace Cogl {
|
|
|
1531
1554
|
|
|
1532
1555
|
/**
|
|
1533
1556
|
* @param fd
|
|
1557
|
+
* @throws GLib.Error
|
|
1534
1558
|
*/
|
|
1535
1559
|
function start_tracing_with_fd(fd: number): boolean;
|
|
1536
1560
|
|
|
1537
1561
|
/**
|
|
1538
1562
|
* @param filename
|
|
1563
|
+
* @throws GLib.Error
|
|
1539
1564
|
*/
|
|
1540
1565
|
function start_tracing_with_path(filename: string): boolean;
|
|
1541
1566
|
|
|
@@ -1584,8 +1609,8 @@ export namespace Cogl {
|
|
|
1584
1609
|
* @gir-type Flags
|
|
1585
1610
|
*/
|
|
1586
1611
|
enum AtlasFlags {
|
|
1587
|
-
CLEAR_TEXTURE,
|
|
1588
|
-
DISABLE_MIGRATION,
|
|
1612
|
+
CLEAR_TEXTURE = 1,
|
|
1613
|
+
DISABLE_MIGRATION = 2,
|
|
1589
1614
|
}
|
|
1590
1615
|
|
|
1591
1616
|
|
|
@@ -1604,16 +1629,16 @@ export namespace Cogl {
|
|
|
1604
1629
|
/**
|
|
1605
1630
|
* the buffer will be read
|
|
1606
1631
|
*/
|
|
1607
|
-
READ,
|
|
1632
|
+
READ = 1,
|
|
1608
1633
|
/**
|
|
1609
1634
|
* the buffer will written to
|
|
1610
1635
|
*/
|
|
1611
|
-
WRITE,
|
|
1636
|
+
WRITE = 2,
|
|
1612
1637
|
/**
|
|
1613
1638
|
* the buffer will be used for both reading and
|
|
1614
1639
|
* writing
|
|
1615
1640
|
*/
|
|
1616
|
-
READ_WRITE,
|
|
1641
|
+
READ_WRITE = 3,
|
|
1617
1642
|
}
|
|
1618
1643
|
|
|
1619
1644
|
|
|
@@ -1625,15 +1650,15 @@ export namespace Cogl {
|
|
|
1625
1650
|
/**
|
|
1626
1651
|
* Selects the primary color buffer
|
|
1627
1652
|
*/
|
|
1628
|
-
COLOR,
|
|
1653
|
+
COLOR = 1,
|
|
1629
1654
|
/**
|
|
1630
1655
|
* Selects the depth buffer
|
|
1631
1656
|
*/
|
|
1632
|
-
DEPTH,
|
|
1657
|
+
DEPTH = 2,
|
|
1633
1658
|
/**
|
|
1634
1659
|
* Selects the stencil buffer
|
|
1635
1660
|
*/
|
|
1636
|
-
STENCIL,
|
|
1661
|
+
STENCIL = 4,
|
|
1637
1662
|
}
|
|
1638
1663
|
|
|
1639
1664
|
|
|
@@ -1656,14 +1681,14 @@ export namespace Cogl {
|
|
|
1656
1681
|
* buffer, the entire contents of the buffer become undefined, even
|
|
1657
1682
|
* if only a subregion of the buffer is mapped.
|
|
1658
1683
|
*/
|
|
1659
|
-
DISCARD,
|
|
1684
|
+
DISCARD = 1,
|
|
1660
1685
|
/**
|
|
1661
1686
|
* Tells Cogl that you plan to
|
|
1662
1687
|
* replace all the contents of the mapped region. The contents of
|
|
1663
1688
|
* the region specified are undefined after this flag is used to
|
|
1664
1689
|
* map a buffer.
|
|
1665
1690
|
*/
|
|
1666
|
-
DISCARD_RANGE,
|
|
1691
|
+
DISCARD_RANGE = 2,
|
|
1667
1692
|
}
|
|
1668
1693
|
|
|
1669
1694
|
|
|
@@ -1671,8 +1696,8 @@ export namespace Cogl {
|
|
|
1671
1696
|
* @gir-type Flags
|
|
1672
1697
|
*/
|
|
1673
1698
|
enum EglImageFlags {
|
|
1674
|
-
NONE,
|
|
1675
|
-
NO_GET_DATA,
|
|
1699
|
+
NONE = 0,
|
|
1700
|
+
NO_GET_DATA = 1,
|
|
1676
1701
|
}
|
|
1677
1702
|
|
|
1678
1703
|
|
|
@@ -1684,7 +1709,7 @@ export namespace Cogl {
|
|
|
1684
1709
|
/**
|
|
1685
1710
|
* Read from the color buffer
|
|
1686
1711
|
*/
|
|
1687
|
-
READ_PIXELS_COLOR_BUFFER,
|
|
1712
|
+
READ_PIXELS_COLOR_BUFFER = 1,
|
|
1688
1713
|
}
|
|
1689
1714
|
|
|
1690
1715
|
|
|
@@ -2170,6 +2195,7 @@ export namespace Cogl {
|
|
|
2170
2195
|
* @param access how the mapped buffer will be used by the application
|
|
2171
2196
|
* @param hints A mask of {@link Cogl.BufferMapHint}s that tell Cogl how the data will be modified once mapped.
|
|
2172
2197
|
* @returns A pointer to the mapped memory or `null` is the call fails
|
|
2198
|
+
* @throws GLib.Error
|
|
2173
2199
|
*/
|
|
2174
2200
|
map_range(offset: bigint | number, size: bigint | number, access: BufferAccess, hints: BufferMapHint): null;
|
|
2175
2201
|
|
|
@@ -2497,6 +2523,7 @@ export namespace Cogl {
|
|
|
2497
2523
|
* with a message. For simple applications that don't have any
|
|
2498
2524
|
* fallback options this behaviour may be fine.
|
|
2499
2525
|
* @returns Returns `true` if there was no error, else it returns `false` and returns an exception via `error`.
|
|
2526
|
+
* @throws GLib.Error
|
|
2500
2527
|
*/
|
|
2501
2528
|
setup(): boolean;
|
|
2502
2529
|
}
|
|
@@ -2720,6 +2747,7 @@ export namespace Cogl {
|
|
|
2720
2747
|
* program will abort with an error message if there is an error during
|
|
2721
2748
|
* automatic allocation.
|
|
2722
2749
|
* @returns `true` if there were no error allocating the framebuffer, else `false`.
|
|
2750
|
+
* @throws GLib.Error
|
|
2723
2751
|
*/
|
|
2724
2752
|
allocate(): boolean;
|
|
2725
2753
|
|
|
@@ -3952,6 +3980,7 @@ export namespace Cogl {
|
|
|
3952
3980
|
* @param scanout
|
|
3953
3981
|
* @param info
|
|
3954
3982
|
* @param user_data
|
|
3983
|
+
* @throws GLib.Error
|
|
3955
3984
|
*/
|
|
3956
3985
|
direct_scanout(scanout: Scanout, info: FrameInfo, user_data: null): boolean;
|
|
3957
3986
|
|
|
@@ -4398,6 +4427,7 @@ export namespace Cogl {
|
|
|
4398
4427
|
* is in premultiplied form.
|
|
4399
4428
|
* @param blend_string A Cogl blend string describing the desired blend function.
|
|
4400
4429
|
* @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).
|
|
4430
|
+
* @throws GLib.Error
|
|
4401
4431
|
*/
|
|
4402
4432
|
set_blend(blend_string: string): boolean;
|
|
4403
4433
|
|
|
@@ -4448,6 +4478,7 @@ export namespace Cogl {
|
|
|
4448
4478
|
* it is possible for this function to fail and report an `error`.
|
|
4449
4479
|
* @param state A {@link Cogl.DepthState} struct
|
|
4450
4480
|
* @returns `true` if the GPU supports all the given `state` else `false` and returns an `error`.
|
|
4481
|
+
* @throws GLib.Error
|
|
4451
4482
|
*/
|
|
4452
4483
|
set_depth_state(state: DepthState): boolean;
|
|
4453
4484
|
|
|
@@ -4518,6 +4549,7 @@ export namespace Cogl {
|
|
|
4518
4549
|
* @param layer_index Specifies the layer you want define a combine function for
|
|
4519
4550
|
* @param blend_string A Cogl blend string describing the desired texture combine function.
|
|
4520
4551
|
* @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
|
|
4552
|
+
* @throws GLib.Error
|
|
4521
4553
|
*/
|
|
4522
4554
|
set_layer_combine(layer_index: number, blend_string: string): boolean;
|
|
4523
4555
|
|
|
@@ -4580,6 +4612,7 @@ export namespace Cogl {
|
|
|
4580
4612
|
* @param layer_index the layer number to change.
|
|
4581
4613
|
* @param enable whether to enable point sprite coord generation.
|
|
4582
4614
|
* @returns `true` if the function succeeds, `false` otherwise.
|
|
4615
|
+
* @throws GLib.Error
|
|
4583
4616
|
*/
|
|
4584
4617
|
set_layer_point_sprite_coords_enabled(layer_index: number, enable: boolean): boolean;
|
|
4585
4618
|
|
|
@@ -4626,6 +4659,7 @@ export namespace Cogl {
|
|
|
4626
4659
|
* undefined.
|
|
4627
4660
|
* @param enable whether to enable per-vertex point size
|
|
4628
4661
|
* @returns `true` if the change succeeded or `false` otherwise
|
|
4662
|
+
* @throws GLib.Error
|
|
4629
4663
|
*/
|
|
4630
4664
|
set_per_vertex_point_size(enable: boolean): boolean;
|
|
4631
4665
|
|
|
@@ -5153,6 +5187,7 @@ export namespace Cogl {
|
|
|
5153
5187
|
* any given constraint criteria can be satisfied and that a
|
|
5154
5188
|
* usable driver and window system backend can be found.
|
|
5155
5189
|
* @returns `true` if there was no error while connecting the given `renderer`. `false` if there was an error.
|
|
5190
|
+
* @throws GLib.Error
|
|
5156
5191
|
*/
|
|
5157
5192
|
connect(): boolean;
|
|
5158
5193
|
|
|
@@ -5217,7 +5252,7 @@ export namespace Cogl {
|
|
|
5217
5252
|
* @signal
|
|
5218
5253
|
* @run-last
|
|
5219
5254
|
*/
|
|
5220
|
-
"scanout-failed": (
|
|
5255
|
+
"scanout-failed": (object: Onscreen) => void;
|
|
5221
5256
|
}
|
|
5222
5257
|
|
|
5223
5258
|
// Constructor properties interface
|
|
@@ -5267,6 +5302,7 @@ export namespace Cogl {
|
|
|
5267
5302
|
* @param framebuffer
|
|
5268
5303
|
* @param x
|
|
5269
5304
|
* @param y
|
|
5305
|
+
* @throws GLib.Error
|
|
5270
5306
|
*/
|
|
5271
5307
|
blit_to_framebuffer(framebuffer: Framebuffer, x: number, y: number): boolean;
|
|
5272
5308
|
|
|
@@ -5909,6 +5945,7 @@ export namespace Cogl {
|
|
|
5909
5945
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
5910
5946
|
* framebuffer and rendered too.
|
|
5911
5947
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
5948
|
+
* @throws GLib.Error
|
|
5912
5949
|
*/
|
|
5913
5950
|
allocate(): boolean;
|
|
5914
5951
|
|
|
@@ -6069,6 +6106,7 @@ export namespace Cogl {
|
|
|
6069
6106
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
6070
6107
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
6071
6108
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
6109
|
+
* @throws GLib.Error
|
|
6072
6110
|
*/
|
|
6073
6111
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
6074
6112
|
|
|
@@ -6629,15 +6667,25 @@ export namespace Cogl {
|
|
|
6629
6667
|
|
|
6630
6668
|
get_width(): number;
|
|
6631
6669
|
|
|
6670
|
+
/**
|
|
6671
|
+
* @throws GLib.Error
|
|
6672
|
+
*/
|
|
6632
6673
|
mmap(): null;
|
|
6633
6674
|
|
|
6634
6675
|
/**
|
|
6635
6676
|
* @param data
|
|
6677
|
+
* @throws GLib.Error
|
|
6636
6678
|
*/
|
|
6637
6679
|
munmap(data: null): boolean;
|
|
6638
6680
|
|
|
6681
|
+
/**
|
|
6682
|
+
* @throws GLib.Error
|
|
6683
|
+
*/
|
|
6639
6684
|
sync_read_end(): boolean;
|
|
6640
6685
|
|
|
6686
|
+
/**
|
|
6687
|
+
* @throws GLib.Error
|
|
6688
|
+
*/
|
|
6641
6689
|
sync_read_start(): boolean;
|
|
6642
6690
|
}
|
|
6643
6691
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/cogl-15",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"description": "GJS TypeScript type definitions for Cogl-15",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "cogl-15.js",
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
"test": "tsc --project tsconfig.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@girs/gjs": "^4.
|
|
35
|
-
"@girs/xlib-2.0": "^4.
|
|
36
|
-
"@girs/mtk-15": "^4.
|
|
37
|
-
"@girs/graphene-1.0": "^4.
|
|
38
|
-
"@girs/gobject-2.0": "^4.
|
|
39
|
-
"@girs/glib-2.0": "^4.
|
|
40
|
-
"@girs/gl-1.0": "^4.
|
|
34
|
+
"@girs/gjs": "^4.6.0",
|
|
35
|
+
"@girs/xlib-2.0": "^4.6.0",
|
|
36
|
+
"@girs/mtk-15": "^4.6.0",
|
|
37
|
+
"@girs/graphene-1.0": "^4.6.0",
|
|
38
|
+
"@girs/gobject-2.0": "^4.6.0",
|
|
39
|
+
"@girs/glib-2.0": "^4.6.0",
|
|
40
|
+
"@girs/gl-1.0": "^4.6.0" },
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"typescript": "*"
|
|
43
43
|
},
|