@girs/cogl-8 4.2.0 → 4.4.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 +8 -8
- package/cogl-8.d.ts +200 -0
- package/package.json +7 -7
package/cogl-8.d.ts
CHANGED
|
@@ -1720,27 +1720,32 @@ export namespace Cogl {
|
|
|
1720
1720
|
* Parses an image file enough to extract the width and height
|
|
1721
1721
|
* of the bitmap.
|
|
1722
1722
|
* @param filename the file to check
|
|
1723
|
+
* @since 1.0
|
|
1723
1724
|
*/
|
|
1724
1725
|
static get_size_from_file(filename: string): [boolean, number, number];
|
|
1725
1726
|
|
|
1726
1727
|
// Methods
|
|
1727
1728
|
/**
|
|
1728
1729
|
* @returns the {@link Cogl.PixelFormat} that the data for the bitmap is in.
|
|
1730
|
+
* @since 1.10
|
|
1729
1731
|
*/
|
|
1730
1732
|
get_format(): PixelFormat;
|
|
1731
1733
|
|
|
1732
1734
|
/**
|
|
1733
1735
|
* @returns the height of the bitmap
|
|
1736
|
+
* @since 1.10
|
|
1734
1737
|
*/
|
|
1735
1738
|
get_height(): number;
|
|
1736
1739
|
|
|
1737
1740
|
/**
|
|
1738
1741
|
* @returns the rowstride of the bitmap. This is the number of bytes between the address of start of one row to the address of the next row in the image.
|
|
1742
|
+
* @since 1.10
|
|
1739
1743
|
*/
|
|
1740
1744
|
get_rowstride(): number;
|
|
1741
1745
|
|
|
1742
1746
|
/**
|
|
1743
1747
|
* @returns the width of the bitmap
|
|
1748
|
+
* @since 1.10
|
|
1744
1749
|
*/
|
|
1745
1750
|
get_width(): number;
|
|
1746
1751
|
}
|
|
@@ -1830,6 +1835,7 @@ export namespace Cogl {
|
|
|
1830
1835
|
* Gets the frame counter for the {@link Cogl.Onscreen} that corresponds
|
|
1831
1836
|
* to this frame.
|
|
1832
1837
|
* @returns The frame counter value
|
|
1838
|
+
* @since 1.14
|
|
1833
1839
|
*/
|
|
1834
1840
|
get_frame_counter(): number;
|
|
1835
1841
|
|
|
@@ -1845,6 +1851,7 @@ export namespace Cogl {
|
|
|
1845
1851
|
* <note>Some buggy Mesa drivers up to 9.0.1 may
|
|
1846
1852
|
* incorrectly report non-monotonic timestamps.</note>
|
|
1847
1853
|
* @returns the presentation time for the frame
|
|
1854
|
+
* @since 1.14
|
|
1848
1855
|
*/
|
|
1849
1856
|
get_presentation_time_us(): number;
|
|
1850
1857
|
|
|
@@ -1858,6 +1865,7 @@ export namespace Cogl {
|
|
|
1858
1865
|
* more reliable than using `cogl_frame_info_get_output()` followed by
|
|
1859
1866
|
* `cogl_output_get_refresh_rate()`.</note>
|
|
1860
1867
|
* @returns the refresh rate in Hertz
|
|
1868
|
+
* @since 1.14
|
|
1861
1869
|
*/
|
|
1862
1870
|
get_refresh_rate(): number;
|
|
1863
1871
|
|
|
@@ -1958,6 +1966,7 @@ export namespace Cogl {
|
|
|
1958
1966
|
* used. The disadvantage of relying on automatic allocation is that the
|
|
1959
1967
|
* program will abort with an error message if there is an error during
|
|
1960
1968
|
* automatic allocation.</note>
|
|
1969
|
+
* @since 1.8
|
|
1961
1970
|
* @virtual
|
|
1962
1971
|
*/
|
|
1963
1972
|
vfunc_allocate(): boolean;
|
|
@@ -1980,6 +1989,7 @@ export namespace Cogl {
|
|
|
1980
1989
|
* program will abort with an error message if there is an error during
|
|
1981
1990
|
* automatic allocation.</note>
|
|
1982
1991
|
* @returns `true` if there were no error allocating the framebuffer, else `false`.
|
|
1992
|
+
* @since 1.8
|
|
1983
1993
|
*/
|
|
1984
1994
|
allocate(): boolean;
|
|
1985
1995
|
|
|
@@ -1988,6 +1998,7 @@ export namespace Cogl {
|
|
|
1988
1998
|
* that includes the color buffer then the specified `color` is used.
|
|
1989
1999
|
* @param buffers A mask of {@link Cogl.BufferBit}<!-- -->'s identifying which auxiliary buffers to clear
|
|
1990
2000
|
* @param color The color to clear the color buffer too if specified in `buffers`.
|
|
2001
|
+
* @since 1.8
|
|
1991
2002
|
*/
|
|
1992
2003
|
clear(buffers: bigint | number, color: Color): void;
|
|
1993
2004
|
|
|
@@ -1999,6 +2010,7 @@ export namespace Cogl {
|
|
|
1999
2010
|
* @param green The green component of color to clear the color buffer too if specified in `buffers`.
|
|
2000
2011
|
* @param blue The blue component of color to clear the color buffer too if specified in `buffers`.
|
|
2001
2012
|
* @param alpha The alpha component of color to clear the color buffer too if specified in `buffers`.
|
|
2013
|
+
* @since 1.8
|
|
2002
2014
|
*/
|
|
2003
2015
|
clear4f(buffers: bigint | number, red: number, green: number, blue: number, alpha: number): void;
|
|
2004
2016
|
|
|
@@ -2020,6 +2032,7 @@ export namespace Cogl {
|
|
|
2020
2032
|
* framebuffer, and it's not meaningful to try and discard the color buffer of
|
|
2021
2033
|
* a {@link Cogl.Offscreen} framebuffer since they are single-buffered.
|
|
2022
2034
|
* @param buffers A {@link Cogl.BufferBit} mask of which ancillary buffers you want to discard.
|
|
2035
|
+
* @since 1.8
|
|
2023
2036
|
*/
|
|
2024
2037
|
discard_buffers(buffers: bigint | number): void;
|
|
2025
2038
|
|
|
@@ -2069,6 +2082,7 @@ export namespace Cogl {
|
|
|
2069
2082
|
* @param y_2 y coordinate lower right on screen.
|
|
2070
2083
|
* @param tex_coords An array containing groups of 4 float values: [s_1, t_1, s_2, t_2] that are interpreted as two texture coordinates; one for the top left texel, and one for the bottom right texel. Each value should be between 0.0 and 1.0, where the coordinate (0.0, 0.0) represents the top left of the texture, and (1.0, 1.0) the bottom right.
|
|
2071
2084
|
* @param tex_coords_len The length of the `tex_coords` array. (For one layer and one group of texture coordinates, this would be 4)
|
|
2085
|
+
* @since 1.10
|
|
2072
2086
|
*/
|
|
2073
2087
|
draw_multitextured_rectangle(pipeline: Pipeline, x_1: number, y_1: number, x_2: number, y_2: number, tex_coords: number[], tex_coords_len: number): void;
|
|
2074
2088
|
|
|
@@ -2089,6 +2103,7 @@ export namespace Cogl {
|
|
|
2089
2103
|
* @param y_1 Y coordinate of the top-left corner
|
|
2090
2104
|
* @param x_2 X coordinate of the bottom-right corner
|
|
2091
2105
|
* @param y_2 Y coordinate of the bottom-right corner
|
|
2106
|
+
* @since 1.10
|
|
2092
2107
|
*/
|
|
2093
2108
|
draw_rectangle(pipeline: Pipeline, x_1: number, y_1: number, x_2: number, y_2: number): void;
|
|
2094
2109
|
|
|
@@ -2115,6 +2130,7 @@ export namespace Cogl {
|
|
|
2115
2130
|
* @param pipeline A {@link Cogl.Pipeline} state object
|
|
2116
2131
|
* @param coordinates an array of coordinates containing groups of 4 float values: [x_1, y_1, x_2, y_2] that are interpreted as two position coordinates; one for the top left of the rectangle (x1, y1), and one for the bottom right of the rectangle (x2, y2).
|
|
2117
2132
|
* @param n_rectangles number of rectangles defined in `coordinates`.
|
|
2133
|
+
* @since 1.10
|
|
2118
2134
|
*/
|
|
2119
2135
|
draw_rectangles(pipeline: Pipeline, coordinates: number[], n_rectangles: number): void;
|
|
2120
2136
|
|
|
@@ -2154,6 +2170,7 @@ export namespace Cogl {
|
|
|
2154
2170
|
* @param t_1 T texture coordinate of the top-left coorner
|
|
2155
2171
|
* @param s_2 S texture coordinate of the bottom-right coorner
|
|
2156
2172
|
* @param t_2 T texture coordinate of the bottom-right coorner
|
|
2173
|
+
* @since 1.10
|
|
2157
2174
|
*/
|
|
2158
2175
|
draw_textured_rectangle(pipeline: Pipeline, x_1: number, y_1: number, x_2: number, y_2: number, s_1: number, t_1: number, s_2: number, t_2: number): void;
|
|
2159
2176
|
|
|
@@ -2195,6 +2212,7 @@ export namespace Cogl {
|
|
|
2195
2212
|
* @param pipeline A {@link Cogl.Pipeline} state object
|
|
2196
2213
|
* @param coordinates an array containing groups of 8 float values: [x_1, y_1, x_2, y_2, s_1, t_1, s_2, t_2] that have the same meaning as the arguments for `cogl_framebuffer_draw_textured_rectangle()`.
|
|
2197
2214
|
* @param n_rectangles number of rectangles to `coordinates` to draw
|
|
2215
|
+
* @since 1.10
|
|
2198
2216
|
*/
|
|
2199
2217
|
draw_textured_rectangles(pipeline: Pipeline, coordinates: number[], n_rectangles: number): void;
|
|
2200
2218
|
|
|
@@ -2208,6 +2226,7 @@ export namespace Cogl {
|
|
|
2208
2226
|
* One example might be for benchmarking purposes to be sure timing
|
|
2209
2227
|
* measurements reflect the time that the GPU is busy for not just the time it
|
|
2210
2228
|
* takes to queue rendering commands.
|
|
2229
|
+
* @since 1.10
|
|
2211
2230
|
*/
|
|
2212
2231
|
finish(): void;
|
|
2213
2232
|
|
|
@@ -2229,18 +2248,21 @@ export namespace Cogl {
|
|
|
2229
2248
|
* @param top Y position of the top clipping plane where it intersects the near clipping plane
|
|
2230
2249
|
* @param z_near The distance to the near clipping plane (Must be positive)
|
|
2231
2250
|
* @param z_far The distance to the far clipping plane (Must be positive)
|
|
2251
|
+
* @since 1.10
|
|
2232
2252
|
*/
|
|
2233
2253
|
frustum(left: number, right: number, bottom: number, top: number, z_near: number, z_far: number): void;
|
|
2234
2254
|
|
|
2235
2255
|
/**
|
|
2236
2256
|
* Retrieves the number of alpha bits of `framebuffer`
|
|
2237
2257
|
* @returns the number of bits
|
|
2258
|
+
* @since 1.8
|
|
2238
2259
|
*/
|
|
2239
2260
|
get_alpha_bits(): number;
|
|
2240
2261
|
|
|
2241
2262
|
/**
|
|
2242
2263
|
* Retrieves the number of blue bits of `framebuffer`
|
|
2243
2264
|
* @returns the number of bits
|
|
2265
|
+
* @since 1.8
|
|
2244
2266
|
*/
|
|
2245
2267
|
get_blue_bits(): number;
|
|
2246
2268
|
|
|
@@ -2249,12 +2271,14 @@ export namespace Cogl {
|
|
|
2249
2271
|
* instantiated within. This is the {@link Cogl.Context} that was passed to
|
|
2250
2272
|
* `cogl_onscreen_new()` for example.
|
|
2251
2273
|
* @returns The {@link Cogl.Context} that the given `framebuffer` was instantiated within.
|
|
2274
|
+
* @since 1.8
|
|
2252
2275
|
*/
|
|
2253
2276
|
get_context(): Context;
|
|
2254
2277
|
|
|
2255
2278
|
/**
|
|
2256
2279
|
* Retrieves the number of depth bits of `framebuffer`
|
|
2257
2280
|
* @returns the number of bits
|
|
2281
|
+
* @since 2.0
|
|
2258
2282
|
*/
|
|
2259
2283
|
get_depth_bits(): number;
|
|
2260
2284
|
|
|
@@ -2262,6 +2286,7 @@ export namespace Cogl {
|
|
|
2262
2286
|
* Queries whether depth buffer writing is enabled for `framebuffer`. This
|
|
2263
2287
|
* can be controlled via `cogl_framebuffer_set_depth_write_enabled()`.
|
|
2264
2288
|
* @returns `true` if depth writing is enabled or `false` if not.
|
|
2289
|
+
* @since 1.18
|
|
2265
2290
|
*/
|
|
2266
2291
|
get_depth_write_enabled(): boolean;
|
|
2267
2292
|
|
|
@@ -2273,18 +2298,21 @@ export namespace Cogl {
|
|
|
2273
2298
|
* display pipeline does not support dithering. This value only represents
|
|
2274
2299
|
* the user's request for dithering.</note>
|
|
2275
2300
|
* @returns `true` if dithering has been requested or `false` if not.
|
|
2301
|
+
* @since 1.8
|
|
2276
2302
|
*/
|
|
2277
2303
|
get_dither_enabled(): boolean;
|
|
2278
2304
|
|
|
2279
2305
|
/**
|
|
2280
2306
|
* Retrieves the number of green bits of `framebuffer`
|
|
2281
2307
|
* @returns the number of bits
|
|
2308
|
+
* @since 1.8
|
|
2282
2309
|
*/
|
|
2283
2310
|
get_green_bits(): number;
|
|
2284
2311
|
|
|
2285
2312
|
/**
|
|
2286
2313
|
* Queries the current height of the given `framebuffer`.
|
|
2287
2314
|
* @returns The height of `framebuffer`.
|
|
2315
|
+
* @since 1.8
|
|
2288
2316
|
*/
|
|
2289
2317
|
get_height(): number;
|
|
2290
2318
|
|
|
@@ -2292,17 +2320,20 @@ export namespace Cogl {
|
|
|
2292
2320
|
|
|
2293
2321
|
/**
|
|
2294
2322
|
* Stores the current model-view matrix in `matrix`.
|
|
2323
|
+
* @since 1.10
|
|
2295
2324
|
*/
|
|
2296
2325
|
get_modelview_matrix(): Graphene.Matrix;
|
|
2297
2326
|
|
|
2298
2327
|
/**
|
|
2299
2328
|
* Stores the current projection matrix in `matrix`.
|
|
2329
|
+
* @since 1.10
|
|
2300
2330
|
*/
|
|
2301
2331
|
get_projection_matrix(): Graphene.Matrix;
|
|
2302
2332
|
|
|
2303
2333
|
/**
|
|
2304
2334
|
* Retrieves the number of red bits of `framebuffer`
|
|
2305
2335
|
* @returns the number of bits
|
|
2336
|
+
* @since 1.8
|
|
2306
2337
|
*/
|
|
2307
2338
|
get_red_bits(): number;
|
|
2308
2339
|
|
|
@@ -2320,6 +2351,7 @@ export namespace Cogl {
|
|
|
2320
2351
|
* framebuffer has been allocated the value will reflect the actual
|
|
2321
2352
|
* number of samples that will be made by the GPU.
|
|
2322
2353
|
* @returns The number of point samples made per pixel when rasterizing geometry or 0 if single-sample rendering has been chosen.
|
|
2354
|
+
* @since 1.10
|
|
2323
2355
|
*/
|
|
2324
2356
|
get_samples_per_pixel(): number;
|
|
2325
2357
|
|
|
@@ -2327,6 +2359,7 @@ export namespace Cogl {
|
|
|
2327
2359
|
* Gets the current {@link Cogl.StereoMode}, which defines which stereo buffers
|
|
2328
2360
|
* should be drawn to. See `cogl_framebuffer_set_stereo_mode()`.
|
|
2329
2361
|
* @returns A {@link Cogl.StereoMode}
|
|
2362
|
+
* @since 1.20
|
|
2330
2363
|
*/
|
|
2331
2364
|
get_stereo_mode(): StereoMode;
|
|
2332
2365
|
|
|
@@ -2335,6 +2368,7 @@ export namespace Cogl {
|
|
|
2335
2368
|
* using `cogl_framebuffer_set_viewport()` or the default values which are 0, 0,
|
|
2336
2369
|
* framebuffer_width and framebuffer_height. The values are written into the
|
|
2337
2370
|
* given `viewport` array.
|
|
2371
|
+
* @since 1.8
|
|
2338
2372
|
*/
|
|
2339
2373
|
get_viewport4fv(): number[];
|
|
2340
2374
|
|
|
@@ -2342,6 +2376,7 @@ export namespace Cogl {
|
|
|
2342
2376
|
* Queries the height of the viewport as set using `cogl_framebuffer_set_viewport()`
|
|
2343
2377
|
* or the default value which is the height of the framebuffer.
|
|
2344
2378
|
* @returns The height of the viewport.
|
|
2379
|
+
* @since 1.8
|
|
2345
2380
|
*/
|
|
2346
2381
|
get_viewport_height(): number;
|
|
2347
2382
|
|
|
@@ -2349,6 +2384,7 @@ export namespace Cogl {
|
|
|
2349
2384
|
* Queries the width of the viewport as set using `cogl_framebuffer_set_viewport()`
|
|
2350
2385
|
* or the default value which is the width of the framebuffer.
|
|
2351
2386
|
* @returns The width of the viewport.
|
|
2387
|
+
* @since 1.8
|
|
2352
2388
|
*/
|
|
2353
2389
|
get_viewport_width(): number;
|
|
2354
2390
|
|
|
@@ -2356,6 +2392,7 @@ export namespace Cogl {
|
|
|
2356
2392
|
* Queries the x coordinate of the viewport origin as set using `cogl_framebuffer_set_viewport()`
|
|
2357
2393
|
* or the default value which is 0.
|
|
2358
2394
|
* @returns The x coordinate of the viewport origin.
|
|
2395
|
+
* @since 1.8
|
|
2359
2396
|
*/
|
|
2360
2397
|
get_viewport_x(): number;
|
|
2361
2398
|
|
|
@@ -2363,17 +2400,20 @@ export namespace Cogl {
|
|
|
2363
2400
|
* Queries the y coordinate of the viewport origin as set using `cogl_framebuffer_set_viewport()`
|
|
2364
2401
|
* or the default value which is 0.
|
|
2365
2402
|
* @returns The y coordinate of the viewport origin.
|
|
2403
|
+
* @since 1.8
|
|
2366
2404
|
*/
|
|
2367
2405
|
get_viewport_y(): number;
|
|
2368
2406
|
|
|
2369
2407
|
/**
|
|
2370
2408
|
* Queries the current width of the given `framebuffer`.
|
|
2371
2409
|
* @returns The width of `framebuffer`.
|
|
2410
|
+
* @since 1.8
|
|
2372
2411
|
*/
|
|
2373
2412
|
get_width(): number;
|
|
2374
2413
|
|
|
2375
2414
|
/**
|
|
2376
2415
|
* Resets the current model-view matrix to the identity matrix.
|
|
2416
|
+
* @since 1.10
|
|
2377
2417
|
*/
|
|
2378
2418
|
identity_matrix(): void;
|
|
2379
2419
|
|
|
@@ -2386,6 +2426,7 @@ export namespace Cogl {
|
|
|
2386
2426
|
* @param y_2 The y coordinate for the second horizontal clipping plane
|
|
2387
2427
|
* @param near The <emphasis>distance</emphasis> to the near clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
2388
2428
|
* @param far The <emphasis>distance</emphasis> to the far clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
2429
|
+
* @since 1.10
|
|
2389
2430
|
*/
|
|
2390
2431
|
orthographic(x_1: number, y_1: number, x_2: number, y_2: number, near: number, far: number): void;
|
|
2391
2432
|
|
|
@@ -2401,6 +2442,7 @@ export namespace Cogl {
|
|
|
2401
2442
|
* @param aspect The (width over height) aspect ratio for display
|
|
2402
2443
|
* @param z_near The distance to the near clipping plane (Must be positive, and must not be 0)
|
|
2403
2444
|
* @param z_far The distance to the far clipping plane (Must be positive)
|
|
2445
|
+
* @since 1.10
|
|
2404
2446
|
*/
|
|
2405
2447
|
perspective(fov_y: number, aspect: number, z_near: number, z_far: number): void;
|
|
2406
2448
|
|
|
@@ -2408,17 +2450,20 @@ export namespace Cogl {
|
|
|
2408
2450
|
* Reverts the clipping region to the state before the last call to
|
|
2409
2451
|
* `cogl_framebuffer_push_scissor_clip()`, `cogl_framebuffer_push_rectangle_clip()`
|
|
2410
2452
|
* `cogl_framebuffer_push_path_clip()`, or `cogl_framebuffer_push_primitive_clip()`.
|
|
2453
|
+
* @since 1.10
|
|
2411
2454
|
*/
|
|
2412
2455
|
pop_clip(): void;
|
|
2413
2456
|
|
|
2414
2457
|
/**
|
|
2415
2458
|
* Restores the model-view matrix on the top of the matrix stack.
|
|
2459
|
+
* @since 1.10
|
|
2416
2460
|
*/
|
|
2417
2461
|
pop_matrix(): void;
|
|
2418
2462
|
|
|
2419
2463
|
/**
|
|
2420
2464
|
* Copies the current model-view matrix onto the matrix stack. The matrix
|
|
2421
2465
|
* can later be restored with `cogl_framebuffer_pop_matrix()`.
|
|
2466
|
+
* @since 1.10
|
|
2422
2467
|
*/
|
|
2423
2468
|
push_matrix(): void;
|
|
2424
2469
|
|
|
@@ -2435,6 +2480,7 @@ export namespace Cogl {
|
|
|
2435
2480
|
* @param y_1 y coordinate for top left corner of the clip rectangle
|
|
2436
2481
|
* @param x_2 x coordinate for bottom right corner of the clip rectangle
|
|
2437
2482
|
* @param y_2 y coordinate for bottom right corner of the clip rectangle
|
|
2483
|
+
* @since 1.10
|
|
2438
2484
|
*/
|
|
2439
2485
|
push_rectangle_clip(x_1: number, y_1: number, x_2: number, y_2: number): void;
|
|
2440
2486
|
|
|
@@ -2456,6 +2502,7 @@ export namespace Cogl {
|
|
|
2456
2502
|
* @param y top edge of the clip rectangle in window coordinates
|
|
2457
2503
|
* @param width width of the clip rectangle
|
|
2458
2504
|
* @param height height of the clip rectangle
|
|
2505
|
+
* @since 1.10
|
|
2459
2506
|
*/
|
|
2460
2507
|
push_scissor_clip(x: number, y: number, width: number, height: number): void;
|
|
2461
2508
|
|
|
@@ -2493,6 +2540,7 @@ export namespace Cogl {
|
|
|
2493
2540
|
* @param format The pixel format to store the data in
|
|
2494
2541
|
* @param pixels The address of the buffer to store the data in
|
|
2495
2542
|
* @returns `true` if the read succeeded or `false` otherwise.
|
|
2543
|
+
* @since 1.10
|
|
2496
2544
|
*/
|
|
2497
2545
|
read_pixels(x: number, y: number, width: number, height: number, format: PixelFormat, pixels: number): boolean;
|
|
2498
2546
|
|
|
@@ -2512,6 +2560,7 @@ export namespace Cogl {
|
|
|
2512
2560
|
* @param source Identifies which auxiliary buffer you want to read (only COGL_READ_PIXELS_COLOR_BUFFER supported currently)
|
|
2513
2561
|
* @param bitmap The bitmap to store the results in.
|
|
2514
2562
|
* @returns `true` if the read succeeded or `false` otherwise. The function is only likely to fail if the bitmap points to a pixel buffer and it could not be mapped.
|
|
2563
|
+
* @since 1.10
|
|
2515
2564
|
*/
|
|
2516
2565
|
read_pixels_into_bitmap(x: number, y: number, source: ReadPixelsFlags, bitmap: Bitmap): boolean;
|
|
2517
2566
|
|
|
@@ -2536,6 +2585,7 @@ export namespace Cogl {
|
|
|
2536
2585
|
* If you are performing incremental updates to a framebuffer you
|
|
2537
2586
|
* should consider using `cogl_framebuffer_resolve_samples_region()`
|
|
2538
2587
|
* instead to avoid resolving redundant pixels.
|
|
2588
|
+
* @since 1.8
|
|
2539
2589
|
*/
|
|
2540
2590
|
resolve_samples(): void;
|
|
2541
2591
|
|
|
@@ -2565,6 +2615,7 @@ export namespace Cogl {
|
|
|
2565
2615
|
* @param y top-left y coordinate of region to resolve
|
|
2566
2616
|
* @param width width of region to resolve
|
|
2567
2617
|
* @param height height of region to resolve
|
|
2618
|
+
* @since 1.8
|
|
2568
2619
|
*/
|
|
2569
2620
|
resolve_samples_region(x: number, y: number, width: number, height: number): void;
|
|
2570
2621
|
|
|
@@ -2578,6 +2629,7 @@ export namespace Cogl {
|
|
|
2578
2629
|
* @param x X-component of vertex to rotate around.
|
|
2579
2630
|
* @param y Y-component of vertex to rotate around.
|
|
2580
2631
|
* @param z Z-component of vertex to rotate around.
|
|
2632
|
+
* @since 1.10
|
|
2581
2633
|
*/
|
|
2582
2634
|
rotate(angle: number, x: number, y: number, z: number): void;
|
|
2583
2635
|
|
|
@@ -2585,6 +2637,7 @@ export namespace Cogl {
|
|
|
2585
2637
|
* Multiplies the current model-view matrix by one that rotates
|
|
2586
2638
|
* according to the rotation described by `euler`.
|
|
2587
2639
|
* @param euler A {@link Graphene.Euler}
|
|
2640
|
+
* @since 2.0
|
|
2588
2641
|
*/
|
|
2589
2642
|
rotate_euler(euler: Graphene.Euler): void;
|
|
2590
2643
|
|
|
@@ -2594,6 +2647,7 @@ export namespace Cogl {
|
|
|
2594
2647
|
* @param x Amount to scale along the x-axis
|
|
2595
2648
|
* @param y Amount to scale along the y-axis
|
|
2596
2649
|
* @param z Amount to scale along the z-axis
|
|
2650
|
+
* @since 1.10
|
|
2597
2651
|
*/
|
|
2598
2652
|
scale(x: number, y: number, z: number): void;
|
|
2599
2653
|
|
|
@@ -2605,6 +2659,7 @@ export namespace Cogl {
|
|
|
2605
2659
|
*
|
|
2606
2660
|
* Depth buffer writing is enabled by default.
|
|
2607
2661
|
* @param depth_write_enabled `true` to enable depth writing or `false` to disable
|
|
2662
|
+
* @since 1.18
|
|
2608
2663
|
*/
|
|
2609
2664
|
set_depth_write_enabled(depth_write_enabled: boolean): void;
|
|
2610
2665
|
|
|
@@ -2623,18 +2678,21 @@ export namespace Cogl {
|
|
|
2623
2678
|
*
|
|
2624
2679
|
* Dithering is enabled by default.
|
|
2625
2680
|
* @param dither_enabled `true` to enable dithering or `false` to disable
|
|
2681
|
+
* @since 1.8
|
|
2626
2682
|
*/
|
|
2627
2683
|
set_dither_enabled(dither_enabled: boolean): void;
|
|
2628
2684
|
|
|
2629
2685
|
/**
|
|
2630
2686
|
* Sets `matrix` as the new model-view matrix.
|
|
2631
2687
|
* @param matrix the new model-view matrix
|
|
2688
|
+
* @since 1.10
|
|
2632
2689
|
*/
|
|
2633
2690
|
set_modelview_matrix(matrix: Graphene.Matrix): void;
|
|
2634
2691
|
|
|
2635
2692
|
/**
|
|
2636
2693
|
* Sets `matrix` as the new projection matrix.
|
|
2637
2694
|
* @param matrix the new projection matrix
|
|
2695
|
+
* @since 1.10
|
|
2638
2696
|
*/
|
|
2639
2697
|
set_projection_matrix(matrix: Graphene.Matrix): void;
|
|
2640
2698
|
|
|
@@ -2672,6 +2730,7 @@ export namespace Cogl {
|
|
|
2672
2730
|
* framebuffer has changed this can lead to redundant work being
|
|
2673
2731
|
* done.</note>
|
|
2674
2732
|
* @param samples_per_pixel The minimum number of samples per pixel
|
|
2733
|
+
* @since 1.8
|
|
2675
2734
|
*/
|
|
2676
2735
|
set_samples_per_pixel(samples_per_pixel: number): void;
|
|
2677
2736
|
|
|
@@ -2684,6 +2743,7 @@ export namespace Cogl {
|
|
|
2684
2743
|
* enabled. (See `cogl_onscreen_template_set_stereo_enabled()`,
|
|
2685
2744
|
* `cogl_framebuffer_get_is_stereo()`.)
|
|
2686
2745
|
* @param stereo_mode A {@link Cogl.StereoMode} specifying which stereo buffers should be drawn tow.
|
|
2746
|
+
* @since 1.20
|
|
2687
2747
|
*/
|
|
2688
2748
|
set_stereo_mode(stereo_mode: StereoMode): void;
|
|
2689
2749
|
|
|
@@ -2707,12 +2767,14 @@ export namespace Cogl {
|
|
|
2707
2767
|
* @param y The top-left y coordinate of the viewport origin (only integers supported currently)
|
|
2708
2768
|
* @param width The width of the viewport (only integers supported currently)
|
|
2709
2769
|
* @param height The height of the viewport (only integers supported currently)
|
|
2770
|
+
* @since 1.8
|
|
2710
2771
|
*/
|
|
2711
2772
|
set_viewport(x: number, y: number, width: number, height: number): void;
|
|
2712
2773
|
|
|
2713
2774
|
/**
|
|
2714
2775
|
* Multiplies the current model-view matrix by the given matrix.
|
|
2715
2776
|
* @param matrix the matrix to multiply with the current model-view
|
|
2777
|
+
* @since 1.10
|
|
2716
2778
|
*/
|
|
2717
2779
|
transform(matrix: Graphene.Matrix): void;
|
|
2718
2780
|
|
|
@@ -2722,6 +2784,7 @@ export namespace Cogl {
|
|
|
2722
2784
|
* @param x Distance to translate along the x-axis
|
|
2723
2785
|
* @param y Distance to translate along the y-axis
|
|
2724
2786
|
* @param z Distance to translate along the z-axis
|
|
2787
|
+
* @since 1.10
|
|
2725
2788
|
*/
|
|
2726
2789
|
translate(x: number, y: number, z: number): void;
|
|
2727
2790
|
}
|
|
@@ -2895,6 +2958,7 @@ export namespace Cogl {
|
|
|
2895
2958
|
* explicitly checked to determine if Cogl is currently tracking the
|
|
2896
2959
|
* age of {@link Cogl.Onscreen} back buffer contents. If this feature is
|
|
2897
2960
|
* missing then this function will always return 0.</note>
|
|
2961
|
+
* @since 1.14
|
|
2898
2962
|
* @virtual
|
|
2899
2963
|
*/
|
|
2900
2964
|
vfunc_get_buffer_age(): number;
|
|
@@ -2940,6 +3004,7 @@ export namespace Cogl {
|
|
|
2940
3004
|
* @param rectangles An array of integer 4-tuples representing damaged rectangles as (x, y, width, height) tuples.
|
|
2941
3005
|
* @param n_rectangles The number of 4-tuples to be read from `rectangles`
|
|
2942
3006
|
* @param info
|
|
3007
|
+
* @since 1.16
|
|
2943
3008
|
* @virtual
|
|
2944
3009
|
*/
|
|
2945
3010
|
vfunc_swap_buffers_with_damage(rectangles: number, n_rectangles: number, info: FrameInfo): void;
|
|
@@ -2957,6 +3022,7 @@ export namespace Cogl {
|
|
|
2957
3022
|
* @param rectangles An array of integer 4-tuples representing rectangles as (x, y, width, height) tuples.
|
|
2958
3023
|
* @param n_rectangles The number of 4-tuples to be read from `rectangles`
|
|
2959
3024
|
* @param info
|
|
3025
|
+
* @since 1.10
|
|
2960
3026
|
* @virtual
|
|
2961
3027
|
*/
|
|
2962
3028
|
vfunc_swap_region(rectangles: number, n_rectangles: number, info: FrameInfo): void;
|
|
@@ -2982,6 +3048,7 @@ export namespace Cogl {
|
|
|
2982
3048
|
* @param callback A callback function to call for dirty events
|
|
2983
3049
|
* @param destroy An optional callback to destroy `user_data` when the `callback` is removed or `onscreen` is freed.
|
|
2984
3050
|
* @returns a {@link Cogl.OnscreenDirtyClosure} pointer that can be used to remove the callback and associated `user_data` later.
|
|
3051
|
+
* @since 1.16
|
|
2985
3052
|
*/
|
|
2986
3053
|
add_dirty_callback(callback: OnscreenDirtyCallback, destroy: UserDataDestroyCallback | null): OnscreenDirtyClosure;
|
|
2987
3054
|
|
|
@@ -3012,6 +3079,7 @@ export namespace Cogl {
|
|
|
3012
3079
|
* @param callback A callback function to call for frame events
|
|
3013
3080
|
* @param destroy An optional callback to destroy `user_data` when the `callback` is removed or `onscreen` is freed.
|
|
3014
3081
|
* @returns a {@link Cogl.FrameClosure} pointer that can be used to remove the callback and associated `user_data` later.
|
|
3082
|
+
* @since 1.14
|
|
3015
3083
|
*/
|
|
3016
3084
|
add_frame_callback(callback: FrameCallback, destroy: UserDataDestroyCallback | null): FrameClosure;
|
|
3017
3085
|
|
|
@@ -3055,6 +3123,7 @@ export namespace Cogl {
|
|
|
3055
3123
|
* age of {@link Cogl.Onscreen} back buffer contents. If this feature is
|
|
3056
3124
|
* missing then this function will always return 0.</note>
|
|
3057
3125
|
* @returns The age of the buffer contents or 0 when the buffer contents are undefined.
|
|
3126
|
+
* @since 1.14
|
|
3058
3127
|
*/
|
|
3059
3128
|
get_buffer_age(): number;
|
|
3060
3129
|
|
|
@@ -3064,6 +3133,7 @@ export namespace Cogl {
|
|
|
3064
3133
|
* `cogl_onscreen_swap_buffers()` or `cogl_onscreen_swap_region()`
|
|
3065
3134
|
* is called.
|
|
3066
3135
|
* @returns the current frame counter value
|
|
3136
|
+
* @since 1.14
|
|
3067
3137
|
*/
|
|
3068
3138
|
get_frame_counter(): number;
|
|
3069
3139
|
|
|
@@ -3082,6 +3152,7 @@ export namespace Cogl {
|
|
|
3082
3152
|
* requests e.g. to show an already visible window. This also means
|
|
3083
3153
|
* that it's acceptable to alternatively use native APIs to show and
|
|
3084
3154
|
* hide windows without confusing Cogl.</note>
|
|
3155
|
+
* @since 2.0
|
|
3085
3156
|
*/
|
|
3086
3157
|
hide(): void;
|
|
3087
3158
|
|
|
@@ -3093,6 +3164,7 @@ export namespace Cogl {
|
|
|
3093
3164
|
* `cogl_onscreen_add_dirty_callback()` to destroy the user data then
|
|
3094
3165
|
* this will also get called.
|
|
3095
3166
|
* @param closure A {@link Cogl.OnscreenDirtyClosure} returned from `cogl_onscreen_add_dirty_callback()`
|
|
3167
|
+
* @since 1.16
|
|
3096
3168
|
*/
|
|
3097
3169
|
remove_dirty_callback(closure: OnscreenDirtyClosure): void;
|
|
3098
3170
|
|
|
@@ -3104,6 +3176,7 @@ export namespace Cogl {
|
|
|
3104
3176
|
* `cogl_onscreen_add_frame_callback()` to destroy the user data then
|
|
3105
3177
|
* this will get called.
|
|
3106
3178
|
* @param closure A {@link Cogl.FrameClosure} returned from `cogl_onscreen_add_frame_callback()`
|
|
3179
|
+
* @since 1.14
|
|
3107
3180
|
*/
|
|
3108
3181
|
remove_frame_callback(closure: FrameClosure): void;
|
|
3109
3182
|
|
|
@@ -3128,6 +3201,7 @@ export namespace Cogl {
|
|
|
3128
3201
|
* requests e.g. to show an already visible window. This also means
|
|
3129
3202
|
* that it's acceptable to alternatively use native APIs to show and
|
|
3130
3203
|
* hide windows without confusing Cogl.</note>
|
|
3204
|
+
* @since 2.0
|
|
3131
3205
|
*/
|
|
3132
3206
|
show(): void;
|
|
3133
3207
|
|
|
@@ -3147,6 +3221,7 @@ export namespace Cogl {
|
|
|
3147
3221
|
* render a full buffer for every frame.</note>
|
|
3148
3222
|
* @param frame_info
|
|
3149
3223
|
* @param user_data
|
|
3224
|
+
* @since 1.10
|
|
3150
3225
|
*/
|
|
3151
3226
|
swap_buffers(frame_info: FrameInfo, user_data: null): void;
|
|
3152
3227
|
|
|
@@ -3192,6 +3267,7 @@ export namespace Cogl {
|
|
|
3192
3267
|
* @param n_rectangles The number of 4-tuples to be read from `rectangles`
|
|
3193
3268
|
* @param info
|
|
3194
3269
|
* @param user_data
|
|
3270
|
+
* @since 1.16
|
|
3195
3271
|
*/
|
|
3196
3272
|
swap_buffers_with_damage(rectangles: number, n_rectangles: number, info: FrameInfo, user_data: null): void;
|
|
3197
3273
|
|
|
@@ -3209,6 +3285,7 @@ export namespace Cogl {
|
|
|
3209
3285
|
* @param n_rectangles The number of 4-tuples to be read from `rectangles`
|
|
3210
3286
|
* @param info
|
|
3211
3287
|
* @param user_data
|
|
3288
|
+
* @since 1.10
|
|
3212
3289
|
*/
|
|
3213
3290
|
swap_region(rectangles: number, n_rectangles: number, info: FrameInfo, user_data: null): void;
|
|
3214
3291
|
}
|
|
@@ -3254,32 +3331,38 @@ export namespace Cogl {
|
|
|
3254
3331
|
* keep track of a pipelines ancestry which we may use to help minimize GPU
|
|
3255
3332
|
* state changes.
|
|
3256
3333
|
* @returns a pointer to the newly allocated {@link Cogl.Pipeline}
|
|
3334
|
+
* @since 2.0
|
|
3257
3335
|
*/
|
|
3258
3336
|
copy(): Pipeline;
|
|
3259
3337
|
|
|
3260
3338
|
/**
|
|
3261
3339
|
* Iterates all the layer indices of the given `pipeline`.
|
|
3262
3340
|
* @param callback A {@link Cogl.PipelineLayerCallback} to be called for each layer index
|
|
3341
|
+
* @since 2.0
|
|
3263
3342
|
*/
|
|
3264
3343
|
foreach_layer(callback: PipelineLayerCallback): void;
|
|
3265
3344
|
|
|
3266
3345
|
/**
|
|
3267
3346
|
* @returns The alpha test function of `pipeline`.
|
|
3347
|
+
* @since 2.0
|
|
3268
3348
|
*/
|
|
3269
3349
|
get_alpha_test_function(): PipelineAlphaFunc;
|
|
3270
3350
|
|
|
3271
3351
|
/**
|
|
3272
3352
|
* @returns The alpha test reference value of `pipeline`.
|
|
3353
|
+
* @since 2.0
|
|
3273
3354
|
*/
|
|
3274
3355
|
get_alpha_test_reference(): number;
|
|
3275
3356
|
|
|
3276
3357
|
/**
|
|
3277
3358
|
* Retrieves the current pipeline color.
|
|
3359
|
+
* @since 2.0
|
|
3278
3360
|
*/
|
|
3279
3361
|
get_color(): Color;
|
|
3280
3362
|
|
|
3281
3363
|
/**
|
|
3282
3364
|
* @returns the cull face mode that was previously set with `cogl_pipeline_set_cull_face_mode()`. Status: Unstable
|
|
3365
|
+
* @since 2.0
|
|
3283
3366
|
*/
|
|
3284
3367
|
get_cull_face_mode(): PipelineCullFaceMode;
|
|
3285
3368
|
|
|
@@ -3292,6 +3375,7 @@ export namespace Cogl {
|
|
|
3292
3375
|
* {@link Cogl.Winding.CLOCKWISE} sets them to be clockwise. The default is
|
|
3293
3376
|
* {@link Cogl.Winding.COUNTER_CLOCKWISE}.
|
|
3294
3377
|
* @returns The `pipeline` front face winding Status: Unstable
|
|
3378
|
+
* @since 2.0
|
|
3295
3379
|
*/
|
|
3296
3380
|
get_front_face_winding(): Winding;
|
|
3297
3381
|
|
|
@@ -3304,6 +3388,7 @@ export namespace Cogl {
|
|
|
3304
3388
|
* changed using `cogl_pipeline_set_layer_filters()`.
|
|
3305
3389
|
* @param layer_index the layer number to change.
|
|
3306
3390
|
* @returns The magnification {@link Cogl.PipelineFilter} for the specified layer.
|
|
3391
|
+
* @since 1.10
|
|
3307
3392
|
*/
|
|
3308
3393
|
get_layer_mag_filter(layer_index: number): PipelineFilter;
|
|
3309
3394
|
|
|
@@ -3316,6 +3401,7 @@ export namespace Cogl {
|
|
|
3316
3401
|
* changed using `cogl_pipeline_set_layer_filters()`.
|
|
3317
3402
|
* @param layer_index the layer number to change.
|
|
3318
3403
|
* @returns The minification {@link Cogl.PipelineFilter} for the specified layer.
|
|
3404
|
+
* @since 1.10
|
|
3319
3405
|
*/
|
|
3320
3406
|
get_layer_min_filter(layer_index: number): PipelineFilter;
|
|
3321
3407
|
|
|
@@ -3324,12 +3410,14 @@ export namespace Cogl {
|
|
|
3324
3410
|
* texture layer.
|
|
3325
3411
|
* @param layer_index the layer number to check.
|
|
3326
3412
|
* @returns whether the texture coordinates will be replaced with point sprite coordinates.
|
|
3413
|
+
* @since 2.0
|
|
3327
3414
|
*/
|
|
3328
3415
|
get_layer_point_sprite_coords_enabled(layer_index: number): boolean;
|
|
3329
3416
|
|
|
3330
3417
|
/**
|
|
3331
3418
|
* @param layer_index the index of the layer
|
|
3332
3419
|
* @returns the texture that was set for the given layer of the pipeline or `null` if no texture was set.
|
|
3420
|
+
* @since 1.10
|
|
3333
3421
|
*/
|
|
3334
3422
|
get_layer_texture(layer_index: number): Texture;
|
|
3335
3423
|
|
|
@@ -3338,6 +3426,7 @@ export namespace Cogl {
|
|
|
3338
3426
|
* layer.
|
|
3339
3427
|
* @param layer_index the layer number to change.
|
|
3340
3428
|
* @returns the wrap mode for the 's' coordinate of texture lookups on this layer.
|
|
3429
|
+
* @since 1.6
|
|
3341
3430
|
*/
|
|
3342
3431
|
get_layer_wrap_mode_s(layer_index: number): PipelineWrapMode;
|
|
3343
3432
|
|
|
@@ -3346,17 +3435,20 @@ export namespace Cogl {
|
|
|
3346
3435
|
* layer.
|
|
3347
3436
|
* @param layer_index the layer number to change.
|
|
3348
3437
|
* @returns the wrap mode for the 't' coordinate of texture lookups on this layer.
|
|
3438
|
+
* @since 1.6
|
|
3349
3439
|
*/
|
|
3350
3440
|
get_layer_wrap_mode_t(layer_index: number): PipelineWrapMode;
|
|
3351
3441
|
|
|
3352
3442
|
/**
|
|
3353
3443
|
* Retrieves the number of layers defined for the given `pipeline`
|
|
3354
3444
|
* @returns the number of layers
|
|
3445
|
+
* @since 2.0
|
|
3355
3446
|
*/
|
|
3356
3447
|
get_n_layers(): number;
|
|
3357
3448
|
|
|
3358
3449
|
/**
|
|
3359
3450
|
* @returns `true` if the pipeline has per-vertex point size enabled or `false` otherwise. The per-vertex point size can be enabled with `cogl_pipeline_set_per_vertex_point_size()`.
|
|
3451
|
+
* @since 2.0
|
|
3360
3452
|
*/
|
|
3361
3453
|
get_per_vertex_point_size(): boolean;
|
|
3362
3454
|
|
|
@@ -3364,6 +3456,7 @@ export namespace Cogl {
|
|
|
3364
3456
|
* Get the size of points drawn when {@link Cogl.VerticesMode.POINTS} is
|
|
3365
3457
|
* used with the vertex buffer API.
|
|
3366
3458
|
* @returns the point size of the `pipeline`.
|
|
3459
|
+
* @since 2.0
|
|
3367
3460
|
*/
|
|
3368
3461
|
get_point_size(): number;
|
|
3369
3462
|
|
|
@@ -3379,6 +3472,7 @@ export namespace Cogl {
|
|
|
3379
3472
|
* before calling this function.
|
|
3380
3473
|
* @param uniform_name The name of a uniform
|
|
3381
3474
|
* @returns A integer representing the location of the given uniform.
|
|
3475
|
+
* @since 2.0
|
|
3382
3476
|
*/
|
|
3383
3477
|
get_uniform_location(uniform_name: string): number;
|
|
3384
3478
|
|
|
@@ -3386,12 +3480,14 @@ export namespace Cogl {
|
|
|
3386
3480
|
* Queries what user program has been associated with the given
|
|
3387
3481
|
* `pipeline` using `cogl_pipeline_set_user_program()`.
|
|
3388
3482
|
* @returns The current user program or `null`.
|
|
3483
|
+
* @since 2.0
|
|
3389
3484
|
*/
|
|
3390
3485
|
get_user_program(): Handle;
|
|
3391
3486
|
|
|
3392
3487
|
/**
|
|
3393
3488
|
* This function removes a layer from your pipeline
|
|
3394
3489
|
* @param layer_index Specifies the layer you want to remove
|
|
3490
|
+
* @since 1.10
|
|
3395
3491
|
*/
|
|
3396
3492
|
remove_layer(layer_index: number): void;
|
|
3397
3493
|
|
|
@@ -3405,6 +3501,7 @@ export namespace Cogl {
|
|
|
3405
3501
|
* The default is {@link Cogl.PipelineAlphaFunc.ALWAYS}
|
|
3406
3502
|
* @param alpha_func A `CoglPipelineAlphaFunc` constant
|
|
3407
3503
|
* @param alpha_reference A reference point that the chosen alpha function uses to compare incoming fragments to.
|
|
3504
|
+
* @since 2.0
|
|
3408
3505
|
*/
|
|
3409
3506
|
set_alpha_test_function(alpha_func: PipelineAlphaFunc, alpha_reference: number): void;
|
|
3410
3507
|
|
|
@@ -3476,6 +3573,7 @@ export namespace Cogl {
|
|
|
3476
3573
|
* is in premultiplied form.
|
|
3477
3574
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired blend function.
|
|
3478
3575
|
* @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).
|
|
3576
|
+
* @since 2.0
|
|
3479
3577
|
*/
|
|
3480
3578
|
set_blend(blend_string: string): boolean;
|
|
3481
3579
|
|
|
@@ -3483,6 +3581,7 @@ export namespace Cogl {
|
|
|
3483
3581
|
* When blending is setup to reference a CONSTANT blend factor then
|
|
3484
3582
|
* blending will depend on the constant set with this function.
|
|
3485
3583
|
* @param constant_color The constant color you want
|
|
3584
|
+
* @since 2.0
|
|
3486
3585
|
*/
|
|
3487
3586
|
set_blend_constant(constant_color: Color): void;
|
|
3488
3587
|
|
|
@@ -3496,6 +3595,7 @@ export namespace Cogl {
|
|
|
3496
3595
|
*
|
|
3497
3596
|
* The default value is (1.0, 1.0, 1.0, 1.0)
|
|
3498
3597
|
* @param color The components of the color
|
|
3598
|
+
* @since 2.0
|
|
3499
3599
|
*/
|
|
3500
3600
|
set_color(color: Color): void;
|
|
3501
3601
|
|
|
@@ -3507,6 +3607,7 @@ export namespace Cogl {
|
|
|
3507
3607
|
* @param green The green component
|
|
3508
3608
|
* @param blue The blue component
|
|
3509
3609
|
* @param alpha The alpha component
|
|
3610
|
+
* @since 2.0
|
|
3510
3611
|
*/
|
|
3511
3612
|
set_color4f(red: number, green: number, blue: number, alpha: number): void;
|
|
3512
3613
|
|
|
@@ -3518,6 +3619,7 @@ export namespace Cogl {
|
|
|
3518
3619
|
* @param green The green component
|
|
3519
3620
|
* @param blue The blue component
|
|
3520
3621
|
* @param alpha The alpha component
|
|
3622
|
+
* @since 2.0
|
|
3521
3623
|
*/
|
|
3522
3624
|
set_color4ub(red: number, green: number, blue: number, alpha: number): void;
|
|
3523
3625
|
|
|
@@ -3537,6 +3639,7 @@ export namespace Cogl {
|
|
|
3537
3639
|
*
|
|
3538
3640
|
* Status: Unstable
|
|
3539
3641
|
* @param cull_face_mode The new mode to set
|
|
3642
|
+
* @since 2.0
|
|
3540
3643
|
*/
|
|
3541
3644
|
set_cull_face_mode(cull_face_mode: PipelineCullFaceMode): void;
|
|
3542
3645
|
|
|
@@ -3551,6 +3654,7 @@ export namespace Cogl {
|
|
|
3551
3654
|
*
|
|
3552
3655
|
* Status: Unstable
|
|
3553
3656
|
* @param front_winding the winding order
|
|
3657
|
+
* @since 2.0
|
|
3554
3658
|
*/
|
|
3555
3659
|
set_front_face_winding(front_winding: Winding): void;
|
|
3556
3660
|
|
|
@@ -3634,6 +3738,7 @@ export namespace Cogl {
|
|
|
3634
3738
|
* @param layer_index Specifies the layer you want define a combine function for
|
|
3635
3739
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired texture combine function.
|
|
3636
3740
|
* @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
|
|
3741
|
+
* @since 2.0
|
|
3637
3742
|
*/
|
|
3638
3743
|
set_layer_combine(layer_index: number, blend_string: string): boolean;
|
|
3639
3744
|
|
|
@@ -3642,6 +3747,7 @@ export namespace Cogl {
|
|
|
3642
3747
|
* description then you can use this function to define its value.
|
|
3643
3748
|
* @param layer_index Specifies the layer you want to specify a constant used for texture combining
|
|
3644
3749
|
* @param constant The constant color you want
|
|
3750
|
+
* @since 2.0
|
|
3645
3751
|
*/
|
|
3646
3752
|
set_layer_combine_constant(layer_index: number, constant: Color): void;
|
|
3647
3753
|
|
|
@@ -3656,6 +3762,7 @@ export namespace Cogl {
|
|
|
3656
3762
|
* @param layer_index the layer number to change.
|
|
3657
3763
|
* @param min_filter the filter used when scaling a texture down.
|
|
3658
3764
|
* @param mag_filter the filter used when magnifying a texture.
|
|
3765
|
+
* @since 1.10
|
|
3659
3766
|
*/
|
|
3660
3767
|
set_layer_filters(layer_index: number, min_filter: PipelineFilter, mag_filter: PipelineFilter): void;
|
|
3661
3768
|
|
|
@@ -3664,6 +3771,7 @@ export namespace Cogl {
|
|
|
3664
3771
|
* and rotate a single layer of a pipeline used to fill your geometry.
|
|
3665
3772
|
* @param layer_index the index for the layer inside `pipeline`
|
|
3666
3773
|
* @param matrix the transformation matrix for the layer
|
|
3774
|
+
* @since 1.10
|
|
3667
3775
|
*/
|
|
3668
3776
|
set_layer_matrix(layer_index: number, matrix: Graphene.Matrix): void;
|
|
3669
3777
|
|
|
@@ -3683,6 +3791,7 @@ export namespace Cogl {
|
|
|
3683
3791
|
* specify the texture type so that any pipeline copies can share the
|
|
3684
3792
|
* internal texture type state for efficiency.
|
|
3685
3793
|
* @param layer_index The layer number to modify
|
|
3794
|
+
* @since 1.10
|
|
3686
3795
|
*/
|
|
3687
3796
|
set_layer_null_texture(layer_index: number): void;
|
|
3688
3797
|
|
|
@@ -3696,6 +3805,7 @@ export namespace Cogl {
|
|
|
3696
3805
|
* @param layer_index the layer number to change.
|
|
3697
3806
|
* @param enable whether to enable point sprite coord generation.
|
|
3698
3807
|
* @returns `true` if the function succeeds, `false` otherwise.
|
|
3808
|
+
* @since 2.0
|
|
3699
3809
|
*/
|
|
3700
3810
|
set_layer_point_sprite_coords_enabled(layer_index: number, enable: boolean): boolean;
|
|
3701
3811
|
|
|
@@ -3712,6 +3822,7 @@ export namespace Cogl {
|
|
|
3712
3822
|
* `cogl_pipeline_set_layer_wrap_mode_t()` separately.
|
|
3713
3823
|
* @param layer_index the layer number to change.
|
|
3714
3824
|
* @param mode the new wrap mode
|
|
3825
|
+
* @since 2.0
|
|
3715
3826
|
*/
|
|
3716
3827
|
set_layer_wrap_mode(layer_index: number, mode: PipelineWrapMode): void;
|
|
3717
3828
|
|
|
@@ -3719,6 +3830,7 @@ export namespace Cogl {
|
|
|
3719
3830
|
* Sets the wrap mode for the 's' coordinate of texture lookups on this layer.
|
|
3720
3831
|
* @param layer_index the layer number to change.
|
|
3721
3832
|
* @param mode the new wrap mode
|
|
3833
|
+
* @since 2.0
|
|
3722
3834
|
*/
|
|
3723
3835
|
set_layer_wrap_mode_s(layer_index: number, mode: PipelineWrapMode): void;
|
|
3724
3836
|
|
|
@@ -3726,6 +3838,7 @@ export namespace Cogl {
|
|
|
3726
3838
|
* Sets the wrap mode for the 't' coordinate of texture lookups on this layer.
|
|
3727
3839
|
* @param layer_index the layer number to change.
|
|
3728
3840
|
* @param mode the new wrap mode
|
|
3841
|
+
* @since 2.0
|
|
3729
3842
|
*/
|
|
3730
3843
|
set_layer_wrap_mode_t(layer_index: number, mode: PipelineWrapMode): void;
|
|
3731
3844
|
|
|
@@ -3742,6 +3855,7 @@ export namespace Cogl {
|
|
|
3742
3855
|
* undefined.
|
|
3743
3856
|
* @param enable whether to enable per-vertex point size
|
|
3744
3857
|
* @returns `true` if the change succeeded or `false` otherwise
|
|
3858
|
+
* @since 2.0
|
|
3745
3859
|
*/
|
|
3746
3860
|
set_per_vertex_point_size(enable: boolean): boolean;
|
|
3747
3861
|
|
|
@@ -3759,6 +3873,7 @@ export namespace Cogl {
|
|
|
3759
3873
|
* if an application wants to draw points it must make sure to use a
|
|
3760
3874
|
* pipeline that has an explicit point size set on it.
|
|
3761
3875
|
* @param point_size the new point size.
|
|
3876
|
+
* @since 2.0
|
|
3762
3877
|
*/
|
|
3763
3878
|
set_point_size(point_size: number): void;
|
|
3764
3879
|
|
|
@@ -3775,6 +3890,7 @@ export namespace Cogl {
|
|
|
3775
3890
|
* uniform.
|
|
3776
3891
|
* @param uniform_location The uniform's location identifier
|
|
3777
3892
|
* @param value The new value for the uniform
|
|
3893
|
+
* @since 2.0
|
|
3778
3894
|
*/
|
|
3779
3895
|
set_uniform_1f(uniform_location: number, value: number): void;
|
|
3780
3896
|
|
|
@@ -3791,6 +3907,7 @@ export namespace Cogl {
|
|
|
3791
3907
|
* uniform or a sampler uniform.
|
|
3792
3908
|
* @param uniform_location The uniform's location identifier
|
|
3793
3909
|
* @param value The new value for the uniform
|
|
3910
|
+
* @since 2.0
|
|
3794
3911
|
*/
|
|
3795
3912
|
set_uniform_1i(uniform_location: number, value: number): void;
|
|
3796
3913
|
|
|
@@ -3811,6 +3928,7 @@ export namespace Cogl {
|
|
|
3811
3928
|
* @param n_components The number of components in the corresponding uniform's type
|
|
3812
3929
|
* @param count The number of values to set
|
|
3813
3930
|
* @param value Pointer to the new values to set
|
|
3931
|
+
* @since 2.0
|
|
3814
3932
|
*/
|
|
3815
3933
|
set_uniform_float(uniform_location: number, n_components: number, count: number, value: number): void;
|
|
3816
3934
|
|
|
@@ -3831,6 +3949,7 @@ export namespace Cogl {
|
|
|
3831
3949
|
* @param n_components The number of components in the corresponding uniform's type
|
|
3832
3950
|
* @param count The number of values to set
|
|
3833
3951
|
* @param value Pointer to the new values to set
|
|
3952
|
+
* @since 2.0
|
|
3834
3953
|
*/
|
|
3835
3954
|
set_uniform_int(uniform_location: number, n_components: number, count: number, value: number): void;
|
|
3836
3955
|
|
|
@@ -3857,6 +3976,7 @@ export namespace Cogl {
|
|
|
3857
3976
|
* @param count The number of values to set
|
|
3858
3977
|
* @param transpose Whether to transpose the matrix
|
|
3859
3978
|
* @param value Pointer to the new values to set
|
|
3979
|
+
* @since 2.0
|
|
3860
3980
|
*/
|
|
3861
3981
|
set_uniform_matrix(uniform_location: number, dimensions: number, count: number, transpose: boolean, value: number): void;
|
|
3862
3982
|
|
|
@@ -3897,6 +4017,7 @@ export namespace Cogl {
|
|
|
3897
4017
|
* meantime we hope this will handle most practical GLSL and ARBfp
|
|
3898
4018
|
* requirements.
|
|
3899
4019
|
* @param program A {@link Cogl.Handle} to a linked CoglProgram
|
|
4020
|
+
* @since 2.0
|
|
3900
4021
|
*/
|
|
3901
4022
|
set_user_program(program: Handle): void;
|
|
3902
4023
|
}
|
|
@@ -3963,6 +4084,7 @@ export namespace Cogl {
|
|
|
3963
4084
|
* is {@link Cogl.TextureComponents.RGBA}. The other constructors which take
|
|
3964
4085
|
* a %CoglBitmap or a data pointer default to the same components as
|
|
3965
4086
|
* the pixel format of the data.
|
|
4087
|
+
* @since 1.18
|
|
3966
4088
|
*/
|
|
3967
4089
|
get_components(): TextureComponents;
|
|
3968
4090
|
|
|
@@ -4009,6 +4131,7 @@ export namespace Cogl {
|
|
|
4009
4131
|
*
|
|
4010
4132
|
* By default the pre-multipled state is `TRUE`.
|
|
4011
4133
|
* @returns `true` if red, green and blue components are internally stored pre-multiplied by the alpha value or `false` if not.
|
|
4134
|
+
* @since 1.18
|
|
4012
4135
|
*/
|
|
4013
4136
|
get_premultiplied(): boolean;
|
|
4014
4137
|
|
|
@@ -4041,6 +4164,8 @@ export namespace Cogl {
|
|
|
4041
4164
|
* @param sub_width Width in pixels of the subregion
|
|
4042
4165
|
* @param sub_height Height in pixels of the subregion
|
|
4043
4166
|
* @returns A newly created {@link Cogl.Texture} or `null` on failure
|
|
4167
|
+
* @since 1.2
|
|
4168
|
+
* @deprecated since 1.18: Use `cogl_sub_texture_new()`
|
|
4044
4169
|
*/
|
|
4045
4170
|
new_from_sub_texture(sub_x: number, sub_y: number, sub_width: number, sub_height: number): Texture;
|
|
4046
4171
|
|
|
@@ -4065,6 +4190,7 @@ export namespace Cogl {
|
|
|
4065
4190
|
* an image format as long as {@link Cogl.TextureComponents.RG} isn't used
|
|
4066
4191
|
* as the texture's components.
|
|
4067
4192
|
* @param components
|
|
4193
|
+
* @since 1.18
|
|
4068
4194
|
*/
|
|
4069
4195
|
set_components(components: TextureComponents): void;
|
|
4070
4196
|
|
|
@@ -4142,6 +4268,7 @@ export namespace Cogl {
|
|
|
4142
4268
|
*
|
|
4143
4269
|
* By default the `premultipled` state is `TRUE`.
|
|
4144
4270
|
* @param premultiplied Whether any internally stored red, green or blue components are pre-multiplied by an alpha component.
|
|
4271
|
+
* @since 1.18
|
|
4145
4272
|
*/
|
|
4146
4273
|
set_premultiplied(premultiplied: boolean): void;
|
|
4147
4274
|
|
|
@@ -4179,6 +4306,7 @@ export namespace Cogl {
|
|
|
4179
4306
|
* @param dst_height height of destination region to write. (Must be less than or equal to the bitmap height)
|
|
4180
4307
|
* @param bitmap The source bitmap to read from
|
|
4181
4308
|
* @returns `true` if the subregion upload was successful, and `false` otherwise
|
|
4309
|
+
* @since 1.8
|
|
4182
4310
|
*/
|
|
4183
4311
|
set_region_from_bitmap(src_x: number, src_y: number, dst_x: number, dst_y: number, dst_width: number, dst_height: number, bitmap: Bitmap): boolean;
|
|
4184
4312
|
}
|
|
@@ -4237,6 +4365,7 @@ export namespace Cogl {
|
|
|
4237
4365
|
* is {@link Cogl.TextureComponents.RGBA}. The other constructors which take
|
|
4238
4366
|
* a %CoglBitmap or a data pointer default to the same components as
|
|
4239
4367
|
* the pixel format of the data.
|
|
4368
|
+
* @since 1.18
|
|
4240
4369
|
*/
|
|
4241
4370
|
get_components(): TextureComponents;
|
|
4242
4371
|
|
|
@@ -4283,6 +4412,7 @@ export namespace Cogl {
|
|
|
4283
4412
|
*
|
|
4284
4413
|
* By default the pre-multipled state is `TRUE`.
|
|
4285
4414
|
* @returns `true` if red, green and blue components are internally stored pre-multiplied by the alpha value or `false` if not.
|
|
4415
|
+
* @since 1.18
|
|
4286
4416
|
*/
|
|
4287
4417
|
get_premultiplied(): boolean;
|
|
4288
4418
|
|
|
@@ -4315,6 +4445,8 @@ export namespace Cogl {
|
|
|
4315
4445
|
* @param sub_width Width in pixels of the subregion
|
|
4316
4446
|
* @param sub_height Height in pixels of the subregion
|
|
4317
4447
|
* @returns A newly created {@link Cogl.Texture} or `null` on failure
|
|
4448
|
+
* @since 1.2
|
|
4449
|
+
* @deprecated since 1.18: Use `cogl_sub_texture_new()`
|
|
4318
4450
|
*/
|
|
4319
4451
|
new_from_sub_texture(sub_x: number, sub_y: number, sub_width: number, sub_height: number): Texture;
|
|
4320
4452
|
|
|
@@ -4339,6 +4471,7 @@ export namespace Cogl {
|
|
|
4339
4471
|
* an image format as long as {@link Cogl.TextureComponents.RG} isn't used
|
|
4340
4472
|
* as the texture's components.
|
|
4341
4473
|
* @param components
|
|
4474
|
+
* @since 1.18
|
|
4342
4475
|
*/
|
|
4343
4476
|
set_components(components: TextureComponents): void;
|
|
4344
4477
|
|
|
@@ -4416,6 +4549,7 @@ export namespace Cogl {
|
|
|
4416
4549
|
*
|
|
4417
4550
|
* By default the `premultipled` state is `TRUE`.
|
|
4418
4551
|
* @param premultiplied Whether any internally stored red, green or blue components are pre-multiplied by an alpha component.
|
|
4552
|
+
* @since 1.18
|
|
4419
4553
|
*/
|
|
4420
4554
|
set_premultiplied(premultiplied: boolean): void;
|
|
4421
4555
|
|
|
@@ -4453,6 +4587,7 @@ export namespace Cogl {
|
|
|
4453
4587
|
* @param dst_height height of destination region to write. (Must be less than or equal to the bitmap height)
|
|
4454
4588
|
* @param bitmap The source bitmap to read from
|
|
4455
4589
|
* @returns `true` if the subregion upload was successful, and `false` otherwise
|
|
4590
|
+
* @since 1.8
|
|
4456
4591
|
*/
|
|
4457
4592
|
set_region_from_bitmap(src_x: number, src_y: number, dst_x: number, dst_y: number, dst_width: number, dst_height: number, bitmap: Bitmap): boolean;
|
|
4458
4593
|
}
|
|
@@ -4481,6 +4616,7 @@ export namespace Cogl {
|
|
|
4481
4616
|
* parameter, when using {@link Cogl.Color}<!-- -->s as keys in a {@link GLib.HashTable}.
|
|
4482
4617
|
* @param v1 a {@link Cogl.Color}
|
|
4483
4618
|
* @param v2 a {@link Cogl.Color}
|
|
4619
|
+
* @since 1.0
|
|
4484
4620
|
*/
|
|
4485
4621
|
static equal(v1: null, v2: null): boolean;
|
|
4486
4622
|
|
|
@@ -4490,6 +4626,7 @@ export namespace Cogl {
|
|
|
4490
4626
|
* @param hue hue value, in the 0 .. 360 range
|
|
4491
4627
|
* @param saturation saturation value, in the 0 .. 1 range
|
|
4492
4628
|
* @param luminance luminance value, in the 0 .. 1 range
|
|
4629
|
+
* @since 1.16
|
|
4493
4630
|
*/
|
|
4494
4631
|
static init_from_hsl(hue: number, saturation: number, luminance: number): Color;
|
|
4495
4632
|
|
|
@@ -4497,11 +4634,13 @@ export namespace Cogl {
|
|
|
4497
4634
|
/**
|
|
4498
4635
|
* Creates a copy of `color`
|
|
4499
4636
|
* @returns a newly-allocated {@link Cogl.Color}. Use `cogl_color_free()` to free the allocate resources
|
|
4637
|
+
* @since 1.0
|
|
4500
4638
|
*/
|
|
4501
4639
|
copy(): Color;
|
|
4502
4640
|
|
|
4503
4641
|
/**
|
|
4504
4642
|
* Frees the resources allocated by `cogl_color_new()` and `cogl_color_copy()`
|
|
4643
|
+
* @since 1.0
|
|
4505
4644
|
*/
|
|
4506
4645
|
free(): void;
|
|
4507
4646
|
|
|
@@ -4509,6 +4648,7 @@ export namespace Cogl {
|
|
|
4509
4648
|
* Retrieves the alpha channel of `color` as a fixed point
|
|
4510
4649
|
* value between 0 and 1.0.
|
|
4511
4650
|
* @returns the alpha channel of the passed color
|
|
4651
|
+
* @since 1.0
|
|
4512
4652
|
*/
|
|
4513
4653
|
get_alpha(): number;
|
|
4514
4654
|
|
|
@@ -4516,6 +4656,7 @@ export namespace Cogl {
|
|
|
4516
4656
|
* Retrieves the alpha channel of `color` as a byte value
|
|
4517
4657
|
* between 0 and 255
|
|
4518
4658
|
* @returns the alpha channel of the passed color
|
|
4659
|
+
* @since 1.0
|
|
4519
4660
|
*/
|
|
4520
4661
|
get_alpha_byte(): number;
|
|
4521
4662
|
|
|
@@ -4523,6 +4664,7 @@ export namespace Cogl {
|
|
|
4523
4664
|
* Retrieves the alpha channel of `color` as a floating point
|
|
4524
4665
|
* value between 0.0 and 1.0
|
|
4525
4666
|
* @returns the alpha channel of the passed color
|
|
4667
|
+
* @since 1.0
|
|
4526
4668
|
*/
|
|
4527
4669
|
get_alpha_float(): number;
|
|
4528
4670
|
|
|
@@ -4530,6 +4672,7 @@ export namespace Cogl {
|
|
|
4530
4672
|
* Retrieves the blue channel of `color` as a fixed point
|
|
4531
4673
|
* value between 0 and 1.0.
|
|
4532
4674
|
* @returns the blue channel of the passed color
|
|
4675
|
+
* @since 1.0
|
|
4533
4676
|
*/
|
|
4534
4677
|
get_blue(): number;
|
|
4535
4678
|
|
|
@@ -4537,6 +4680,7 @@ export namespace Cogl {
|
|
|
4537
4680
|
* Retrieves the blue channel of `color` as a byte value
|
|
4538
4681
|
* between 0 and 255
|
|
4539
4682
|
* @returns the blue channel of the passed color
|
|
4683
|
+
* @since 1.0
|
|
4540
4684
|
*/
|
|
4541
4685
|
get_blue_byte(): number;
|
|
4542
4686
|
|
|
@@ -4544,6 +4688,7 @@ export namespace Cogl {
|
|
|
4544
4688
|
* Retrieves the blue channel of `color` as a floating point
|
|
4545
4689
|
* value between 0.0 and 1.0
|
|
4546
4690
|
* @returns the blue channel of the passed color
|
|
4691
|
+
* @since 1.0
|
|
4547
4692
|
*/
|
|
4548
4693
|
get_blue_float(): number;
|
|
4549
4694
|
|
|
@@ -4551,6 +4696,7 @@ export namespace Cogl {
|
|
|
4551
4696
|
* Retrieves the green channel of `color` as a fixed point
|
|
4552
4697
|
* value between 0 and 1.0.
|
|
4553
4698
|
* @returns the green channel of the passed color
|
|
4699
|
+
* @since 1.0
|
|
4554
4700
|
*/
|
|
4555
4701
|
get_green(): number;
|
|
4556
4702
|
|
|
@@ -4558,6 +4704,7 @@ export namespace Cogl {
|
|
|
4558
4704
|
* Retrieves the green channel of `color` as a byte value
|
|
4559
4705
|
* between 0 and 255
|
|
4560
4706
|
* @returns the green channel of the passed color
|
|
4707
|
+
* @since 1.0
|
|
4561
4708
|
*/
|
|
4562
4709
|
get_green_byte(): number;
|
|
4563
4710
|
|
|
@@ -4565,6 +4712,7 @@ export namespace Cogl {
|
|
|
4565
4712
|
* Retrieves the green channel of `color` as a floating point
|
|
4566
4713
|
* value between 0.0 and 1.0
|
|
4567
4714
|
* @returns the green channel of the passed color
|
|
4715
|
+
* @since 1.0
|
|
4568
4716
|
*/
|
|
4569
4717
|
get_green_float(): number;
|
|
4570
4718
|
|
|
@@ -4572,6 +4720,7 @@ export namespace Cogl {
|
|
|
4572
4720
|
* Retrieves the red channel of `color` as a fixed point
|
|
4573
4721
|
* value between 0 and 1.0.
|
|
4574
4722
|
* @returns the red channel of the passed color
|
|
4723
|
+
* @since 1.0
|
|
4575
4724
|
*/
|
|
4576
4725
|
get_red(): number;
|
|
4577
4726
|
|
|
@@ -4579,6 +4728,7 @@ export namespace Cogl {
|
|
|
4579
4728
|
* Retrieves the red channel of `color` as a byte value
|
|
4580
4729
|
* between 0 and 255
|
|
4581
4730
|
* @returns the red channel of the passed color
|
|
4731
|
+
* @since 1.0
|
|
4582
4732
|
*/
|
|
4583
4733
|
get_red_byte(): number;
|
|
4584
4734
|
|
|
@@ -4586,6 +4736,7 @@ export namespace Cogl {
|
|
|
4586
4736
|
* Retrieves the red channel of `color` as a floating point
|
|
4587
4737
|
* value between 0.0 and 1.0
|
|
4588
4738
|
* @returns the red channel of the passed color
|
|
4739
|
+
* @since 1.0
|
|
4589
4740
|
*/
|
|
4590
4741
|
get_red_float(): number;
|
|
4591
4742
|
|
|
@@ -4595,12 +4746,14 @@ export namespace Cogl {
|
|
|
4595
4746
|
* @param green value of the green channel, between 0 and 1.0
|
|
4596
4747
|
* @param blue value of the blue channel, between 0 and 1.0
|
|
4597
4748
|
* @param alpha value of the alpha channel, between 0 and 1.0
|
|
4749
|
+
* @since 1.4
|
|
4598
4750
|
*/
|
|
4599
4751
|
init_from_4f(red: number, green: number, blue: number, alpha: number): void;
|
|
4600
4752
|
|
|
4601
4753
|
/**
|
|
4602
4754
|
* Sets the values of the passed channels into a {@link Cogl.Color}
|
|
4603
4755
|
* @param color_array a pointer to an array of 4 float color components
|
|
4756
|
+
* @since 1.4
|
|
4604
4757
|
*/
|
|
4605
4758
|
init_from_4fv(color_array: number): void;
|
|
4606
4759
|
|
|
@@ -4610,6 +4763,7 @@ export namespace Cogl {
|
|
|
4610
4763
|
* @param green value of the green channel, between 0 and 255
|
|
4611
4764
|
* @param blue value of the blue channel, between 0 and 255
|
|
4612
4765
|
* @param alpha value of the alpha channel, between 0 and 255
|
|
4766
|
+
* @since 1.4
|
|
4613
4767
|
*/
|
|
4614
4768
|
init_from_4ub(red: number, green: number, blue: number, alpha: number): void;
|
|
4615
4769
|
|
|
@@ -4617,78 +4771,91 @@ export namespace Cogl {
|
|
|
4617
4771
|
* Converts a non-premultiplied color to a pre-multiplied color. For
|
|
4618
4772
|
* example, semi-transparent red is (1.0, 0, 0, 0.5) when non-premultiplied
|
|
4619
4773
|
* and (0.5, 0, 0, 0.5) when premultiplied.
|
|
4774
|
+
* @since 1.0
|
|
4620
4775
|
*/
|
|
4621
4776
|
premultiply(): void;
|
|
4622
4777
|
|
|
4623
4778
|
/**
|
|
4624
4779
|
* Sets the alpha channel of `color` to `alpha`.
|
|
4625
4780
|
* @param alpha a float value between 0.0f and 1.0f
|
|
4781
|
+
* @since 1.4
|
|
4626
4782
|
*/
|
|
4627
4783
|
set_alpha(alpha: number): void;
|
|
4628
4784
|
|
|
4629
4785
|
/**
|
|
4630
4786
|
* Sets the alpha channel of `color` to `alpha`.
|
|
4631
4787
|
* @param alpha a byte value between 0 and 255
|
|
4788
|
+
* @since 1.4
|
|
4632
4789
|
*/
|
|
4633
4790
|
set_alpha_byte(alpha: number): void;
|
|
4634
4791
|
|
|
4635
4792
|
/**
|
|
4636
4793
|
* Sets the alpha channel of `color` to `alpha`.
|
|
4637
4794
|
* @param alpha a float value between 0.0f and 1.0f
|
|
4795
|
+
* @since 1.4
|
|
4638
4796
|
*/
|
|
4639
4797
|
set_alpha_float(alpha: number): void;
|
|
4640
4798
|
|
|
4641
4799
|
/**
|
|
4642
4800
|
* Sets the blue channel of `color` to `blue`.
|
|
4643
4801
|
* @param blue a float value between 0.0f and 1.0f
|
|
4802
|
+
* @since 1.4
|
|
4644
4803
|
*/
|
|
4645
4804
|
set_blue(blue: number): void;
|
|
4646
4805
|
|
|
4647
4806
|
/**
|
|
4648
4807
|
* Sets the blue channel of `color` to `blue`.
|
|
4649
4808
|
* @param blue a byte value between 0 and 255
|
|
4809
|
+
* @since 1.4
|
|
4650
4810
|
*/
|
|
4651
4811
|
set_blue_byte(blue: number): void;
|
|
4652
4812
|
|
|
4653
4813
|
/**
|
|
4654
4814
|
* Sets the blue channel of `color` to `blue`.
|
|
4655
4815
|
* @param blue a float value between 0.0f and 1.0f
|
|
4816
|
+
* @since 1.4
|
|
4656
4817
|
*/
|
|
4657
4818
|
set_blue_float(blue: number): void;
|
|
4658
4819
|
|
|
4659
4820
|
/**
|
|
4660
4821
|
* Sets the green channel of `color` to `green`.
|
|
4661
4822
|
* @param green a float value between 0.0f and 1.0f
|
|
4823
|
+
* @since 1.4
|
|
4662
4824
|
*/
|
|
4663
4825
|
set_green(green: number): void;
|
|
4664
4826
|
|
|
4665
4827
|
/**
|
|
4666
4828
|
* Sets the green channel of `color` to `green`.
|
|
4667
4829
|
* @param green a byte value between 0 and 255
|
|
4830
|
+
* @since 1.4
|
|
4668
4831
|
*/
|
|
4669
4832
|
set_green_byte(green: number): void;
|
|
4670
4833
|
|
|
4671
4834
|
/**
|
|
4672
4835
|
* Sets the green channel of `color` to `green`.
|
|
4673
4836
|
* @param green a float value between 0.0f and 1.0f
|
|
4837
|
+
* @since 1.4
|
|
4674
4838
|
*/
|
|
4675
4839
|
set_green_float(green: number): void;
|
|
4676
4840
|
|
|
4677
4841
|
/**
|
|
4678
4842
|
* Sets the red channel of `color` to `red`.
|
|
4679
4843
|
* @param red a float value between 0.0f and 1.0f
|
|
4844
|
+
* @since 1.4
|
|
4680
4845
|
*/
|
|
4681
4846
|
set_red(red: number): void;
|
|
4682
4847
|
|
|
4683
4848
|
/**
|
|
4684
4849
|
* Sets the red channel of `color` to `red`.
|
|
4685
4850
|
* @param red a byte value between 0 and 255
|
|
4851
|
+
* @since 1.4
|
|
4686
4852
|
*/
|
|
4687
4853
|
set_red_byte(red: number): void;
|
|
4688
4854
|
|
|
4689
4855
|
/**
|
|
4690
4856
|
* Sets the red channel of `color` to `red`.
|
|
4691
4857
|
* @param red a float value between 0.0f and 1.0f
|
|
4858
|
+
* @since 1.4
|
|
4692
4859
|
*/
|
|
4693
4860
|
set_red_float(red: number): void;
|
|
4694
4861
|
|
|
@@ -4697,6 +4864,7 @@ export namespace Cogl {
|
|
|
4697
4864
|
*
|
|
4698
4865
|
* The `hue` value is in the 0 .. 360 range. The `luminance` and
|
|
4699
4866
|
* `saturation` values are in the 0 .. 1 range.
|
|
4867
|
+
* @since 1.16
|
|
4700
4868
|
*/
|
|
4701
4869
|
to_hsl(): [number, number, number];
|
|
4702
4870
|
|
|
@@ -4704,6 +4872,7 @@ export namespace Cogl {
|
|
|
4704
4872
|
* Converts a pre-multiplied color to a non-premultiplied color. For
|
|
4705
4873
|
* example, semi-transparent red is (0.5, 0, 0, 0.5) when premultiplied
|
|
4706
4874
|
* and (1.0, 0, 0, 0.5) when non-premultiplied.
|
|
4875
|
+
* @since 1.4
|
|
4707
4876
|
*/
|
|
4708
4877
|
unpremultiply(): void;
|
|
4709
4878
|
}
|
|
@@ -4773,6 +4942,8 @@ export namespace Cogl {
|
|
|
4773
4942
|
* The default is {@link Cogl.MaterialAlphaFunc.ALWAYS}
|
|
4774
4943
|
* @param alpha_func A `CoglMaterialAlphaFunc` constant
|
|
4775
4944
|
* @param alpha_reference A reference point that the chosen alpha function uses to compare incoming fragments to.
|
|
4945
|
+
* @since 1.0
|
|
4946
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_alpha_test_function()` instead
|
|
4776
4947
|
*/
|
|
4777
4948
|
set_alpha_test_function(alpha_func: MaterialAlphaFunc, alpha_reference: number): void;
|
|
4778
4949
|
|
|
@@ -4847,6 +5018,8 @@ export namespace Cogl {
|
|
|
4847
5018
|
* is in premultiplied form.
|
|
4848
5019
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired blend function.
|
|
4849
5020
|
* @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).
|
|
5021
|
+
* @since 1.0
|
|
5022
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_blend()` instead
|
|
4850
5023
|
*/
|
|
4851
5024
|
set_blend(blend_string: string): boolean;
|
|
4852
5025
|
|
|
@@ -4854,6 +5027,8 @@ export namespace Cogl {
|
|
|
4854
5027
|
* When blending is setup to reference a CONSTANT blend factor then
|
|
4855
5028
|
* blending will depend on the constant set with this function.
|
|
4856
5029
|
* @param constant_color The constant color you want
|
|
5030
|
+
* @since 1.0
|
|
5031
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_blend_constant()` instead
|
|
4857
5032
|
*/
|
|
4858
5033
|
set_blend_constant(constant_color: Color): void;
|
|
4859
5034
|
|
|
@@ -4867,6 +5042,8 @@ export namespace Cogl {
|
|
|
4867
5042
|
*
|
|
4868
5043
|
* The default value is (1.0, 1.0, 1.0, 1.0)
|
|
4869
5044
|
* @param color The components of the color
|
|
5045
|
+
* @since 1.0
|
|
5046
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_color()` instead
|
|
4870
5047
|
*/
|
|
4871
5048
|
set_color(color: Color): void;
|
|
4872
5049
|
|
|
@@ -4878,6 +5055,8 @@ export namespace Cogl {
|
|
|
4878
5055
|
* @param green The green component
|
|
4879
5056
|
* @param blue The blue component
|
|
4880
5057
|
* @param alpha The alpha component
|
|
5058
|
+
* @since 1.0
|
|
5059
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_color4ub()` instead
|
|
4881
5060
|
*/
|
|
4882
5061
|
set_color4ub(red: number, green: number, blue: number, alpha: number): void;
|
|
4883
5062
|
|
|
@@ -4894,6 +5073,8 @@ export namespace Cogl {
|
|
|
4894
5073
|
* as purely GLSL based layers.</note>
|
|
4895
5074
|
* @param layer_index the index of the layer
|
|
4896
5075
|
* @param texture a {@link Cogl.Handle} for the layer object
|
|
5076
|
+
* @since 1.0
|
|
5077
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer()` instead
|
|
4897
5078
|
*/
|
|
4898
5079
|
set_layer(layer_index: number, texture: Handle): void;
|
|
4899
5080
|
|
|
@@ -4976,6 +5157,8 @@ export namespace Cogl {
|
|
|
4976
5157
|
* @param layer_index Specifies the layer you want define a combine function for
|
|
4977
5158
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired texture combine function.
|
|
4978
5159
|
* @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
|
|
5160
|
+
* @since 1.0
|
|
5161
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_combine()` instead
|
|
4979
5162
|
*/
|
|
4980
5163
|
set_layer_combine(layer_index: number, blend_string: string): boolean;
|
|
4981
5164
|
|
|
@@ -4984,6 +5167,8 @@ export namespace Cogl {
|
|
|
4984
5167
|
* description then you can use this function to define its value.
|
|
4985
5168
|
* @param layer_index Specifies the layer you want to specify a constant used for texture combining
|
|
4986
5169
|
* @param constant The constant color you want
|
|
5170
|
+
* @since 1.0
|
|
5171
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_combine_constant()` instead
|
|
4987
5172
|
*/
|
|
4988
5173
|
set_layer_combine_constant(layer_index: number, constant: Color): void;
|
|
4989
5174
|
|
|
@@ -4993,6 +5178,7 @@ export namespace Cogl {
|
|
|
4993
5178
|
* @param layer_index the layer number to change.
|
|
4994
5179
|
* @param min_filter the filter used when scaling a texture down.
|
|
4995
5180
|
* @param mag_filter the filter used when magnifying a texture.
|
|
5181
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_filters()` instead
|
|
4996
5182
|
*/
|
|
4997
5183
|
set_layer_filters(layer_index: number, min_filter: MaterialFilter, mag_filter: MaterialFilter): void;
|
|
4998
5184
|
|
|
@@ -5001,6 +5187,7 @@ export namespace Cogl {
|
|
|
5001
5187
|
* and rotate a single layer of a material used to fill your geometry.
|
|
5002
5188
|
* @param layer_index the index for the layer inside `material`
|
|
5003
5189
|
* @param matrix the transformation matrix for the layer
|
|
5190
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_matrix()` instead
|
|
5004
5191
|
*/
|
|
5005
5192
|
set_layer_matrix(layer_index: number, matrix: Graphene.Matrix): void;
|
|
5006
5193
|
|
|
@@ -5014,6 +5201,8 @@ export namespace Cogl {
|
|
|
5014
5201
|
* @param layer_index the layer number to change.
|
|
5015
5202
|
* @param enable whether to enable point sprite coord generation.
|
|
5016
5203
|
* @returns `true` if the function succeeds, `false` otherwise.
|
|
5204
|
+
* @since 1.4
|
|
5205
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_point_sprite_coords_enabled()` instead
|
|
5017
5206
|
*/
|
|
5018
5207
|
set_layer_point_sprite_coords_enabled(layer_index: number, enable: boolean): boolean;
|
|
5019
5208
|
|
|
@@ -5026,6 +5215,8 @@ export namespace Cogl {
|
|
|
5026
5215
|
* screen space so it will be the same regardless of any
|
|
5027
5216
|
* transformations. The default point size is 1.0.
|
|
5028
5217
|
* @param point_size the new point size.
|
|
5218
|
+
* @since 1.4
|
|
5219
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_point_size()` instead
|
|
5029
5220
|
*/
|
|
5030
5221
|
set_point_size(point_size: number): void;
|
|
5031
5222
|
|
|
@@ -5066,6 +5257,8 @@ export namespace Cogl {
|
|
|
5066
5257
|
* meantime we hope this will handle most practical GLSL and ARBfp
|
|
5067
5258
|
* requirements.
|
|
5068
5259
|
* @param program A {@link Cogl.Handle} to a linked CoglProgram
|
|
5260
|
+
* @since 1.4
|
|
5261
|
+
* @deprecated since 1.16: Use `CoglSnippet` api instead instead
|
|
5069
5262
|
*/
|
|
5070
5263
|
set_user_program(program: Handle): void;
|
|
5071
5264
|
}
|
|
@@ -5328,6 +5521,7 @@ export namespace Cogl {
|
|
|
5328
5521
|
* is {@link Cogl.TextureComponents.RGBA}. The other constructors which take
|
|
5329
5522
|
* a %CoglBitmap or a data pointer default to the same components as
|
|
5330
5523
|
* the pixel format of the data.
|
|
5524
|
+
* @since 1.18
|
|
5331
5525
|
*/
|
|
5332
5526
|
get_components(): TextureComponents;
|
|
5333
5527
|
|
|
@@ -5374,6 +5568,7 @@ export namespace Cogl {
|
|
|
5374
5568
|
*
|
|
5375
5569
|
* By default the pre-multipled state is `TRUE`.
|
|
5376
5570
|
* @returns `true` if red, green and blue components are internally stored pre-multiplied by the alpha value or `false` if not.
|
|
5571
|
+
* @since 1.18
|
|
5377
5572
|
*/
|
|
5378
5573
|
get_premultiplied(): boolean;
|
|
5379
5574
|
|
|
@@ -5406,6 +5601,8 @@ export namespace Cogl {
|
|
|
5406
5601
|
* @param sub_width Width in pixels of the subregion
|
|
5407
5602
|
* @param sub_height Height in pixels of the subregion
|
|
5408
5603
|
* @returns A newly created {@link Cogl.Texture} or `null` on failure
|
|
5604
|
+
* @since 1.2
|
|
5605
|
+
* @deprecated since 1.18: Use `cogl_sub_texture_new()`
|
|
5409
5606
|
*/
|
|
5410
5607
|
new_from_sub_texture(sub_x: number, sub_y: number, sub_width: number, sub_height: number): Texture;
|
|
5411
5608
|
|
|
@@ -5430,6 +5627,7 @@ export namespace Cogl {
|
|
|
5430
5627
|
* an image format as long as {@link Cogl.TextureComponents.RG} isn't used
|
|
5431
5628
|
* as the texture's components.
|
|
5432
5629
|
* @param components
|
|
5630
|
+
* @since 1.18
|
|
5433
5631
|
*/
|
|
5434
5632
|
set_components(components: TextureComponents): void;
|
|
5435
5633
|
|
|
@@ -5507,6 +5705,7 @@ export namespace Cogl {
|
|
|
5507
5705
|
*
|
|
5508
5706
|
* By default the `premultipled` state is `TRUE`.
|
|
5509
5707
|
* @param premultiplied Whether any internally stored red, green or blue components are pre-multiplied by an alpha component.
|
|
5708
|
+
* @since 1.18
|
|
5510
5709
|
*/
|
|
5511
5710
|
set_premultiplied(premultiplied: boolean): void;
|
|
5512
5711
|
|
|
@@ -5544,6 +5743,7 @@ export namespace Cogl {
|
|
|
5544
5743
|
* @param dst_height height of destination region to write. (Must be less than or equal to the bitmap height)
|
|
5545
5744
|
* @param bitmap The source bitmap to read from
|
|
5546
5745
|
* @returns `true` if the subregion upload was successful, and `false` otherwise
|
|
5746
|
+
* @since 1.8
|
|
5547
5747
|
*/
|
|
5548
5748
|
set_region_from_bitmap(src_x: number, src_y: number, dst_x: number, dst_y: number, dst_width: number, dst_height: number, bitmap: Bitmap): boolean;
|
|
5549
5749
|
}
|