@girs/cogl-7 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-7.d.ts +211 -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-7 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-7
|
|
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-7` | the namespace as a default export, plus the ambient and global declarations |
|
|
26
|
+
| `@girs/cogl-7/ambient` | only the `gi://` module declarations |
|
|
27
|
+
| `@girs/cogl-7/import` | only the `imports.gi` declarations |
|
|
28
|
+
| `@girs/cogl-7/cogl-7` | 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-7';
|
|
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-7'
|
|
46
|
+
import '@girs/cogl-7';
|
|
32
47
|
```
|
|
33
48
|
|
|
34
|
-
`tsconfig.json`:
|
|
35
49
|
```json
|
|
36
|
-
{
|
|
37
|
-
"compilerOptions": {
|
|
38
|
-
...
|
|
39
|
-
},
|
|
40
|
-
"include": ["@girs/cogl-7"],
|
|
41
|
-
...
|
|
42
|
-
}
|
|
50
|
+
{ "include": ["@girs/cogl-7"] }
|
|
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=7';
|
|
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-7` or `@girs/cogl-7/import` in your `tsconfig` or entry point Typescript file:
|
|
59
|
+
Referencing `@girs/cogl-7/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-7'
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
`tsconfig.json`:
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"compilerOptions": {
|
|
65
|
-
...
|
|
66
|
-
},
|
|
67
|
-
"include": ["@girs/cogl-7"],
|
|
68
|
-
...
|
|
69
|
-
}
|
|
70
|
-
```
|
|
62
|
+
### As `imports.gi`
|
|
71
63
|
|
|
72
|
-
|
|
64
|
+
GJS's global object works the same way, via `@girs/cogl-7/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-7.d.ts
CHANGED
|
@@ -33,25 +33,25 @@ export namespace Cogl {
|
|
|
33
33
|
/**
|
|
34
34
|
* Data is the same size of a byte
|
|
35
35
|
*/
|
|
36
|
-
BYTE,
|
|
36
|
+
BYTE = 5120,
|
|
37
37
|
/**
|
|
38
38
|
* Data is the same size of an
|
|
39
39
|
* unsigned byte
|
|
40
40
|
*/
|
|
41
|
-
UNSIGNED_BYTE,
|
|
41
|
+
UNSIGNED_BYTE = 5121,
|
|
42
42
|
/**
|
|
43
43
|
* Data is the same size of a short integer
|
|
44
44
|
*/
|
|
45
|
-
SHORT,
|
|
45
|
+
SHORT = 5122,
|
|
46
46
|
/**
|
|
47
47
|
* Data is the same size of
|
|
48
48
|
* an unsigned short integer
|
|
49
49
|
*/
|
|
50
|
-
UNSIGNED_SHORT,
|
|
50
|
+
UNSIGNED_SHORT = 5123,
|
|
51
51
|
/**
|
|
52
52
|
* Data is the same size of a float
|
|
53
53
|
*/
|
|
54
|
-
FLOAT,
|
|
54
|
+
FLOAT = 5126,
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
|
|
@@ -69,15 +69,15 @@ export namespace Cogl {
|
|
|
69
69
|
* Generic failure code, something went
|
|
70
70
|
* wrong.
|
|
71
71
|
*/
|
|
72
|
-
FAILED,
|
|
72
|
+
FAILED = 0,
|
|
73
73
|
/**
|
|
74
74
|
* Unknown image type.
|
|
75
75
|
*/
|
|
76
|
-
UNKNOWN_TYPE,
|
|
76
|
+
UNKNOWN_TYPE = 1,
|
|
77
77
|
/**
|
|
78
78
|
* An image file was broken somehow.
|
|
79
79
|
*/
|
|
80
|
-
CORRUPT_IMAGE,
|
|
80
|
+
CORRUPT_IMAGE = 2,
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
|
|
@@ -90,20 +90,20 @@ export namespace Cogl {
|
|
|
90
90
|
/**
|
|
91
91
|
* Generic parse error
|
|
92
92
|
*/
|
|
93
|
-
PARSE_ERROR,
|
|
93
|
+
PARSE_ERROR = 0,
|
|
94
94
|
/**
|
|
95
95
|
* Argument parse error
|
|
96
96
|
*/
|
|
97
|
-
ARGUMENT_PARSE_ERROR,
|
|
97
|
+
ARGUMENT_PARSE_ERROR = 1,
|
|
98
98
|
/**
|
|
99
99
|
* Internal parser error
|
|
100
100
|
*/
|
|
101
|
-
INVALID_ERROR,
|
|
101
|
+
INVALID_ERROR = 2,
|
|
102
102
|
/**
|
|
103
103
|
* Blend string not
|
|
104
104
|
* supported by the GPU
|
|
105
105
|
*/
|
|
106
|
-
GPU_UNSUPPORTED_ERROR,
|
|
106
|
+
GPU_UNSUPPORTED_ERROR = 3,
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
|
|
@@ -121,41 +121,41 @@ export namespace Cogl {
|
|
|
121
121
|
/**
|
|
122
122
|
* Never passes.
|
|
123
123
|
*/
|
|
124
|
-
NEVER,
|
|
124
|
+
NEVER = 512,
|
|
125
125
|
/**
|
|
126
126
|
* Passes if the fragment's depth
|
|
127
127
|
* value is less than the value currently in the depth buffer.
|
|
128
128
|
*/
|
|
129
|
-
LESS,
|
|
129
|
+
LESS = 513,
|
|
130
130
|
/**
|
|
131
131
|
* Passes if the fragment's depth
|
|
132
132
|
* value is equal to the value currently in the depth buffer.
|
|
133
133
|
*/
|
|
134
|
-
EQUAL,
|
|
134
|
+
EQUAL = 514,
|
|
135
135
|
/**
|
|
136
136
|
* Passes if the fragment's depth
|
|
137
137
|
* value is less or equal to the value currently in the depth buffer.
|
|
138
138
|
*/
|
|
139
|
-
LEQUAL,
|
|
139
|
+
LEQUAL = 515,
|
|
140
140
|
/**
|
|
141
141
|
* Passes if the fragment's depth
|
|
142
142
|
* value is greater than the value currently in the depth buffer.
|
|
143
143
|
*/
|
|
144
|
-
GREATER,
|
|
144
|
+
GREATER = 516,
|
|
145
145
|
/**
|
|
146
146
|
* Passes if the fragment's depth
|
|
147
147
|
* value is not equal to the value currently in the depth buffer.
|
|
148
148
|
*/
|
|
149
|
-
NOTEQUAL,
|
|
149
|
+
NOTEQUAL = 517,
|
|
150
150
|
/**
|
|
151
151
|
* Passes if the fragment's depth
|
|
152
152
|
* value greater than or equal to the value currently in the depth buffer.
|
|
153
153
|
*/
|
|
154
|
-
GEQUAL,
|
|
154
|
+
GEQUAL = 518,
|
|
155
155
|
/**
|
|
156
156
|
* Always passes.
|
|
157
157
|
*/
|
|
158
|
-
ALWAYS,
|
|
158
|
+
ALWAYS = 519,
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
|
|
@@ -172,46 +172,46 @@ export namespace Cogl {
|
|
|
172
172
|
* {@link Cogl.IndicesType.INT} is supported in
|
|
173
173
|
* `cogl_indices_new()`.
|
|
174
174
|
*/
|
|
175
|
-
OGL_FEATURE_ID_UNSIGNED_INT_INDICES,
|
|
175
|
+
OGL_FEATURE_ID_UNSIGNED_INT_INDICES = 0,
|
|
176
176
|
/**
|
|
177
177
|
* Whether `cogl_buffer_map()` is
|
|
178
178
|
* supported with CoglBufferAccess including read support.
|
|
179
179
|
*/
|
|
180
|
-
OGL_FEATURE_ID_MAP_BUFFER_FOR_READ,
|
|
180
|
+
OGL_FEATURE_ID_MAP_BUFFER_FOR_READ = 1,
|
|
181
181
|
/**
|
|
182
182
|
* Whether `cogl_buffer_map()` is
|
|
183
183
|
* supported with CoglBufferAccess including write support.
|
|
184
184
|
*/
|
|
185
|
-
OGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE,
|
|
185
|
+
OGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE = 2,
|
|
186
186
|
/**
|
|
187
187
|
* Available if the window system supports reporting an event
|
|
188
188
|
* for swap buffer completions.
|
|
189
189
|
*/
|
|
190
|
-
OGL_FEATURE_ID_SWAP_BUFFERS_EVENT,
|
|
190
|
+
OGL_FEATURE_ID_SWAP_BUFFERS_EVENT = 3,
|
|
191
191
|
/**
|
|
192
192
|
* Whether frame presentation
|
|
193
193
|
* time stamps will be recorded in {@link Cogl.FrameInfo} objects.
|
|
194
194
|
*/
|
|
195
|
-
OGL_FEATURE_ID_PRESENTATION_TIME,
|
|
196
|
-
OGL_FEATURE_ID_FENCE,
|
|
195
|
+
OGL_FEATURE_ID_PRESENTATION_TIME = 4,
|
|
196
|
+
OGL_FEATURE_ID_FENCE = 5,
|
|
197
197
|
/**
|
|
198
198
|
* Support for
|
|
199
199
|
* {@link Cogl.TextureComponents.RG} as the internal components of a
|
|
200
200
|
* texture.
|
|
201
201
|
*/
|
|
202
|
-
OGL_FEATURE_ID_TEXTURE_RG,
|
|
202
|
+
OGL_FEATURE_ID_TEXTURE_RG = 6,
|
|
203
203
|
/**
|
|
204
204
|
* Available if the age of {@link Cogl.Onscreen} back
|
|
205
205
|
* buffers are tracked and so `cogl_onscreen_get_buffer_age()` can be
|
|
206
206
|
* expected to return age values other than 0.
|
|
207
207
|
*/
|
|
208
|
-
OGL_FEATURE_ID_BUFFER_AGE,
|
|
209
|
-
OGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL,
|
|
208
|
+
OGL_FEATURE_ID_BUFFER_AGE = 7,
|
|
209
|
+
OGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL = 8,
|
|
210
210
|
/**
|
|
211
211
|
* Whether blitting using
|
|
212
212
|
* `cogl_blit_framebuffer()` is supported.
|
|
213
213
|
*/
|
|
214
|
-
OGL_FEATURE_ID_BLIT_FRAMEBUFFER,
|
|
214
|
+
OGL_FEATURE_ID_BLIT_FRAMEBUFFER = 9,
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
|
|
@@ -224,11 +224,11 @@ export namespace Cogl {
|
|
|
224
224
|
* The event was not handled, continues the
|
|
225
225
|
* processing
|
|
226
226
|
*/
|
|
227
|
-
CONTINUE,
|
|
227
|
+
CONTINUE = 0,
|
|
228
228
|
/**
|
|
229
229
|
* Remove the event, stops the processing
|
|
230
230
|
*/
|
|
231
|
-
REMOVE,
|
|
231
|
+
REMOVE = 1,
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
|
|
@@ -256,7 +256,7 @@ export namespace Cogl {
|
|
|
256
256
|
* acknowledged a frame and is ready for a
|
|
257
257
|
* new frame to be created.
|
|
258
258
|
*/
|
|
259
|
-
SYNC,
|
|
259
|
+
SYNC = 1,
|
|
260
260
|
/**
|
|
261
261
|
* Notifies that a frame has ended. This
|
|
262
262
|
* is a good time for applications to
|
|
@@ -266,7 +266,7 @@ export namespace Cogl {
|
|
|
266
266
|
* events should be expected after a
|
|
267
267
|
* `COGL_FRAME_EVENT_COMPLETE` event.
|
|
268
268
|
*/
|
|
269
|
-
COMPLETE,
|
|
269
|
+
COMPLETE = 2,
|
|
270
270
|
}
|
|
271
271
|
|
|
272
272
|
|
|
@@ -274,7 +274,7 @@ export namespace Cogl {
|
|
|
274
274
|
* @gir-type Enum
|
|
275
275
|
*/
|
|
276
276
|
enum FramebufferError {
|
|
277
|
-
FRAMEBUFFER_ERROR_ALLOCATE,
|
|
277
|
+
FRAMEBUFFER_ERROR_ALLOCATE = 0,
|
|
278
278
|
}
|
|
279
279
|
|
|
280
280
|
|
|
@@ -286,11 +286,11 @@ export namespace Cogl {
|
|
|
286
286
|
* @gir-type Enum
|
|
287
287
|
*/
|
|
288
288
|
enum GraphicsResetStatus {
|
|
289
|
-
NO_ERROR,
|
|
290
|
-
GUILTY_CONTEXT_RESET,
|
|
291
|
-
INNOCENT_CONTEXT_RESET,
|
|
292
|
-
UNKNOWN_CONTEXT_RESET,
|
|
293
|
-
PURGED_CONTEXT_RESET,
|
|
289
|
+
NO_ERROR = 0,
|
|
290
|
+
GUILTY_CONTEXT_RESET = 1,
|
|
291
|
+
INNOCENT_CONTEXT_RESET = 2,
|
|
292
|
+
UNKNOWN_CONTEXT_RESET = 3,
|
|
293
|
+
PURGED_CONTEXT_RESET = 4,
|
|
294
294
|
}
|
|
295
295
|
|
|
296
296
|
|
|
@@ -310,15 +310,15 @@ export namespace Cogl {
|
|
|
310
310
|
/**
|
|
311
311
|
* Your indices are unsigned bytes
|
|
312
312
|
*/
|
|
313
|
-
BYTE,
|
|
313
|
+
BYTE = 0,
|
|
314
314
|
/**
|
|
315
315
|
* Your indices are unsigned shorts
|
|
316
316
|
*/
|
|
317
|
-
SHORT,
|
|
317
|
+
SHORT = 1,
|
|
318
318
|
/**
|
|
319
319
|
* Your indices are unsigned ints
|
|
320
320
|
*/
|
|
321
|
-
INT,
|
|
321
|
+
INT = 2,
|
|
322
322
|
}
|
|
323
323
|
|
|
324
324
|
|
|
@@ -333,41 +333,41 @@ export namespace Cogl {
|
|
|
333
333
|
/**
|
|
334
334
|
* Never let the fragment through.
|
|
335
335
|
*/
|
|
336
|
-
NEVER,
|
|
336
|
+
NEVER = 512,
|
|
337
337
|
/**
|
|
338
338
|
* Let the fragment through if the incoming
|
|
339
339
|
* alpha value is less than the reference alpha value
|
|
340
340
|
*/
|
|
341
|
-
LESS,
|
|
341
|
+
LESS = 513,
|
|
342
342
|
/**
|
|
343
343
|
* Let the fragment through if the incoming
|
|
344
344
|
* alpha value equals the reference alpha value
|
|
345
345
|
*/
|
|
346
|
-
EQUAL,
|
|
346
|
+
EQUAL = 514,
|
|
347
347
|
/**
|
|
348
348
|
* Let the fragment through if the incoming
|
|
349
349
|
* alpha value is less than or equal to the reference alpha value
|
|
350
350
|
*/
|
|
351
|
-
LEQUAL,
|
|
351
|
+
LEQUAL = 515,
|
|
352
352
|
/**
|
|
353
353
|
* Let the fragment through if the incoming
|
|
354
354
|
* alpha value is greater than the reference alpha value
|
|
355
355
|
*/
|
|
356
|
-
GREATER,
|
|
356
|
+
GREATER = 516,
|
|
357
357
|
/**
|
|
358
358
|
* Let the fragment through if the incoming
|
|
359
359
|
* alpha value does not equal the reference alpha value
|
|
360
360
|
*/
|
|
361
|
-
NOTEQUAL,
|
|
361
|
+
NOTEQUAL = 517,
|
|
362
362
|
/**
|
|
363
363
|
* Let the fragment through if the incoming
|
|
364
364
|
* alpha value is greater than or equal to the reference alpha value.
|
|
365
365
|
*/
|
|
366
|
-
GEQUAL,
|
|
366
|
+
GEQUAL = 518,
|
|
367
367
|
/**
|
|
368
368
|
* Always let the fragment through.
|
|
369
369
|
*/
|
|
370
|
-
ALWAYS,
|
|
370
|
+
ALWAYS = 519,
|
|
371
371
|
}
|
|
372
372
|
|
|
373
373
|
|
|
@@ -384,38 +384,38 @@ export namespace Cogl {
|
|
|
384
384
|
* Measuring in manhatten distance from the,
|
|
385
385
|
* current pixel center, use the nearest texture texel
|
|
386
386
|
*/
|
|
387
|
-
NEAREST,
|
|
387
|
+
NEAREST = 9728,
|
|
388
388
|
/**
|
|
389
389
|
* Use the weighted average of the 4 texels
|
|
390
390
|
* nearest the current pixel center
|
|
391
391
|
*/
|
|
392
|
-
LINEAR,
|
|
392
|
+
LINEAR = 9729,
|
|
393
393
|
/**
|
|
394
394
|
* Select the mimap level whose
|
|
395
395
|
* texel size most closely matches the current pixel, and use the
|
|
396
396
|
* {@link Cogl.MaterialFilter.NEAREST} criterion
|
|
397
397
|
*/
|
|
398
|
-
NEAREST_MIPMAP_NEAREST,
|
|
398
|
+
NEAREST_MIPMAP_NEAREST = 9984,
|
|
399
399
|
/**
|
|
400
400
|
* Select the mimap level whose
|
|
401
401
|
* texel size most closely matches the current pixel, and use the
|
|
402
402
|
* {@link Cogl.MaterialFilter.LINEAR} criterion
|
|
403
403
|
*/
|
|
404
|
-
LINEAR_MIPMAP_NEAREST,
|
|
404
|
+
LINEAR_MIPMAP_NEAREST = 9985,
|
|
405
405
|
/**
|
|
406
406
|
* Select the two mimap levels
|
|
407
407
|
* whose texel size most closely matches the current pixel, use
|
|
408
408
|
* the {@link Cogl.MaterialFilter.NEAREST} criterion on each one and take
|
|
409
409
|
* their weighted average
|
|
410
410
|
*/
|
|
411
|
-
NEAREST_MIPMAP_LINEAR,
|
|
411
|
+
NEAREST_MIPMAP_LINEAR = 9986,
|
|
412
412
|
/**
|
|
413
413
|
* Select the two mimap levels
|
|
414
414
|
* whose texel size most closely matches the current pixel, use
|
|
415
415
|
* the {@link Cogl.MaterialFilter.LINEAR} criterion on each one and take
|
|
416
416
|
* their weighted average
|
|
417
417
|
*/
|
|
418
|
-
LINEAR_MIPMAP_LINEAR,
|
|
418
|
+
LINEAR_MIPMAP_LINEAR = 9987,
|
|
419
419
|
}
|
|
420
420
|
|
|
421
421
|
|
|
@@ -436,14 +436,14 @@ export namespace Cogl {
|
|
|
436
436
|
* The texture will be repeated. This
|
|
437
437
|
* is useful for example to draw a tiled background.
|
|
438
438
|
*/
|
|
439
|
-
REPEAT,
|
|
439
|
+
REPEAT = 10497,
|
|
440
440
|
/**
|
|
441
441
|
* The coordinates outside the
|
|
442
442
|
* range 0→1 will sample copies of the edge pixels of the
|
|
443
443
|
* texture. This is useful to avoid artifacts if only one copy of
|
|
444
444
|
* the texture is being rendered.
|
|
445
445
|
*/
|
|
446
|
-
CLAMP_TO_EDGE,
|
|
446
|
+
CLAMP_TO_EDGE = 33071,
|
|
447
447
|
/**
|
|
448
448
|
* Cogl will try to automatically
|
|
449
449
|
* decide which of the above two to use. For `cogl_rectangle()`, it
|
|
@@ -454,7 +454,7 @@ export namespace Cogl {
|
|
|
454
454
|
* layers that have point sprite coordinate generation enabled. This
|
|
455
455
|
* is the default value.
|
|
456
456
|
*/
|
|
457
|
-
AUTOMATIC,
|
|
457
|
+
AUTOMATIC = 519,
|
|
458
458
|
}
|
|
459
459
|
|
|
460
460
|
|
|
@@ -469,41 +469,41 @@ export namespace Cogl {
|
|
|
469
469
|
/**
|
|
470
470
|
* Never let the fragment through.
|
|
471
471
|
*/
|
|
472
|
-
NEVER,
|
|
472
|
+
NEVER = 512,
|
|
473
473
|
/**
|
|
474
474
|
* Let the fragment through if the incoming
|
|
475
475
|
* alpha value is less than the reference alpha value
|
|
476
476
|
*/
|
|
477
|
-
LESS,
|
|
477
|
+
LESS = 513,
|
|
478
478
|
/**
|
|
479
479
|
* Let the fragment through if the incoming
|
|
480
480
|
* alpha value equals the reference alpha value
|
|
481
481
|
*/
|
|
482
|
-
EQUAL,
|
|
482
|
+
EQUAL = 514,
|
|
483
483
|
/**
|
|
484
484
|
* Let the fragment through if the incoming
|
|
485
485
|
* alpha value is less than or equal to the reference alpha value
|
|
486
486
|
*/
|
|
487
|
-
LEQUAL,
|
|
487
|
+
LEQUAL = 515,
|
|
488
488
|
/**
|
|
489
489
|
* Let the fragment through if the incoming
|
|
490
490
|
* alpha value is greater than the reference alpha value
|
|
491
491
|
*/
|
|
492
|
-
GREATER,
|
|
492
|
+
GREATER = 516,
|
|
493
493
|
/**
|
|
494
494
|
* Let the fragment through if the incoming
|
|
495
495
|
* alpha value does not equal the reference alpha value
|
|
496
496
|
*/
|
|
497
|
-
NOTEQUAL,
|
|
497
|
+
NOTEQUAL = 517,
|
|
498
498
|
/**
|
|
499
499
|
* Let the fragment through if the incoming
|
|
500
500
|
* alpha value is greater than or equal to the reference alpha value.
|
|
501
501
|
*/
|
|
502
|
-
GEQUAL,
|
|
502
|
+
GEQUAL = 518,
|
|
503
503
|
/**
|
|
504
504
|
* Always let the fragment through.
|
|
505
505
|
*/
|
|
506
|
-
ALWAYS,
|
|
506
|
+
ALWAYS = 519,
|
|
507
507
|
}
|
|
508
508
|
|
|
509
509
|
|
|
@@ -517,19 +517,19 @@ export namespace Cogl {
|
|
|
517
517
|
* Neither face will be
|
|
518
518
|
* culled. This is the default.
|
|
519
519
|
*/
|
|
520
|
-
NONE,
|
|
520
|
+
NONE = 0,
|
|
521
521
|
/**
|
|
522
522
|
* Front faces will be culled.
|
|
523
523
|
*/
|
|
524
|
-
FRONT,
|
|
524
|
+
FRONT = 1,
|
|
525
525
|
/**
|
|
526
526
|
* Back faces will be culled.
|
|
527
527
|
*/
|
|
528
|
-
BACK,
|
|
528
|
+
BACK = 2,
|
|
529
529
|
/**
|
|
530
530
|
* All faces will be culled.
|
|
531
531
|
*/
|
|
532
|
-
BOTH,
|
|
532
|
+
BOTH = 3,
|
|
533
533
|
}
|
|
534
534
|
|
|
535
535
|
|
|
@@ -546,38 +546,38 @@ export namespace Cogl {
|
|
|
546
546
|
* Measuring in manhatten distance from the,
|
|
547
547
|
* current pixel center, use the nearest texture texel
|
|
548
548
|
*/
|
|
549
|
-
NEAREST,
|
|
549
|
+
NEAREST = 9728,
|
|
550
550
|
/**
|
|
551
551
|
* Use the weighted average of the 4 texels
|
|
552
552
|
* nearest the current pixel center
|
|
553
553
|
*/
|
|
554
|
-
LINEAR,
|
|
554
|
+
LINEAR = 9729,
|
|
555
555
|
/**
|
|
556
556
|
* Select the mimap level whose
|
|
557
557
|
* texel size most closely matches the current pixel, and use the
|
|
558
558
|
* {@link Cogl.PipelineFilter.NEAREST} criterion
|
|
559
559
|
*/
|
|
560
|
-
NEAREST_MIPMAP_NEAREST,
|
|
560
|
+
NEAREST_MIPMAP_NEAREST = 9984,
|
|
561
561
|
/**
|
|
562
562
|
* Select the mimap level whose
|
|
563
563
|
* texel size most closely matches the current pixel, and use the
|
|
564
564
|
* {@link Cogl.PipelineFilter.LINEAR} criterion
|
|
565
565
|
*/
|
|
566
|
-
LINEAR_MIPMAP_NEAREST,
|
|
566
|
+
LINEAR_MIPMAP_NEAREST = 9985,
|
|
567
567
|
/**
|
|
568
568
|
* Select the two mimap levels
|
|
569
569
|
* whose texel size most closely matches the current pixel, use
|
|
570
570
|
* the {@link Cogl.PipelineFilter.NEAREST} criterion on each one and take
|
|
571
571
|
* their weighted average
|
|
572
572
|
*/
|
|
573
|
-
NEAREST_MIPMAP_LINEAR,
|
|
573
|
+
NEAREST_MIPMAP_LINEAR = 9986,
|
|
574
574
|
/**
|
|
575
575
|
* Select the two mimap levels
|
|
576
576
|
* whose texel size most closely matches the current pixel, use
|
|
577
577
|
* the {@link Cogl.PipelineFilter.LINEAR} criterion on each one and take
|
|
578
578
|
* their weighted average
|
|
579
579
|
*/
|
|
580
|
-
LINEAR_MIPMAP_LINEAR,
|
|
580
|
+
LINEAR_MIPMAP_LINEAR = 9987,
|
|
581
581
|
}
|
|
582
582
|
|
|
583
583
|
|
|
@@ -598,15 +598,15 @@ export namespace Cogl {
|
|
|
598
598
|
* The texture will be repeated. This
|
|
599
599
|
* is useful for example to draw a tiled background.
|
|
600
600
|
*/
|
|
601
|
-
REPEAT,
|
|
602
|
-
MIRRORED_REPEAT,
|
|
601
|
+
REPEAT = 10497,
|
|
602
|
+
MIRRORED_REPEAT = 33648,
|
|
603
603
|
/**
|
|
604
604
|
* The coordinates outside the
|
|
605
605
|
* range 0→1 will sample copies of the edge pixels of the
|
|
606
606
|
* texture. This is useful to avoid artifacts if only one copy of
|
|
607
607
|
* the texture is being rendered.
|
|
608
608
|
*/
|
|
609
|
-
CLAMP_TO_EDGE,
|
|
609
|
+
CLAMP_TO_EDGE = 33071,
|
|
610
610
|
/**
|
|
611
611
|
* Cogl will try to automatically
|
|
612
612
|
* decide which of the above two to use. For `cogl_rectangle()`, it
|
|
@@ -617,7 +617,7 @@ export namespace Cogl {
|
|
|
617
617
|
* layers that have point sprite coordinate generation enabled. This
|
|
618
618
|
* is the default value.
|
|
619
619
|
*/
|
|
620
|
-
AUTOMATIC,
|
|
620
|
+
AUTOMATIC = 519,
|
|
621
621
|
}
|
|
622
622
|
|
|
623
623
|
|
|
@@ -625,8 +625,8 @@ export namespace Cogl {
|
|
|
625
625
|
* @gir-type Enum
|
|
626
626
|
*/
|
|
627
627
|
enum RendererError {
|
|
628
|
-
XLIB_DISPLAY_OPEN,
|
|
629
|
-
BAD_CONSTRAINT,
|
|
628
|
+
XLIB_DISPLAY_OPEN = 0,
|
|
629
|
+
BAD_CONSTRAINT = 1,
|
|
630
630
|
}
|
|
631
631
|
|
|
632
632
|
|
|
@@ -639,11 +639,11 @@ export namespace Cogl {
|
|
|
639
639
|
/**
|
|
640
640
|
* A program for processing vertices
|
|
641
641
|
*/
|
|
642
|
-
VERTEX,
|
|
642
|
+
VERTEX = 0,
|
|
643
643
|
/**
|
|
644
644
|
* A program for processing fragments
|
|
645
645
|
*/
|
|
646
|
-
FRAGMENT,
|
|
646
|
+
FRAGMENT = 1,
|
|
647
647
|
}
|
|
648
648
|
|
|
649
649
|
|
|
@@ -656,15 +656,15 @@ export namespace Cogl {
|
|
|
656
656
|
/**
|
|
657
657
|
* draw to both stereo buffers
|
|
658
658
|
*/
|
|
659
|
-
BOTH,
|
|
659
|
+
BOTH = 0,
|
|
660
660
|
/**
|
|
661
661
|
* draw only to the left stereo buffer
|
|
662
662
|
*/
|
|
663
|
-
LEFT,
|
|
663
|
+
LEFT = 1,
|
|
664
664
|
/**
|
|
665
665
|
* draw only to the left stereo buffer
|
|
666
666
|
*/
|
|
667
|
-
RIGHT,
|
|
667
|
+
RIGHT = 2,
|
|
668
668
|
}
|
|
669
669
|
|
|
670
670
|
|
|
@@ -694,12 +694,12 @@ export namespace Cogl {
|
|
|
694
694
|
* You tried to use a feature or
|
|
695
695
|
* configuration not currently available.
|
|
696
696
|
*/
|
|
697
|
-
UNSUPPORTED,
|
|
697
|
+
UNSUPPORTED = 0,
|
|
698
698
|
/**
|
|
699
699
|
* You tried to allocate a resource
|
|
700
700
|
* such as a texture and there wasn't enough memory.
|
|
701
701
|
*/
|
|
702
|
-
NO_MEMORY,
|
|
702
|
+
NO_MEMORY = 1,
|
|
703
703
|
}
|
|
704
704
|
|
|
705
705
|
|
|
@@ -712,25 +712,25 @@ export namespace Cogl {
|
|
|
712
712
|
/**
|
|
713
713
|
* Only the alpha component
|
|
714
714
|
*/
|
|
715
|
-
A,
|
|
715
|
+
A = 1,
|
|
716
716
|
/**
|
|
717
717
|
* Red and green components. Note that
|
|
718
718
|
* this can only be used if the {@link Cogl.FeatureID.OGL_FEATURE_ID_TEXTURE_RG} feature
|
|
719
719
|
* is advertised.
|
|
720
720
|
*/
|
|
721
|
-
RG,
|
|
721
|
+
RG = 2,
|
|
722
722
|
/**
|
|
723
723
|
* Red, green and blue components
|
|
724
724
|
*/
|
|
725
|
-
RGB,
|
|
725
|
+
RGB = 3,
|
|
726
726
|
/**
|
|
727
727
|
* Red, green, blue and alpha components
|
|
728
728
|
*/
|
|
729
|
-
RGBA,
|
|
729
|
+
RGBA = 4,
|
|
730
730
|
/**
|
|
731
731
|
* Only a depth component
|
|
732
732
|
*/
|
|
733
|
-
DEPTH,
|
|
733
|
+
DEPTH = 5,
|
|
734
734
|
}
|
|
735
735
|
|
|
736
736
|
|
|
@@ -743,17 +743,17 @@ export namespace Cogl {
|
|
|
743
743
|
/**
|
|
744
744
|
* Unsupported size
|
|
745
745
|
*/
|
|
746
|
-
SIZE,
|
|
746
|
+
SIZE = 0,
|
|
747
747
|
/**
|
|
748
748
|
* Unsupported format
|
|
749
749
|
*/
|
|
750
|
-
FORMAT,
|
|
751
|
-
BAD_PARAMETER,
|
|
750
|
+
FORMAT = 1,
|
|
751
|
+
BAD_PARAMETER = 2,
|
|
752
752
|
/**
|
|
753
753
|
* A primitive texture type that is
|
|
754
754
|
* unsupported by the driver was used
|
|
755
755
|
*/
|
|
756
|
-
TYPE,
|
|
756
|
+
TYPE = 3,
|
|
757
757
|
}
|
|
758
758
|
|
|
759
759
|
|
|
@@ -767,35 +767,35 @@ export namespace Cogl {
|
|
|
767
767
|
* FIXME, equivalent to
|
|
768
768
|
* <constant>GL_POINTS</constant>
|
|
769
769
|
*/
|
|
770
|
-
POINTS,
|
|
770
|
+
POINTS = 0,
|
|
771
771
|
/**
|
|
772
772
|
* FIXME, equivalent to <constant>GL_LINES</constant>
|
|
773
773
|
*/
|
|
774
|
-
LINES,
|
|
774
|
+
LINES = 1,
|
|
775
775
|
/**
|
|
776
776
|
* FIXME, equivalent to
|
|
777
777
|
* <constant>GL_LINE_LOOP</constant>
|
|
778
778
|
*/
|
|
779
|
-
LINE_LOOP,
|
|
779
|
+
LINE_LOOP = 2,
|
|
780
780
|
/**
|
|
781
781
|
* FIXME, equivalent to
|
|
782
782
|
* <constant>GL_LINE_STRIP</constant>
|
|
783
783
|
*/
|
|
784
|
-
LINE_STRIP,
|
|
784
|
+
LINE_STRIP = 3,
|
|
785
785
|
/**
|
|
786
786
|
* FIXME, equivalent to
|
|
787
787
|
* <constant>GL_TRIANGLES</constant>
|
|
788
788
|
*/
|
|
789
|
-
TRIANGLES,
|
|
789
|
+
TRIANGLES = 4,
|
|
790
790
|
/**
|
|
791
791
|
* FIXME, equivalent to
|
|
792
792
|
* <constant>GL_TRIANGLE_STRIP</constant>
|
|
793
793
|
*/
|
|
794
|
-
TRIANGLE_STRIP,
|
|
794
|
+
TRIANGLE_STRIP = 5,
|
|
795
795
|
/**
|
|
796
796
|
* FIXME, equivalent to <constant>GL_TRIANGLE_FAN</constant>
|
|
797
797
|
*/
|
|
798
|
-
TRIANGLE_FAN,
|
|
798
|
+
TRIANGLE_FAN = 6,
|
|
799
799
|
}
|
|
800
800
|
|
|
801
801
|
|
|
@@ -809,11 +809,11 @@ export namespace Cogl {
|
|
|
809
809
|
/**
|
|
810
810
|
* Vertices are in a clockwise order
|
|
811
811
|
*/
|
|
812
|
-
CLOCKWISE,
|
|
812
|
+
CLOCKWISE = 0,
|
|
813
813
|
/**
|
|
814
814
|
* Vertices are in a counter-clockwise order
|
|
815
815
|
*/
|
|
816
|
-
COUNTER_CLOCKWISE,
|
|
816
|
+
COUNTER_CLOCKWISE = 1,
|
|
817
817
|
}
|
|
818
818
|
|
|
819
819
|
|
|
@@ -821,38 +821,60 @@ export namespace Cogl {
|
|
|
821
821
|
* @gir-type Enum
|
|
822
822
|
*/
|
|
823
823
|
enum WinsysFeature {
|
|
824
|
-
MULTIPLE_ONSCREEN,
|
|
825
|
-
VBLANK_COUNTER,
|
|
826
|
-
VBLANK_WAIT,
|
|
827
|
-
TEXTURE_FROM_PIXMAP,
|
|
828
|
-
SWAP_BUFFERS_EVENT,
|
|
829
|
-
SWAP_REGION,
|
|
830
|
-
SWAP_REGION_THROTTLE,
|
|
831
|
-
SWAP_REGION_SYNCHRONIZED,
|
|
832
|
-
BUFFER_AGE,
|
|
833
|
-
SYNC_AND_COMPLETE_EVENT,
|
|
834
|
-
N_FEATURES,
|
|
824
|
+
MULTIPLE_ONSCREEN = 0,
|
|
825
|
+
VBLANK_COUNTER = 1,
|
|
826
|
+
VBLANK_WAIT = 2,
|
|
827
|
+
TEXTURE_FROM_PIXMAP = 3,
|
|
828
|
+
SWAP_BUFFERS_EVENT = 4,
|
|
829
|
+
SWAP_REGION = 5,
|
|
830
|
+
SWAP_REGION_THROTTLE = 6,
|
|
831
|
+
SWAP_REGION_SYNCHRONIZED = 7,
|
|
832
|
+
BUFFER_AGE = 8,
|
|
833
|
+
SYNC_AND_COMPLETE_EVENT = 9,
|
|
834
|
+
N_FEATURES = 10,
|
|
835
835
|
}
|
|
836
836
|
|
|
837
837
|
|
|
838
|
+
/**
|
|
839
|
+
* @default 64
|
|
840
|
+
*/
|
|
838
841
|
const AFIRST_BIT: number;
|
|
839
842
|
|
|
843
|
+
/**
|
|
844
|
+
* @default 16
|
|
845
|
+
*/
|
|
840
846
|
const A_BIT: number;
|
|
841
847
|
|
|
848
|
+
/**
|
|
849
|
+
* @default 32
|
|
850
|
+
*/
|
|
842
851
|
const BGR_BIT: number;
|
|
843
852
|
|
|
853
|
+
/**
|
|
854
|
+
* @default 256
|
|
855
|
+
*/
|
|
844
856
|
const DEPTH_BIT: number;
|
|
845
857
|
|
|
846
858
|
/**
|
|
847
859
|
* The maximum number of planes of a pixel format (see also
|
|
848
860
|
* `cogl_pixel_format_get_planes()`).
|
|
861
|
+
* @default 4
|
|
849
862
|
*/
|
|
850
863
|
const PIXEL_FORMAT_MAX_PLANES: number;
|
|
851
864
|
|
|
865
|
+
/**
|
|
866
|
+
* @default 128
|
|
867
|
+
*/
|
|
852
868
|
const PREMULT_BIT: number;
|
|
853
869
|
|
|
870
|
+
/**
|
|
871
|
+
* @default 512
|
|
872
|
+
*/
|
|
854
873
|
const STENCIL_BIT: number;
|
|
855
874
|
|
|
875
|
+
/**
|
|
876
|
+
* @default 127
|
|
877
|
+
*/
|
|
856
878
|
const TEXTURE_MAX_WASTE: number;
|
|
857
879
|
|
|
858
880
|
function blend_string_error_quark(): number;
|
|
@@ -905,6 +927,7 @@ export namespace Cogl {
|
|
|
905
927
|
* @param dst_y Destination y position
|
|
906
928
|
* @param width Width of region to copy
|
|
907
929
|
* @param height Height of region to copy
|
|
930
|
+
* @throws GLib.Error
|
|
908
931
|
*/
|
|
909
932
|
function blit_framebuffer(src: Framebuffer, dest: Framebuffer, src_x: number, src_y: number, dst_x: number, dst_y: number, width: number, height: number): boolean;
|
|
910
933
|
|
|
@@ -1409,6 +1432,7 @@ export namespace Cogl {
|
|
|
1409
1432
|
* @returns A newly created {@link Cogl.Texture} or `null` on failure
|
|
1410
1433
|
* @since 0.8
|
|
1411
1434
|
* @deprecated since 1.18: Use specific constructors such as `cogl_texture_2d_new_from_file()`
|
|
1435
|
+
* @throws GLib.Error
|
|
1412
1436
|
*/
|
|
1413
1437
|
function texture_new_from_file(filename: string, flags: TextureFlags, internal_format: PixelFormat): Texture;
|
|
1414
1438
|
|
|
@@ -1502,15 +1526,15 @@ export namespace Cogl {
|
|
|
1502
1526
|
/**
|
|
1503
1527
|
* Selects the primary color buffer
|
|
1504
1528
|
*/
|
|
1505
|
-
COLOR,
|
|
1529
|
+
COLOR = 1,
|
|
1506
1530
|
/**
|
|
1507
1531
|
* Selects the depth buffer
|
|
1508
1532
|
*/
|
|
1509
|
-
DEPTH,
|
|
1533
|
+
DEPTH = 2,
|
|
1510
1534
|
/**
|
|
1511
1535
|
* Selects the stencil buffer
|
|
1512
1536
|
*/
|
|
1513
|
-
STENCIL,
|
|
1537
|
+
STENCIL = 4,
|
|
1514
1538
|
}
|
|
1515
1539
|
|
|
1516
1540
|
|
|
@@ -1523,11 +1547,11 @@ export namespace Cogl {
|
|
|
1523
1547
|
/**
|
|
1524
1548
|
* FIXME
|
|
1525
1549
|
*/
|
|
1526
|
-
WINDOW_BUFFER,
|
|
1550
|
+
WINDOW_BUFFER = 2,
|
|
1527
1551
|
/**
|
|
1528
1552
|
* FIXME
|
|
1529
1553
|
*/
|
|
1530
|
-
OFFSCREEN_BUFFER,
|
|
1554
|
+
OFFSCREEN_BUFFER = 4,
|
|
1531
1555
|
}
|
|
1532
1556
|
|
|
1533
1557
|
|
|
@@ -1535,8 +1559,8 @@ export namespace Cogl {
|
|
|
1535
1559
|
* @gir-type Flags
|
|
1536
1560
|
*/
|
|
1537
1561
|
enum EglImageFlags {
|
|
1538
|
-
NONE,
|
|
1539
|
-
NO_GET_DATA,
|
|
1562
|
+
NONE = 0,
|
|
1563
|
+
NO_GET_DATA = 1,
|
|
1540
1564
|
}
|
|
1541
1565
|
|
|
1542
1566
|
|
|
@@ -1566,152 +1590,152 @@ export namespace Cogl {
|
|
|
1566
1590
|
/**
|
|
1567
1591
|
* Any format
|
|
1568
1592
|
*/
|
|
1569
|
-
ANY,
|
|
1593
|
+
ANY = 0,
|
|
1570
1594
|
/**
|
|
1571
1595
|
* 8 bits alpha mask
|
|
1572
1596
|
*/
|
|
1573
|
-
A_8,
|
|
1597
|
+
A_8 = 17,
|
|
1574
1598
|
/**
|
|
1575
1599
|
* RGB, 16 bits
|
|
1576
1600
|
*/
|
|
1577
|
-
RGB_565,
|
|
1601
|
+
RGB_565 = 4,
|
|
1578
1602
|
/**
|
|
1579
1603
|
* RGBA, 16 bits
|
|
1580
1604
|
*/
|
|
1581
|
-
RGBA_4444,
|
|
1605
|
+
RGBA_4444 = 21,
|
|
1582
1606
|
/**
|
|
1583
1607
|
* RGBA, 16 bits
|
|
1584
1608
|
*/
|
|
1585
|
-
RGBA_5551,
|
|
1609
|
+
RGBA_5551 = 22,
|
|
1586
1610
|
/**
|
|
1587
1611
|
* Not currently supported
|
|
1588
1612
|
*/
|
|
1589
|
-
YUV,
|
|
1613
|
+
YUV = 7,
|
|
1590
1614
|
/**
|
|
1591
1615
|
* Single luminance component
|
|
1592
1616
|
*/
|
|
1593
|
-
G_8,
|
|
1617
|
+
G_8 = 8,
|
|
1594
1618
|
/**
|
|
1595
1619
|
* RG, 16 bits. Note that red-green textures
|
|
1596
1620
|
* are only available if {@link Cogl.FeatureID.OGL_FEATURE_ID_TEXTURE_RG} is advertised.
|
|
1597
1621
|
* See `cogl_texture_set_components()` for details.
|
|
1598
1622
|
*/
|
|
1599
|
-
RG_88,
|
|
1623
|
+
RG_88 = 9,
|
|
1600
1624
|
/**
|
|
1601
1625
|
* RGB, 24 bits
|
|
1602
1626
|
*/
|
|
1603
|
-
RGB_888,
|
|
1627
|
+
RGB_888 = 2,
|
|
1604
1628
|
/**
|
|
1605
1629
|
* BGR, 24 bits
|
|
1606
1630
|
*/
|
|
1607
|
-
BGR_888,
|
|
1631
|
+
BGR_888 = 34,
|
|
1608
1632
|
/**
|
|
1609
1633
|
* RGBA, 32 bits
|
|
1610
1634
|
*/
|
|
1611
|
-
RGBA_8888,
|
|
1635
|
+
RGBA_8888 = 19,
|
|
1612
1636
|
/**
|
|
1613
1637
|
* BGRA, 32 bits
|
|
1614
1638
|
*/
|
|
1615
|
-
BGRA_8888,
|
|
1639
|
+
BGRA_8888 = 51,
|
|
1616
1640
|
/**
|
|
1617
1641
|
* ARGB, 32 bits
|
|
1618
1642
|
*/
|
|
1619
|
-
ARGB_8888,
|
|
1643
|
+
ARGB_8888 = 83,
|
|
1620
1644
|
/**
|
|
1621
1645
|
* ABGR, 32 bits
|
|
1622
1646
|
*/
|
|
1623
|
-
ABGR_8888,
|
|
1647
|
+
ABGR_8888 = 115,
|
|
1624
1648
|
/**
|
|
1625
1649
|
* RGBA, 32 bits, 10 bpc
|
|
1626
1650
|
*/
|
|
1627
|
-
RGBA_1010102,
|
|
1651
|
+
RGBA_1010102 = 29,
|
|
1628
1652
|
/**
|
|
1629
1653
|
* BGRA, 32 bits, 10 bpc
|
|
1630
1654
|
*/
|
|
1631
|
-
BGRA_1010102,
|
|
1655
|
+
BGRA_1010102 = 61,
|
|
1632
1656
|
/**
|
|
1633
1657
|
* ARGB, 32 bits, 10 bpc
|
|
1634
1658
|
*/
|
|
1635
|
-
ARGB_2101010,
|
|
1659
|
+
ARGB_2101010 = 93,
|
|
1636
1660
|
/**
|
|
1637
1661
|
* ABGR, 32 bits, 10 bpc
|
|
1638
1662
|
*/
|
|
1639
|
-
ABGR_2101010,
|
|
1663
|
+
ABGR_2101010 = 125,
|
|
1640
1664
|
/**
|
|
1641
1665
|
* RGBA half floating point, 64 bit
|
|
1642
1666
|
*/
|
|
1643
|
-
RGBA_FP_16161616,
|
|
1667
|
+
RGBA_FP_16161616 = 27,
|
|
1644
1668
|
/**
|
|
1645
1669
|
* BGRA half floating point, 64 bit
|
|
1646
1670
|
*/
|
|
1647
|
-
BGRA_FP_16161616,
|
|
1671
|
+
BGRA_FP_16161616 = 59,
|
|
1648
1672
|
/**
|
|
1649
1673
|
* ARGB half floating point, 64 bit
|
|
1650
1674
|
*/
|
|
1651
|
-
ARGB_FP_16161616,
|
|
1675
|
+
ARGB_FP_16161616 = 91,
|
|
1652
1676
|
/**
|
|
1653
1677
|
* ABGR half floating point, 64 bit
|
|
1654
1678
|
*/
|
|
1655
|
-
ABGR_FP_16161616,
|
|
1679
|
+
ABGR_FP_16161616 = 123,
|
|
1656
1680
|
/**
|
|
1657
1681
|
* Premultiplied RGBA, 32 bits
|
|
1658
1682
|
*/
|
|
1659
|
-
RGBA_8888_PRE,
|
|
1683
|
+
RGBA_8888_PRE = 147,
|
|
1660
1684
|
/**
|
|
1661
1685
|
* Premultiplied BGRA, 32 bits
|
|
1662
1686
|
*/
|
|
1663
|
-
BGRA_8888_PRE,
|
|
1687
|
+
BGRA_8888_PRE = 179,
|
|
1664
1688
|
/**
|
|
1665
1689
|
* Premultiplied ARGB, 32 bits
|
|
1666
1690
|
*/
|
|
1667
|
-
ARGB_8888_PRE,
|
|
1691
|
+
ARGB_8888_PRE = 211,
|
|
1668
1692
|
/**
|
|
1669
1693
|
* Premultiplied ABGR, 32 bits
|
|
1670
1694
|
*/
|
|
1671
|
-
ABGR_8888_PRE,
|
|
1695
|
+
ABGR_8888_PRE = 243,
|
|
1672
1696
|
/**
|
|
1673
1697
|
* Premultiplied RGBA, 16 bits
|
|
1674
1698
|
*/
|
|
1675
|
-
RGBA_4444_PRE,
|
|
1699
|
+
RGBA_4444_PRE = 149,
|
|
1676
1700
|
/**
|
|
1677
1701
|
* Premultiplied RGBA, 16 bits
|
|
1678
1702
|
*/
|
|
1679
|
-
RGBA_5551_PRE,
|
|
1703
|
+
RGBA_5551_PRE = 150,
|
|
1680
1704
|
/**
|
|
1681
1705
|
* Premultiplied RGBA, 32 bits, 10 bpc
|
|
1682
1706
|
*/
|
|
1683
|
-
RGBA_1010102_PRE,
|
|
1707
|
+
RGBA_1010102_PRE = 157,
|
|
1684
1708
|
/**
|
|
1685
1709
|
* Premultiplied BGRA, 32 bits, 10 bpc
|
|
1686
1710
|
*/
|
|
1687
|
-
BGRA_1010102_PRE,
|
|
1711
|
+
BGRA_1010102_PRE = 189,
|
|
1688
1712
|
/**
|
|
1689
1713
|
* Premultiplied ARGB, 32 bits, 10 bpc
|
|
1690
1714
|
*/
|
|
1691
|
-
ARGB_2101010_PRE,
|
|
1715
|
+
ARGB_2101010_PRE = 221,
|
|
1692
1716
|
/**
|
|
1693
1717
|
* Premultiplied ABGR, 32 bits, 10 bpc
|
|
1694
1718
|
*/
|
|
1695
|
-
ABGR_2101010_PRE,
|
|
1719
|
+
ABGR_2101010_PRE = 253,
|
|
1696
1720
|
/**
|
|
1697
1721
|
* Premultiplied RGBA half floating point, 64 bit
|
|
1698
1722
|
*/
|
|
1699
|
-
RGBA_FP_16161616_PRE,
|
|
1723
|
+
RGBA_FP_16161616_PRE = 155,
|
|
1700
1724
|
/**
|
|
1701
1725
|
* Premultiplied BGRA half floating point, 64 bit
|
|
1702
1726
|
*/
|
|
1703
|
-
BGRA_FP_16161616_PRE,
|
|
1727
|
+
BGRA_FP_16161616_PRE = 187,
|
|
1704
1728
|
/**
|
|
1705
1729
|
* Premultiplied ARGB half floating point, 64 bit
|
|
1706
1730
|
*/
|
|
1707
|
-
ARGB_FP_16161616_PRE,
|
|
1731
|
+
ARGB_FP_16161616_PRE = 219,
|
|
1708
1732
|
/**
|
|
1709
1733
|
* Premultiplied ABGR half floating point, 64 bit
|
|
1710
1734
|
*/
|
|
1711
|
-
ABGR_FP_16161616_PRE,
|
|
1712
|
-
DEPTH_16,
|
|
1713
|
-
DEPTH_32,
|
|
1714
|
-
DEPTH_24_STENCIL_8,
|
|
1735
|
+
ABGR_FP_16161616_PRE = 251,
|
|
1736
|
+
DEPTH_16 = 265,
|
|
1737
|
+
DEPTH_32 = 259,
|
|
1738
|
+
DEPTH_24_STENCIL_8 = 771,
|
|
1715
1739
|
}
|
|
1716
1740
|
|
|
1717
1741
|
|
|
@@ -1724,7 +1748,7 @@ export namespace Cogl {
|
|
|
1724
1748
|
/**
|
|
1725
1749
|
* Read from the color buffer
|
|
1726
1750
|
*/
|
|
1727
|
-
READ_PIXELS_COLOR_BUFFER,
|
|
1751
|
+
READ_PIXELS_COLOR_BUFFER = 1,
|
|
1728
1752
|
}
|
|
1729
1753
|
|
|
1730
1754
|
|
|
@@ -1737,7 +1761,7 @@ export namespace Cogl {
|
|
|
1737
1761
|
/**
|
|
1738
1762
|
* No flags specified
|
|
1739
1763
|
*/
|
|
1740
|
-
NONE,
|
|
1764
|
+
NONE = 0,
|
|
1741
1765
|
/**
|
|
1742
1766
|
* Disables the automatic generation of
|
|
1743
1767
|
* the mipmap pyramid from the base level image whenever it is
|
|
@@ -1745,16 +1769,16 @@ export namespace Cogl {
|
|
|
1745
1769
|
* rendered with a mipmap filter so it should be free to leave out
|
|
1746
1770
|
* this flag when using other filtering modes
|
|
1747
1771
|
*/
|
|
1748
|
-
NO_AUTO_MIPMAP,
|
|
1772
|
+
NO_AUTO_MIPMAP = 1,
|
|
1749
1773
|
/**
|
|
1750
1774
|
* Disables the slicing of the texture
|
|
1751
1775
|
*/
|
|
1752
|
-
NO_SLICING,
|
|
1776
|
+
NO_SLICING = 2,
|
|
1753
1777
|
/**
|
|
1754
1778
|
* Disables the insertion of the texture inside
|
|
1755
1779
|
* the texture atlas used by Cogl
|
|
1756
1780
|
*/
|
|
1757
|
-
NO_ATLAS,
|
|
1781
|
+
NO_ATLAS = 4,
|
|
1758
1782
|
}
|
|
1759
1783
|
|
|
1760
1784
|
|
|
@@ -2018,6 +2042,7 @@ export namespace Cogl {
|
|
|
2018
2042
|
* automatic allocation.</note>
|
|
2019
2043
|
* @returns `true` if there were no error allocating the framebuffer, else `false`.
|
|
2020
2044
|
* @since 1.8
|
|
2045
|
+
* @throws GLib.Error
|
|
2021
2046
|
*/
|
|
2022
2047
|
allocate(): boolean;
|
|
2023
2048
|
|
|
@@ -3199,6 +3224,7 @@ export namespace Cogl {
|
|
|
3199
3224
|
* automatic allocation.</note>
|
|
3200
3225
|
* @returns `true` if there were no error allocating the framebuffer, else `false`.
|
|
3201
3226
|
* @since 1.8
|
|
3227
|
+
* @throws GLib.Error
|
|
3202
3228
|
*/
|
|
3203
3229
|
allocate(): boolean;
|
|
3204
3230
|
|
|
@@ -4282,6 +4308,7 @@ export namespace Cogl {
|
|
|
4282
4308
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired blend function.
|
|
4283
4309
|
* @returns `true` if the blend string was successfully parsed, and the described blending is supported by the underlying driver/hardware. If there was an error, `false` is returned and `error` is set accordingly (if present).
|
|
4284
4310
|
* @since 2.0
|
|
4311
|
+
* @throws GLib.Error
|
|
4285
4312
|
*/
|
|
4286
4313
|
set_blend(blend_string: string): boolean;
|
|
4287
4314
|
|
|
@@ -4447,6 +4474,7 @@ export namespace Cogl {
|
|
|
4447
4474
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired texture combine function.
|
|
4448
4475
|
* @returns `true` if the blend string was successfully parsed, and the described texture combining is supported by the underlying driver and or hardware. On failure, `false` is returned and `error` is set
|
|
4449
4476
|
* @since 2.0
|
|
4477
|
+
* @throws GLib.Error
|
|
4450
4478
|
*/
|
|
4451
4479
|
set_layer_combine(layer_index: number, blend_string: string): boolean;
|
|
4452
4480
|
|
|
@@ -4514,6 +4542,7 @@ export namespace Cogl {
|
|
|
4514
4542
|
* @param enable whether to enable point sprite coord generation.
|
|
4515
4543
|
* @returns `true` if the function succeeds, `false` otherwise.
|
|
4516
4544
|
* @since 2.0
|
|
4545
|
+
* @throws GLib.Error
|
|
4517
4546
|
*/
|
|
4518
4547
|
set_layer_point_sprite_coords_enabled(layer_index: number, enable: boolean): boolean;
|
|
4519
4548
|
|
|
@@ -4564,6 +4593,7 @@ export namespace Cogl {
|
|
|
4564
4593
|
* @param enable whether to enable per-vertex point size
|
|
4565
4594
|
* @returns `true` if the change succeeded or `false` otherwise
|
|
4566
4595
|
* @since 2.0
|
|
4596
|
+
* @throws GLib.Error
|
|
4567
4597
|
*/
|
|
4568
4598
|
set_per_vertex_point_size(enable: boolean): boolean;
|
|
4569
4599
|
|
|
@@ -4781,6 +4811,7 @@ export namespace Cogl {
|
|
|
4781
4811
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
4782
4812
|
* framebuffer and rendered too.</note>
|
|
4783
4813
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
4814
|
+
* @throws GLib.Error
|
|
4784
4815
|
*/
|
|
4785
4816
|
allocate(): boolean;
|
|
4786
4817
|
|
|
@@ -4950,6 +4981,7 @@ export namespace Cogl {
|
|
|
4950
4981
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
4951
4982
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
4952
4983
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
4984
|
+
* @throws GLib.Error
|
|
4953
4985
|
*/
|
|
4954
4986
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
4955
4987
|
|
|
@@ -5062,6 +5094,7 @@ export namespace Cogl {
|
|
|
5062
5094
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
5063
5095
|
* framebuffer and rendered too.</note>
|
|
5064
5096
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
5097
|
+
* @throws GLib.Error
|
|
5065
5098
|
*/
|
|
5066
5099
|
allocate(): boolean;
|
|
5067
5100
|
|
|
@@ -5231,6 +5264,7 @@ export namespace Cogl {
|
|
|
5231
5264
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
5232
5265
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
5233
5266
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
5267
|
+
* @throws GLib.Error
|
|
5234
5268
|
*/
|
|
5235
5269
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
5236
5270
|
|
|
@@ -5715,6 +5749,7 @@ export namespace Cogl {
|
|
|
5715
5749
|
* @returns `true` if the blend string was successfully parsed, and the described blending is supported by the underlying driver/hardware. If there was an error, `false` is returned and `error` is set accordingly (if present).
|
|
5716
5750
|
* @since 1.0
|
|
5717
5751
|
* @deprecated since 1.16: Use `cogl_pipeline_set_blend()` instead
|
|
5752
|
+
* @throws GLib.Error
|
|
5718
5753
|
*/
|
|
5719
5754
|
set_blend(blend_string: string): boolean;
|
|
5720
5755
|
|
|
@@ -5854,6 +5889,7 @@ export namespace Cogl {
|
|
|
5854
5889
|
* @returns `true` if the blend string was successfully parsed, and the described texture combining is supported by the underlying driver and or hardware. On failure, `false` is returned and `error` is set
|
|
5855
5890
|
* @since 1.0
|
|
5856
5891
|
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_combine()` instead
|
|
5892
|
+
* @throws GLib.Error
|
|
5857
5893
|
*/
|
|
5858
5894
|
set_layer_combine(layer_index: number, blend_string: string): boolean;
|
|
5859
5895
|
|
|
@@ -5898,6 +5934,7 @@ export namespace Cogl {
|
|
|
5898
5934
|
* @returns `true` if the function succeeds, `false` otherwise.
|
|
5899
5935
|
* @since 1.4
|
|
5900
5936
|
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_point_sprite_coords_enabled()` instead
|
|
5937
|
+
* @throws GLib.Error
|
|
5901
5938
|
*/
|
|
5902
5939
|
set_layer_point_sprite_coords_enabled(layer_index: number, enable: boolean): boolean;
|
|
5903
5940
|
|
|
@@ -6637,6 +6674,7 @@ export namespace Cogl {
|
|
|
6637
6674
|
* automatic allocation.</note>
|
|
6638
6675
|
* @returns `true` if there were no error allocating the framebuffer, else `false`.
|
|
6639
6676
|
* @since 1.8
|
|
6677
|
+
* @throws GLib.Error
|
|
6640
6678
|
*/
|
|
6641
6679
|
allocate(): boolean;
|
|
6642
6680
|
|
|
@@ -7494,6 +7532,7 @@ export namespace Cogl {
|
|
|
7494
7532
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
7495
7533
|
* framebuffer and rendered too.</note>
|
|
7496
7534
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
7535
|
+
* @throws GLib.Error
|
|
7497
7536
|
*/
|
|
7498
7537
|
allocate(): boolean;
|
|
7499
7538
|
|
|
@@ -7663,6 +7702,7 @@ export namespace Cogl {
|
|
|
7663
7702
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
7664
7703
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
7665
7704
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
7705
|
+
* @throws GLib.Error
|
|
7666
7706
|
*/
|
|
7667
7707
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
7668
7708
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/cogl-7",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "GJS TypeScript type definitions for Cogl-7",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "cogl-7.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
|
},
|