@girs/cogl-6 4.3.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 +1 -1
- package/cogl-6.d.ts +316 -0
- package/package.json +7 -7
package/cogl-6.d.ts
CHANGED
|
@@ -1743,27 +1743,32 @@ export namespace Cogl {
|
|
|
1743
1743
|
* Parses an image file enough to extract the width and height
|
|
1744
1744
|
* of the bitmap.
|
|
1745
1745
|
* @param filename the file to check
|
|
1746
|
+
* @since 1.0
|
|
1746
1747
|
*/
|
|
1747
1748
|
static get_size_from_file(filename: string): [boolean, number, number];
|
|
1748
1749
|
|
|
1749
1750
|
// Methods
|
|
1750
1751
|
/**
|
|
1751
1752
|
* @returns the {@link Cogl.PixelFormat} that the data for the bitmap is in.
|
|
1753
|
+
* @since 1.10
|
|
1752
1754
|
*/
|
|
1753
1755
|
get_format(): PixelFormat;
|
|
1754
1756
|
|
|
1755
1757
|
/**
|
|
1756
1758
|
* @returns the height of the bitmap
|
|
1759
|
+
* @since 1.10
|
|
1757
1760
|
*/
|
|
1758
1761
|
get_height(): number;
|
|
1759
1762
|
|
|
1760
1763
|
/**
|
|
1761
1764
|
* @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.
|
|
1765
|
+
* @since 1.10
|
|
1762
1766
|
*/
|
|
1763
1767
|
get_rowstride(): number;
|
|
1764
1768
|
|
|
1765
1769
|
/**
|
|
1766
1770
|
* @returns the width of the bitmap
|
|
1771
|
+
* @since 1.10
|
|
1767
1772
|
*/
|
|
1768
1773
|
get_width(): number;
|
|
1769
1774
|
}
|
|
@@ -1870,6 +1875,7 @@ export namespace Cogl {
|
|
|
1870
1875
|
* program will abort with an error message if there is an error during
|
|
1871
1876
|
* automatic allocation.</note>
|
|
1872
1877
|
* @returns `true` if there were no error allocating the framebuffer, else `false`.
|
|
1878
|
+
* @since 1.8
|
|
1873
1879
|
*/
|
|
1874
1880
|
allocate(): boolean;
|
|
1875
1881
|
|
|
@@ -1878,6 +1884,7 @@ export namespace Cogl {
|
|
|
1878
1884
|
* that includes the color buffer then the specified `color` is used.
|
|
1879
1885
|
* @param buffers A mask of {@link Cogl.BufferBit}<!-- -->'s identifying which auxiliary buffers to clear
|
|
1880
1886
|
* @param color The color to clear the color buffer too if specified in `buffers`.
|
|
1887
|
+
* @since 1.8
|
|
1881
1888
|
*/
|
|
1882
1889
|
clear(buffers: bigint | number, color: Color): void;
|
|
1883
1890
|
|
|
@@ -1889,6 +1896,7 @@ export namespace Cogl {
|
|
|
1889
1896
|
* @param green The green component of color to clear the color buffer too if specified in `buffers`.
|
|
1890
1897
|
* @param blue The blue component of color to clear the color buffer too if specified in `buffers`.
|
|
1891
1898
|
* @param alpha The alpha component of color to clear the color buffer too if specified in `buffers`.
|
|
1899
|
+
* @since 1.8
|
|
1892
1900
|
*/
|
|
1893
1901
|
clear4f(buffers: bigint | number, red: number, green: number, blue: number, alpha: number): void;
|
|
1894
1902
|
|
|
@@ -1910,6 +1918,7 @@ export namespace Cogl {
|
|
|
1910
1918
|
* framebuffer, and it's not meaningful to try and discard the color buffer of
|
|
1911
1919
|
* a {@link Cogl.Offscreen} framebuffer since they are single-buffered.
|
|
1912
1920
|
* @param buffers A {@link Cogl.BufferBit} mask of which ancillary buffers you want to discard.
|
|
1921
|
+
* @since 1.8
|
|
1913
1922
|
*/
|
|
1914
1923
|
discard_buffers(buffers: bigint | number): void;
|
|
1915
1924
|
|
|
@@ -1959,6 +1968,7 @@ export namespace Cogl {
|
|
|
1959
1968
|
* @param y_2 y coordinate lower right on screen.
|
|
1960
1969
|
* @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.
|
|
1961
1970
|
* @param tex_coords_len The length of the `tex_coords` array. (For one layer and one group of texture coordinates, this would be 4)
|
|
1971
|
+
* @since 1.10
|
|
1962
1972
|
*/
|
|
1963
1973
|
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;
|
|
1964
1974
|
|
|
@@ -1979,6 +1989,7 @@ export namespace Cogl {
|
|
|
1979
1989
|
* @param y_1 Y coordinate of the top-left corner
|
|
1980
1990
|
* @param x_2 X coordinate of the bottom-right corner
|
|
1981
1991
|
* @param y_2 Y coordinate of the bottom-right corner
|
|
1992
|
+
* @since 1.10
|
|
1982
1993
|
*/
|
|
1983
1994
|
draw_rectangle(pipeline: Pipeline, x_1: number, y_1: number, x_2: number, y_2: number): void;
|
|
1984
1995
|
|
|
@@ -2005,6 +2016,7 @@ export namespace Cogl {
|
|
|
2005
2016
|
* @param pipeline A {@link Cogl.Pipeline} state object
|
|
2006
2017
|
* @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).
|
|
2007
2018
|
* @param n_rectangles number of rectangles defined in `coordinates`.
|
|
2019
|
+
* @since 1.10
|
|
2008
2020
|
*/
|
|
2009
2021
|
draw_rectangles(pipeline: Pipeline, coordinates: number[], n_rectangles: number): void;
|
|
2010
2022
|
|
|
@@ -2044,6 +2056,7 @@ export namespace Cogl {
|
|
|
2044
2056
|
* @param t_1 T texture coordinate of the top-left coorner
|
|
2045
2057
|
* @param s_2 S texture coordinate of the bottom-right coorner
|
|
2046
2058
|
* @param t_2 T texture coordinate of the bottom-right coorner
|
|
2059
|
+
* @since 1.10
|
|
2047
2060
|
*/
|
|
2048
2061
|
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;
|
|
2049
2062
|
|
|
@@ -2085,6 +2098,7 @@ export namespace Cogl {
|
|
|
2085
2098
|
* @param pipeline A {@link Cogl.Pipeline} state object
|
|
2086
2099
|
* @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()`.
|
|
2087
2100
|
* @param n_rectangles number of rectangles to `coordinates` to draw
|
|
2101
|
+
* @since 1.10
|
|
2088
2102
|
*/
|
|
2089
2103
|
draw_textured_rectangles(pipeline: Pipeline, coordinates: number[], n_rectangles: number): void;
|
|
2090
2104
|
|
|
@@ -2098,6 +2112,7 @@ export namespace Cogl {
|
|
|
2098
2112
|
* One example might be for benchmarking purposes to be sure timing
|
|
2099
2113
|
* measurements reflect the time that the GPU is busy for not just the time it
|
|
2100
2114
|
* takes to queue rendering commands.
|
|
2115
|
+
* @since 1.10
|
|
2101
2116
|
*/
|
|
2102
2117
|
finish(): void;
|
|
2103
2118
|
|
|
@@ -2119,18 +2134,21 @@ export namespace Cogl {
|
|
|
2119
2134
|
* @param top Y position of the top clipping plane where it intersects the near clipping plane
|
|
2120
2135
|
* @param z_near The distance to the near clipping plane (Must be positive)
|
|
2121
2136
|
* @param z_far The distance to the far clipping plane (Must be positive)
|
|
2137
|
+
* @since 1.10
|
|
2122
2138
|
*/
|
|
2123
2139
|
frustum(left: number, right: number, bottom: number, top: number, z_near: number, z_far: number): void;
|
|
2124
2140
|
|
|
2125
2141
|
/**
|
|
2126
2142
|
* Retrieves the number of alpha bits of `framebuffer`
|
|
2127
2143
|
* @returns the number of bits
|
|
2144
|
+
* @since 1.8
|
|
2128
2145
|
*/
|
|
2129
2146
|
get_alpha_bits(): number;
|
|
2130
2147
|
|
|
2131
2148
|
/**
|
|
2132
2149
|
* Retrieves the number of blue bits of `framebuffer`
|
|
2133
2150
|
* @returns the number of bits
|
|
2151
|
+
* @since 1.8
|
|
2134
2152
|
*/
|
|
2135
2153
|
get_blue_bits(): number;
|
|
2136
2154
|
|
|
@@ -2139,12 +2157,14 @@ export namespace Cogl {
|
|
|
2139
2157
|
* instantiated within. This is the {@link Cogl.Context} that was passed to
|
|
2140
2158
|
* `cogl_onscreen_new()` for example.
|
|
2141
2159
|
* @returns The {@link Cogl.Context} that the given `framebuffer` was instantiated within.
|
|
2160
|
+
* @since 1.8
|
|
2142
2161
|
*/
|
|
2143
2162
|
get_context(): Context;
|
|
2144
2163
|
|
|
2145
2164
|
/**
|
|
2146
2165
|
* Retrieves the number of depth bits of `framebuffer`
|
|
2147
2166
|
* @returns the number of bits
|
|
2167
|
+
* @since 2.0
|
|
2148
2168
|
*/
|
|
2149
2169
|
get_depth_bits(): number;
|
|
2150
2170
|
|
|
@@ -2152,6 +2172,7 @@ export namespace Cogl {
|
|
|
2152
2172
|
* Queries whether depth buffer writing is enabled for `framebuffer`. This
|
|
2153
2173
|
* can be controlled via `cogl_framebuffer_set_depth_write_enabled()`.
|
|
2154
2174
|
* @returns `true` if depth writing is enabled or `false` if not.
|
|
2175
|
+
* @since 1.18
|
|
2155
2176
|
*/
|
|
2156
2177
|
get_depth_write_enabled(): boolean;
|
|
2157
2178
|
|
|
@@ -2163,18 +2184,21 @@ export namespace Cogl {
|
|
|
2163
2184
|
* display pipeline does not support dithering. This value only represents
|
|
2164
2185
|
* the user's request for dithering.</note>
|
|
2165
2186
|
* @returns `true` if dithering has been requested or `false` if not.
|
|
2187
|
+
* @since 1.8
|
|
2166
2188
|
*/
|
|
2167
2189
|
get_dither_enabled(): boolean;
|
|
2168
2190
|
|
|
2169
2191
|
/**
|
|
2170
2192
|
* Retrieves the number of green bits of `framebuffer`
|
|
2171
2193
|
* @returns the number of bits
|
|
2194
|
+
* @since 1.8
|
|
2172
2195
|
*/
|
|
2173
2196
|
get_green_bits(): number;
|
|
2174
2197
|
|
|
2175
2198
|
/**
|
|
2176
2199
|
* Queries the current height of the given `framebuffer`.
|
|
2177
2200
|
* @returns The height of `framebuffer`.
|
|
2201
|
+
* @since 1.8
|
|
2178
2202
|
*/
|
|
2179
2203
|
get_height(): number;
|
|
2180
2204
|
|
|
@@ -2182,17 +2206,20 @@ export namespace Cogl {
|
|
|
2182
2206
|
|
|
2183
2207
|
/**
|
|
2184
2208
|
* Stores the current model-view matrix in `matrix`.
|
|
2209
|
+
* @since 1.10
|
|
2185
2210
|
*/
|
|
2186
2211
|
get_modelview_matrix(): Matrix;
|
|
2187
2212
|
|
|
2188
2213
|
/**
|
|
2189
2214
|
* Stores the current projection matrix in `matrix`.
|
|
2215
|
+
* @since 1.10
|
|
2190
2216
|
*/
|
|
2191
2217
|
get_projection_matrix(): Matrix;
|
|
2192
2218
|
|
|
2193
2219
|
/**
|
|
2194
2220
|
* Retrieves the number of red bits of `framebuffer`
|
|
2195
2221
|
* @returns the number of bits
|
|
2222
|
+
* @since 1.8
|
|
2196
2223
|
*/
|
|
2197
2224
|
get_red_bits(): number;
|
|
2198
2225
|
|
|
@@ -2210,6 +2237,7 @@ export namespace Cogl {
|
|
|
2210
2237
|
* framebuffer has been allocated the value will reflect the actual
|
|
2211
2238
|
* number of samples that will be made by the GPU.
|
|
2212
2239
|
* @returns The number of point samples made per pixel when rasterizing geometry or 0 if single-sample rendering has been chosen.
|
|
2240
|
+
* @since 1.10
|
|
2213
2241
|
*/
|
|
2214
2242
|
get_samples_per_pixel(): number;
|
|
2215
2243
|
|
|
@@ -2217,6 +2245,7 @@ export namespace Cogl {
|
|
|
2217
2245
|
* Gets the current {@link Cogl.StereoMode}, which defines which stereo buffers
|
|
2218
2246
|
* should be drawn to. See `cogl_framebuffer_set_stereo_mode()`.
|
|
2219
2247
|
* @returns A {@link Cogl.StereoMode}
|
|
2248
|
+
* @since 1.20
|
|
2220
2249
|
*/
|
|
2221
2250
|
get_stereo_mode(): StereoMode;
|
|
2222
2251
|
|
|
@@ -2225,6 +2254,7 @@ export namespace Cogl {
|
|
|
2225
2254
|
* using `cogl_framebuffer_set_viewport()` or the default values which are 0, 0,
|
|
2226
2255
|
* framebuffer_width and framebuffer_height. The values are written into the
|
|
2227
2256
|
* given `viewport` array.
|
|
2257
|
+
* @since 1.8
|
|
2228
2258
|
*/
|
|
2229
2259
|
get_viewport4fv(): number[];
|
|
2230
2260
|
|
|
@@ -2232,6 +2262,7 @@ export namespace Cogl {
|
|
|
2232
2262
|
* Queries the height of the viewport as set using `cogl_framebuffer_set_viewport()`
|
|
2233
2263
|
* or the default value which is the height of the framebuffer.
|
|
2234
2264
|
* @returns The height of the viewport.
|
|
2265
|
+
* @since 1.8
|
|
2235
2266
|
*/
|
|
2236
2267
|
get_viewport_height(): number;
|
|
2237
2268
|
|
|
@@ -2239,6 +2270,7 @@ export namespace Cogl {
|
|
|
2239
2270
|
* Queries the width of the viewport as set using `cogl_framebuffer_set_viewport()`
|
|
2240
2271
|
* or the default value which is the width of the framebuffer.
|
|
2241
2272
|
* @returns The width of the viewport.
|
|
2273
|
+
* @since 1.8
|
|
2242
2274
|
*/
|
|
2243
2275
|
get_viewport_width(): number;
|
|
2244
2276
|
|
|
@@ -2246,6 +2278,7 @@ export namespace Cogl {
|
|
|
2246
2278
|
* Queries the x coordinate of the viewport origin as set using `cogl_framebuffer_set_viewport()`
|
|
2247
2279
|
* or the default value which is 0.
|
|
2248
2280
|
* @returns The x coordinate of the viewport origin.
|
|
2281
|
+
* @since 1.8
|
|
2249
2282
|
*/
|
|
2250
2283
|
get_viewport_x(): number;
|
|
2251
2284
|
|
|
@@ -2253,17 +2286,20 @@ export namespace Cogl {
|
|
|
2253
2286
|
* Queries the y coordinate of the viewport origin as set using `cogl_framebuffer_set_viewport()`
|
|
2254
2287
|
* or the default value which is 0.
|
|
2255
2288
|
* @returns The y coordinate of the viewport origin.
|
|
2289
|
+
* @since 1.8
|
|
2256
2290
|
*/
|
|
2257
2291
|
get_viewport_y(): number;
|
|
2258
2292
|
|
|
2259
2293
|
/**
|
|
2260
2294
|
* Queries the current width of the given `framebuffer`.
|
|
2261
2295
|
* @returns The width of `framebuffer`.
|
|
2296
|
+
* @since 1.8
|
|
2262
2297
|
*/
|
|
2263
2298
|
get_width(): number;
|
|
2264
2299
|
|
|
2265
2300
|
/**
|
|
2266
2301
|
* Resets the current model-view matrix to the identity matrix.
|
|
2302
|
+
* @since 1.10
|
|
2267
2303
|
*/
|
|
2268
2304
|
identity_matrix(): void;
|
|
2269
2305
|
|
|
@@ -2276,6 +2312,7 @@ export namespace Cogl {
|
|
|
2276
2312
|
* @param y_2 The y coordinate for the second horizontal clipping plane
|
|
2277
2313
|
* @param near The <emphasis>distance</emphasis> to the near clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
2278
2314
|
* @param far The <emphasis>distance</emphasis> to the far clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
2315
|
+
* @since 1.10
|
|
2279
2316
|
*/
|
|
2280
2317
|
orthographic(x_1: number, y_1: number, x_2: number, y_2: number, near: number, far: number): void;
|
|
2281
2318
|
|
|
@@ -2291,6 +2328,7 @@ export namespace Cogl {
|
|
|
2291
2328
|
* @param aspect The (width over height) aspect ratio for display
|
|
2292
2329
|
* @param z_near The distance to the near clipping plane (Must be positive, and must not be 0)
|
|
2293
2330
|
* @param z_far The distance to the far clipping plane (Must be positive)
|
|
2331
|
+
* @since 1.10
|
|
2294
2332
|
*/
|
|
2295
2333
|
perspective(fov_y: number, aspect: number, z_near: number, z_far: number): void;
|
|
2296
2334
|
|
|
@@ -2298,17 +2336,20 @@ export namespace Cogl {
|
|
|
2298
2336
|
* Reverts the clipping region to the state before the last call to
|
|
2299
2337
|
* `cogl_framebuffer_push_scissor_clip()`, `cogl_framebuffer_push_rectangle_clip()`
|
|
2300
2338
|
* `cogl_framebuffer_push_path_clip()`, or `cogl_framebuffer_push_primitive_clip()`.
|
|
2339
|
+
* @since 1.10
|
|
2301
2340
|
*/
|
|
2302
2341
|
pop_clip(): void;
|
|
2303
2342
|
|
|
2304
2343
|
/**
|
|
2305
2344
|
* Restores the model-view matrix on the top of the matrix stack.
|
|
2345
|
+
* @since 1.10
|
|
2306
2346
|
*/
|
|
2307
2347
|
pop_matrix(): void;
|
|
2308
2348
|
|
|
2309
2349
|
/**
|
|
2310
2350
|
* Copies the current model-view matrix onto the matrix stack. The matrix
|
|
2311
2351
|
* can later be restored with `cogl_framebuffer_pop_matrix()`.
|
|
2352
|
+
* @since 1.10
|
|
2312
2353
|
*/
|
|
2313
2354
|
push_matrix(): void;
|
|
2314
2355
|
|
|
@@ -2325,6 +2366,7 @@ export namespace Cogl {
|
|
|
2325
2366
|
* @param y_1 y coordinate for top left corner of the clip rectangle
|
|
2326
2367
|
* @param x_2 x coordinate for bottom right corner of the clip rectangle
|
|
2327
2368
|
* @param y_2 y coordinate for bottom right corner of the clip rectangle
|
|
2369
|
+
* @since 1.10
|
|
2328
2370
|
*/
|
|
2329
2371
|
push_rectangle_clip(x_1: number, y_1: number, x_2: number, y_2: number): void;
|
|
2330
2372
|
|
|
@@ -2346,6 +2388,7 @@ export namespace Cogl {
|
|
|
2346
2388
|
* @param y top edge of the clip rectangle in window coordinates
|
|
2347
2389
|
* @param width width of the clip rectangle
|
|
2348
2390
|
* @param height height of the clip rectangle
|
|
2391
|
+
* @since 1.10
|
|
2349
2392
|
*/
|
|
2350
2393
|
push_scissor_clip(x: number, y: number, width: number, height: number): void;
|
|
2351
2394
|
|
|
@@ -2383,6 +2426,7 @@ export namespace Cogl {
|
|
|
2383
2426
|
* @param format The pixel format to store the data in
|
|
2384
2427
|
* @param pixels The address of the buffer to store the data in
|
|
2385
2428
|
* @returns `true` if the read succeeded or `false` otherwise.
|
|
2429
|
+
* @since 1.10
|
|
2386
2430
|
*/
|
|
2387
2431
|
read_pixels(x: number, y: number, width: number, height: number, format: PixelFormat, pixels: number): boolean;
|
|
2388
2432
|
|
|
@@ -2402,6 +2446,7 @@ export namespace Cogl {
|
|
|
2402
2446
|
* @param source Identifies which auxillary buffer you want to read (only COGL_READ_PIXELS_COLOR_BUFFER supported currently)
|
|
2403
2447
|
* @param bitmap The bitmap to store the results in.
|
|
2404
2448
|
* @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.
|
|
2449
|
+
* @since 1.10
|
|
2405
2450
|
*/
|
|
2406
2451
|
read_pixels_into_bitmap(x: number, y: number, source: ReadPixelsFlags, bitmap: Bitmap): boolean;
|
|
2407
2452
|
|
|
@@ -2426,6 +2471,7 @@ export namespace Cogl {
|
|
|
2426
2471
|
* If you are performing incremental updates to a framebuffer you
|
|
2427
2472
|
* should consider using `cogl_framebuffer_resolve_samples_region()`
|
|
2428
2473
|
* instead to avoid resolving redundant pixels.
|
|
2474
|
+
* @since 1.8
|
|
2429
2475
|
*/
|
|
2430
2476
|
resolve_samples(): void;
|
|
2431
2477
|
|
|
@@ -2455,6 +2501,7 @@ export namespace Cogl {
|
|
|
2455
2501
|
* @param y top-left y coordinate of region to resolve
|
|
2456
2502
|
* @param width width of region to resolve
|
|
2457
2503
|
* @param height height of region to resolve
|
|
2504
|
+
* @since 1.8
|
|
2458
2505
|
*/
|
|
2459
2506
|
resolve_samples_region(x: number, y: number, width: number, height: number): void;
|
|
2460
2507
|
|
|
@@ -2468,6 +2515,7 @@ export namespace Cogl {
|
|
|
2468
2515
|
* @param x X-component of vertex to rotate around.
|
|
2469
2516
|
* @param y Y-component of vertex to rotate around.
|
|
2470
2517
|
* @param z Z-component of vertex to rotate around.
|
|
2518
|
+
* @since 1.10
|
|
2471
2519
|
*/
|
|
2472
2520
|
rotate(angle: number, x: number, y: number, z: number): void;
|
|
2473
2521
|
|
|
@@ -2475,6 +2523,7 @@ export namespace Cogl {
|
|
|
2475
2523
|
* Multiplies the current model-view matrix by one that rotates
|
|
2476
2524
|
* according to the rotation described by `euler`.
|
|
2477
2525
|
* @param euler A {@link Graphene.Euler}
|
|
2526
|
+
* @since 2.0
|
|
2478
2527
|
*/
|
|
2479
2528
|
rotate_euler(euler: Graphene.Euler): void;
|
|
2480
2529
|
|
|
@@ -2484,6 +2533,7 @@ export namespace Cogl {
|
|
|
2484
2533
|
* @param x Amount to scale along the x-axis
|
|
2485
2534
|
* @param y Amount to scale along the y-axis
|
|
2486
2535
|
* @param z Amount to scale along the z-axis
|
|
2536
|
+
* @since 1.10
|
|
2487
2537
|
*/
|
|
2488
2538
|
scale(x: number, y: number, z: number): void;
|
|
2489
2539
|
|
|
@@ -2495,6 +2545,7 @@ export namespace Cogl {
|
|
|
2495
2545
|
*
|
|
2496
2546
|
* Depth buffer writing is enabled by default.
|
|
2497
2547
|
* @param depth_write_enabled `true` to enable depth writing or `false` to disable
|
|
2548
|
+
* @since 1.18
|
|
2498
2549
|
*/
|
|
2499
2550
|
set_depth_write_enabled(depth_write_enabled: boolean): void;
|
|
2500
2551
|
|
|
@@ -2513,18 +2564,21 @@ export namespace Cogl {
|
|
|
2513
2564
|
*
|
|
2514
2565
|
* Dithering is enabled by default.
|
|
2515
2566
|
* @param dither_enabled `true` to enable dithering or `false` to disable
|
|
2567
|
+
* @since 1.8
|
|
2516
2568
|
*/
|
|
2517
2569
|
set_dither_enabled(dither_enabled: boolean): void;
|
|
2518
2570
|
|
|
2519
2571
|
/**
|
|
2520
2572
|
* Sets `matrix` as the new model-view matrix.
|
|
2521
2573
|
* @param matrix the new model-view matrix
|
|
2574
|
+
* @since 1.10
|
|
2522
2575
|
*/
|
|
2523
2576
|
set_modelview_matrix(matrix: Matrix): void;
|
|
2524
2577
|
|
|
2525
2578
|
/**
|
|
2526
2579
|
* Sets `matrix` as the new projection matrix.
|
|
2527
2580
|
* @param matrix the new projection matrix
|
|
2581
|
+
* @since 1.10
|
|
2528
2582
|
*/
|
|
2529
2583
|
set_projection_matrix(matrix: Matrix): void;
|
|
2530
2584
|
|
|
@@ -2562,6 +2616,7 @@ export namespace Cogl {
|
|
|
2562
2616
|
* framebuffer has changed this can lead to redundant work being
|
|
2563
2617
|
* done.</note>
|
|
2564
2618
|
* @param samples_per_pixel The minimum number of samples per pixel
|
|
2619
|
+
* @since 1.8
|
|
2565
2620
|
*/
|
|
2566
2621
|
set_samples_per_pixel(samples_per_pixel: number): void;
|
|
2567
2622
|
|
|
@@ -2574,6 +2629,7 @@ export namespace Cogl {
|
|
|
2574
2629
|
* enabled. (See `cogl_onscreen_template_set_stereo_enabled()`,
|
|
2575
2630
|
* `cogl_framebuffer_get_is_stereo()`.)
|
|
2576
2631
|
* @param stereo_mode A {@link Cogl.StereoMode} specifying which stereo buffers should be drawn tow.
|
|
2632
|
+
* @since 1.20
|
|
2577
2633
|
*/
|
|
2578
2634
|
set_stereo_mode(stereo_mode: StereoMode): void;
|
|
2579
2635
|
|
|
@@ -2597,12 +2653,14 @@ export namespace Cogl {
|
|
|
2597
2653
|
* @param y The top-left y coordinate of the viewport origin (only integers supported currently)
|
|
2598
2654
|
* @param width The width of the viewport (only integers supported currently)
|
|
2599
2655
|
* @param height The height of the viewport (only integers supported currently)
|
|
2656
|
+
* @since 1.8
|
|
2600
2657
|
*/
|
|
2601
2658
|
set_viewport(x: number, y: number, width: number, height: number): void;
|
|
2602
2659
|
|
|
2603
2660
|
/**
|
|
2604
2661
|
* Multiplies the current model-view matrix by the given matrix.
|
|
2605
2662
|
* @param matrix the matrix to multiply with the current model-view
|
|
2663
|
+
* @since 1.10
|
|
2606
2664
|
*/
|
|
2607
2665
|
transform(matrix: Matrix): void;
|
|
2608
2666
|
|
|
@@ -2612,6 +2670,7 @@ export namespace Cogl {
|
|
|
2612
2670
|
* @param x Distance to translate along the x-axis
|
|
2613
2671
|
* @param y Distance to translate along the y-axis
|
|
2614
2672
|
* @param z Distance to translate along the z-axis
|
|
2673
|
+
* @since 1.10
|
|
2615
2674
|
*/
|
|
2616
2675
|
translate(x: number, y: number, z: number): void;
|
|
2617
2676
|
}
|
|
@@ -2665,6 +2724,7 @@ export namespace Cogl {
|
|
|
2665
2724
|
* @param callback A callback function to call for dirty events
|
|
2666
2725
|
* @param destroy An optional callback to destroy `user_data` when the `callback` is removed or `onscreen` is freed.
|
|
2667
2726
|
* @returns a {@link Cogl.OnscreenDirtyClosure} pointer that can be used to remove the callback and associated `user_data` later.
|
|
2727
|
+
* @since 1.16
|
|
2668
2728
|
*/
|
|
2669
2729
|
add_dirty_callback(callback: OnscreenDirtyCallback, destroy: UserDataDestroyCallback | null): OnscreenDirtyClosure;
|
|
2670
2730
|
|
|
@@ -2690,6 +2750,7 @@ export namespace Cogl {
|
|
|
2690
2750
|
* @param callback A {@link Cogl.OnscreenResizeCallback} to call when the `onscreen` changes size.
|
|
2691
2751
|
* @param destroy An optional callback to destroy `user_data` when the `callback` is removed or `onscreen` is freed.
|
|
2692
2752
|
* @returns a {@link Cogl.OnscreenResizeClosure} pointer that can be used to remove the callback and associated `user_data` later.
|
|
2753
|
+
* @since 2.0
|
|
2693
2754
|
*/
|
|
2694
2755
|
add_resize_callback(callback: OnscreenResizeCallback, destroy: UserDataDestroyCallback | null): OnscreenResizeClosure;
|
|
2695
2756
|
|
|
@@ -2733,6 +2794,7 @@ export namespace Cogl {
|
|
|
2733
2794
|
* age of {@link Cogl.Onscreen} back buffer contents. If this feature is
|
|
2734
2795
|
* missing then this function will always return 0.</note>
|
|
2735
2796
|
* @returns The age of the buffer contents or 0 when the buffer contents are undefined.
|
|
2797
|
+
* @since 1.14
|
|
2736
2798
|
*/
|
|
2737
2799
|
get_buffer_age(): number;
|
|
2738
2800
|
|
|
@@ -2742,6 +2804,7 @@ export namespace Cogl {
|
|
|
2742
2804
|
* `cogl_onscreen_swap_buffers()` or `cogl_onscreen_swap_region()`
|
|
2743
2805
|
* is called.
|
|
2744
2806
|
* @returns the current frame counter value
|
|
2807
|
+
* @since 1.14
|
|
2745
2808
|
*/
|
|
2746
2809
|
get_frame_counter(): number;
|
|
2747
2810
|
|
|
@@ -2761,6 +2824,7 @@ export namespace Cogl {
|
|
|
2761
2824
|
* meaningful with your window system, only whether the `onscreen` has
|
|
2762
2825
|
* been marked as resizable.</note>
|
|
2763
2826
|
* @returns Returns whether `onscreen` has been marked as resizable or not.
|
|
2827
|
+
* @since 2.0
|
|
2764
2828
|
*/
|
|
2765
2829
|
get_resizable(): boolean;
|
|
2766
2830
|
|
|
@@ -2779,6 +2843,7 @@ export namespace Cogl {
|
|
|
2779
2843
|
* requests e.g. to show an already visible window. This also means
|
|
2780
2844
|
* that it's acceptable to alternatively use native APIs to show and
|
|
2781
2845
|
* hide windows without confusing Cogl.</note>
|
|
2846
|
+
* @since 2.0
|
|
2782
2847
|
*/
|
|
2783
2848
|
hide(): void;
|
|
2784
2849
|
|
|
@@ -2790,6 +2855,7 @@ export namespace Cogl {
|
|
|
2790
2855
|
* `cogl_onscreen_add_dirty_callback()` to destroy the user data then
|
|
2791
2856
|
* this will also get called.
|
|
2792
2857
|
* @param closure A {@link Cogl.OnscreenDirtyClosure} returned from `cogl_onscreen_add_dirty_callback()`
|
|
2858
|
+
* @since 1.16
|
|
2793
2859
|
*/
|
|
2794
2860
|
remove_dirty_callback(closure: OnscreenDirtyClosure): void;
|
|
2795
2861
|
|
|
@@ -2801,6 +2867,7 @@ export namespace Cogl {
|
|
|
2801
2867
|
* `cogl_onscreen_add_frame_callback()` to destroy the user data then
|
|
2802
2868
|
* this will get called.
|
|
2803
2869
|
* @param closure A {@link Cogl.FrameClosure} returned from `cogl_onscreen_add_frame_callback()`
|
|
2870
|
+
* @since 1.14
|
|
2804
2871
|
*/
|
|
2805
2872
|
remove_frame_callback(closure: FrameClosure): void;
|
|
2806
2873
|
|
|
@@ -2808,6 +2875,7 @@ export namespace Cogl {
|
|
|
2808
2875
|
* Removes a resize `callback` and `user_data` pair that were previously
|
|
2809
2876
|
* associated with `onscreen` via `cogl_onscreen_add_resize_callback()`.
|
|
2810
2877
|
* @param closure An identifier returned from `cogl_onscreen_add_resize_callback()`
|
|
2878
|
+
* @since 2.0
|
|
2811
2879
|
*/
|
|
2812
2880
|
remove_resize_callback(closure: OnscreenResizeClosure): void;
|
|
2813
2881
|
|
|
@@ -2835,6 +2903,7 @@ export namespace Cogl {
|
|
|
2835
2903
|
* resize handler using `cogl_onscreen_add_resize_callback()` so that it
|
|
2836
2904
|
* can track when the viewport has been changed automatically.</note>
|
|
2837
2905
|
* @param resizable
|
|
2906
|
+
* @since 2.0
|
|
2838
2907
|
*/
|
|
2839
2908
|
set_resizable(resizable: boolean): void;
|
|
2840
2909
|
|
|
@@ -2859,6 +2928,7 @@ export namespace Cogl {
|
|
|
2859
2928
|
* requests e.g. to show an already visible window. This also means
|
|
2860
2929
|
* that it's acceptable to alternatively use native APIs to show and
|
|
2861
2930
|
* hide windows without confusing Cogl.</note>
|
|
2931
|
+
* @since 2.0
|
|
2862
2932
|
*/
|
|
2863
2933
|
show(): void;
|
|
2864
2934
|
|
|
@@ -2876,6 +2946,7 @@ export namespace Cogl {
|
|
|
2876
2946
|
* and also use the `cogl_onscreen_get_buffer_age()` api so they can
|
|
2877
2947
|
* perform incremental updates to older buffers instead of having to
|
|
2878
2948
|
* render a full buffer for every frame.</note>
|
|
2949
|
+
* @since 1.10
|
|
2879
2950
|
*/
|
|
2880
2951
|
swap_buffers(): void;
|
|
2881
2952
|
|
|
@@ -2919,6 +2990,7 @@ export namespace Cogl {
|
|
|
2919
2990
|
* perform incremental rendering based on old back buffers.</note>
|
|
2920
2991
|
* @param rectangles An array of integer 4-tuples representing damaged rectangles as (x, y, width, height) tuples.
|
|
2921
2992
|
* @param n_rectangles The number of 4-tuples to be read from `rectangles`
|
|
2993
|
+
* @since 1.16
|
|
2922
2994
|
*/
|
|
2923
2995
|
swap_buffers_with_damage(rectangles: number, n_rectangles: number): void;
|
|
2924
2996
|
|
|
@@ -2934,6 +3006,7 @@ export namespace Cogl {
|
|
|
2934
3006
|
* frame.
|
|
2935
3007
|
* @param rectangles An array of integer 4-tuples representing rectangles as (x, y, width, height) tuples.
|
|
2936
3008
|
* @param n_rectangles The number of 4-tuples to be read from `rectangles`
|
|
3009
|
+
* @since 1.10
|
|
2937
3010
|
*/
|
|
2938
3011
|
swap_region(rectangles: number, n_rectangles: number): void;
|
|
2939
3012
|
|
|
@@ -2949,6 +3022,7 @@ export namespace Cogl {
|
|
|
2949
3022
|
* program will abort with an error message if there is an error during
|
|
2950
3023
|
* automatic allocation.</note>
|
|
2951
3024
|
* @returns `true` if there were no error allocating the framebuffer, else `false`.
|
|
3025
|
+
* @since 1.8
|
|
2952
3026
|
*/
|
|
2953
3027
|
allocate(): boolean;
|
|
2954
3028
|
|
|
@@ -2957,6 +3031,7 @@ export namespace Cogl {
|
|
|
2957
3031
|
* that includes the color buffer then the specified `color` is used.
|
|
2958
3032
|
* @param buffers A mask of {@link Cogl.BufferBit}<!-- -->'s identifying which auxiliary buffers to clear
|
|
2959
3033
|
* @param color The color to clear the color buffer too if specified in `buffers`.
|
|
3034
|
+
* @since 1.8
|
|
2960
3035
|
*/
|
|
2961
3036
|
clear(buffers: bigint | number, color: Color): void;
|
|
2962
3037
|
|
|
@@ -2968,6 +3043,7 @@ export namespace Cogl {
|
|
|
2968
3043
|
* @param green The green component of color to clear the color buffer too if specified in `buffers`.
|
|
2969
3044
|
* @param blue The blue component of color to clear the color buffer too if specified in `buffers`.
|
|
2970
3045
|
* @param alpha The alpha component of color to clear the color buffer too if specified in `buffers`.
|
|
3046
|
+
* @since 1.8
|
|
2971
3047
|
*/
|
|
2972
3048
|
clear4f(buffers: bigint | number, red: number, green: number, blue: number, alpha: number): void;
|
|
2973
3049
|
|
|
@@ -2989,6 +3065,7 @@ export namespace Cogl {
|
|
|
2989
3065
|
* framebuffer, and it's not meaningful to try and discard the color buffer of
|
|
2990
3066
|
* a {@link Cogl.Offscreen} framebuffer since they are single-buffered.
|
|
2991
3067
|
* @param buffers A {@link Cogl.BufferBit} mask of which ancillary buffers you want to discard.
|
|
3068
|
+
* @since 1.8
|
|
2992
3069
|
*/
|
|
2993
3070
|
discard_buffers(buffers: bigint | number): void;
|
|
2994
3071
|
|
|
@@ -3038,6 +3115,7 @@ export namespace Cogl {
|
|
|
3038
3115
|
* @param y_2 y coordinate lower right on screen.
|
|
3039
3116
|
* @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.
|
|
3040
3117
|
* @param tex_coords_len The length of the `tex_coords` array. (For one layer and one group of texture coordinates, this would be 4)
|
|
3118
|
+
* @since 1.10
|
|
3041
3119
|
*/
|
|
3042
3120
|
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;
|
|
3043
3121
|
|
|
@@ -3058,6 +3136,7 @@ export namespace Cogl {
|
|
|
3058
3136
|
* @param y_1 Y coordinate of the top-left corner
|
|
3059
3137
|
* @param x_2 X coordinate of the bottom-right corner
|
|
3060
3138
|
* @param y_2 Y coordinate of the bottom-right corner
|
|
3139
|
+
* @since 1.10
|
|
3061
3140
|
*/
|
|
3062
3141
|
draw_rectangle(pipeline: Pipeline, x_1: number, y_1: number, x_2: number, y_2: number): void;
|
|
3063
3142
|
|
|
@@ -3084,6 +3163,7 @@ export namespace Cogl {
|
|
|
3084
3163
|
* @param pipeline A {@link Cogl.Pipeline} state object
|
|
3085
3164
|
* @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).
|
|
3086
3165
|
* @param n_rectangles number of rectangles defined in `coordinates`.
|
|
3166
|
+
* @since 1.10
|
|
3087
3167
|
*/
|
|
3088
3168
|
draw_rectangles(pipeline: Pipeline, coordinates: number[], n_rectangles: number): void;
|
|
3089
3169
|
|
|
@@ -3123,6 +3203,7 @@ export namespace Cogl {
|
|
|
3123
3203
|
* @param t_1 T texture coordinate of the top-left coorner
|
|
3124
3204
|
* @param s_2 S texture coordinate of the bottom-right coorner
|
|
3125
3205
|
* @param t_2 T texture coordinate of the bottom-right coorner
|
|
3206
|
+
* @since 1.10
|
|
3126
3207
|
*/
|
|
3127
3208
|
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;
|
|
3128
3209
|
|
|
@@ -3164,6 +3245,7 @@ export namespace Cogl {
|
|
|
3164
3245
|
* @param pipeline A {@link Cogl.Pipeline} state object
|
|
3165
3246
|
* @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()`.
|
|
3166
3247
|
* @param n_rectangles number of rectangles to `coordinates` to draw
|
|
3248
|
+
* @since 1.10
|
|
3167
3249
|
*/
|
|
3168
3250
|
draw_textured_rectangles(pipeline: Pipeline, coordinates: number[], n_rectangles: number): void;
|
|
3169
3251
|
|
|
@@ -3177,6 +3259,7 @@ export namespace Cogl {
|
|
|
3177
3259
|
* One example might be for benchmarking purposes to be sure timing
|
|
3178
3260
|
* measurements reflect the time that the GPU is busy for not just the time it
|
|
3179
3261
|
* takes to queue rendering commands.
|
|
3262
|
+
* @since 1.10
|
|
3180
3263
|
*/
|
|
3181
3264
|
finish(): void;
|
|
3182
3265
|
|
|
@@ -3198,18 +3281,21 @@ export namespace Cogl {
|
|
|
3198
3281
|
* @param top Y position of the top clipping plane where it intersects the near clipping plane
|
|
3199
3282
|
* @param z_near The distance to the near clipping plane (Must be positive)
|
|
3200
3283
|
* @param z_far The distance to the far clipping plane (Must be positive)
|
|
3284
|
+
* @since 1.10
|
|
3201
3285
|
*/
|
|
3202
3286
|
frustum(left: number, right: number, bottom: number, top: number, z_near: number, z_far: number): void;
|
|
3203
3287
|
|
|
3204
3288
|
/**
|
|
3205
3289
|
* Retrieves the number of alpha bits of `framebuffer`
|
|
3206
3290
|
* @returns the number of bits
|
|
3291
|
+
* @since 1.8
|
|
3207
3292
|
*/
|
|
3208
3293
|
get_alpha_bits(): number;
|
|
3209
3294
|
|
|
3210
3295
|
/**
|
|
3211
3296
|
* Retrieves the number of blue bits of `framebuffer`
|
|
3212
3297
|
* @returns the number of bits
|
|
3298
|
+
* @since 1.8
|
|
3213
3299
|
*/
|
|
3214
3300
|
get_blue_bits(): number;
|
|
3215
3301
|
|
|
@@ -3218,12 +3304,14 @@ export namespace Cogl {
|
|
|
3218
3304
|
* instantiated within. This is the {@link Cogl.Context} that was passed to
|
|
3219
3305
|
* `cogl_onscreen_new()` for example.
|
|
3220
3306
|
* @returns The {@link Cogl.Context} that the given `framebuffer` was instantiated within.
|
|
3307
|
+
* @since 1.8
|
|
3221
3308
|
*/
|
|
3222
3309
|
get_context(): Context;
|
|
3223
3310
|
|
|
3224
3311
|
/**
|
|
3225
3312
|
* Retrieves the number of depth bits of `framebuffer`
|
|
3226
3313
|
* @returns the number of bits
|
|
3314
|
+
* @since 2.0
|
|
3227
3315
|
*/
|
|
3228
3316
|
get_depth_bits(): number;
|
|
3229
3317
|
|
|
@@ -3231,6 +3319,7 @@ export namespace Cogl {
|
|
|
3231
3319
|
* Queries whether depth buffer writing is enabled for `framebuffer`. This
|
|
3232
3320
|
* can be controlled via `cogl_framebuffer_set_depth_write_enabled()`.
|
|
3233
3321
|
* @returns `true` if depth writing is enabled or `false` if not.
|
|
3322
|
+
* @since 1.18
|
|
3234
3323
|
*/
|
|
3235
3324
|
get_depth_write_enabled(): boolean;
|
|
3236
3325
|
|
|
@@ -3242,18 +3331,21 @@ export namespace Cogl {
|
|
|
3242
3331
|
* display pipeline does not support dithering. This value only represents
|
|
3243
3332
|
* the user's request for dithering.</note>
|
|
3244
3333
|
* @returns `true` if dithering has been requested or `false` if not.
|
|
3334
|
+
* @since 1.8
|
|
3245
3335
|
*/
|
|
3246
3336
|
get_dither_enabled(): boolean;
|
|
3247
3337
|
|
|
3248
3338
|
/**
|
|
3249
3339
|
* Retrieves the number of green bits of `framebuffer`
|
|
3250
3340
|
* @returns the number of bits
|
|
3341
|
+
* @since 1.8
|
|
3251
3342
|
*/
|
|
3252
3343
|
get_green_bits(): number;
|
|
3253
3344
|
|
|
3254
3345
|
/**
|
|
3255
3346
|
* Queries the current height of the given `framebuffer`.
|
|
3256
3347
|
* @returns The height of `framebuffer`.
|
|
3348
|
+
* @since 1.8
|
|
3257
3349
|
*/
|
|
3258
3350
|
get_height(): number;
|
|
3259
3351
|
|
|
@@ -3261,17 +3353,20 @@ export namespace Cogl {
|
|
|
3261
3353
|
|
|
3262
3354
|
/**
|
|
3263
3355
|
* Stores the current model-view matrix in `matrix`.
|
|
3356
|
+
* @since 1.10
|
|
3264
3357
|
*/
|
|
3265
3358
|
get_modelview_matrix(): Matrix;
|
|
3266
3359
|
|
|
3267
3360
|
/**
|
|
3268
3361
|
* Stores the current projection matrix in `matrix`.
|
|
3362
|
+
* @since 1.10
|
|
3269
3363
|
*/
|
|
3270
3364
|
get_projection_matrix(): Matrix;
|
|
3271
3365
|
|
|
3272
3366
|
/**
|
|
3273
3367
|
* Retrieves the number of red bits of `framebuffer`
|
|
3274
3368
|
* @returns the number of bits
|
|
3369
|
+
* @since 1.8
|
|
3275
3370
|
*/
|
|
3276
3371
|
get_red_bits(): number;
|
|
3277
3372
|
|
|
@@ -3289,6 +3384,7 @@ export namespace Cogl {
|
|
|
3289
3384
|
* framebuffer has been allocated the value will reflect the actual
|
|
3290
3385
|
* number of samples that will be made by the GPU.
|
|
3291
3386
|
* @returns The number of point samples made per pixel when rasterizing geometry or 0 if single-sample rendering has been chosen.
|
|
3387
|
+
* @since 1.10
|
|
3292
3388
|
*/
|
|
3293
3389
|
get_samples_per_pixel(): number;
|
|
3294
3390
|
|
|
@@ -3296,6 +3392,7 @@ export namespace Cogl {
|
|
|
3296
3392
|
* Gets the current {@link Cogl.StereoMode}, which defines which stereo buffers
|
|
3297
3393
|
* should be drawn to. See `cogl_framebuffer_set_stereo_mode()`.
|
|
3298
3394
|
* @returns A {@link Cogl.StereoMode}
|
|
3395
|
+
* @since 1.20
|
|
3299
3396
|
*/
|
|
3300
3397
|
get_stereo_mode(): StereoMode;
|
|
3301
3398
|
|
|
@@ -3304,6 +3401,7 @@ export namespace Cogl {
|
|
|
3304
3401
|
* using `cogl_framebuffer_set_viewport()` or the default values which are 0, 0,
|
|
3305
3402
|
* framebuffer_width and framebuffer_height. The values are written into the
|
|
3306
3403
|
* given `viewport` array.
|
|
3404
|
+
* @since 1.8
|
|
3307
3405
|
*/
|
|
3308
3406
|
get_viewport4fv(): number[];
|
|
3309
3407
|
|
|
@@ -3311,6 +3409,7 @@ export namespace Cogl {
|
|
|
3311
3409
|
* Queries the height of the viewport as set using `cogl_framebuffer_set_viewport()`
|
|
3312
3410
|
* or the default value which is the height of the framebuffer.
|
|
3313
3411
|
* @returns The height of the viewport.
|
|
3412
|
+
* @since 1.8
|
|
3314
3413
|
*/
|
|
3315
3414
|
get_viewport_height(): number;
|
|
3316
3415
|
|
|
@@ -3318,6 +3417,7 @@ export namespace Cogl {
|
|
|
3318
3417
|
* Queries the width of the viewport as set using `cogl_framebuffer_set_viewport()`
|
|
3319
3418
|
* or the default value which is the width of the framebuffer.
|
|
3320
3419
|
* @returns The width of the viewport.
|
|
3420
|
+
* @since 1.8
|
|
3321
3421
|
*/
|
|
3322
3422
|
get_viewport_width(): number;
|
|
3323
3423
|
|
|
@@ -3325,6 +3425,7 @@ export namespace Cogl {
|
|
|
3325
3425
|
* Queries the x coordinate of the viewport origin as set using `cogl_framebuffer_set_viewport()`
|
|
3326
3426
|
* or the default value which is 0.
|
|
3327
3427
|
* @returns The x coordinate of the viewport origin.
|
|
3428
|
+
* @since 1.8
|
|
3328
3429
|
*/
|
|
3329
3430
|
get_viewport_x(): number;
|
|
3330
3431
|
|
|
@@ -3332,17 +3433,20 @@ export namespace Cogl {
|
|
|
3332
3433
|
* Queries the y coordinate of the viewport origin as set using `cogl_framebuffer_set_viewport()`
|
|
3333
3434
|
* or the default value which is 0.
|
|
3334
3435
|
* @returns The y coordinate of the viewport origin.
|
|
3436
|
+
* @since 1.8
|
|
3335
3437
|
*/
|
|
3336
3438
|
get_viewport_y(): number;
|
|
3337
3439
|
|
|
3338
3440
|
/**
|
|
3339
3441
|
* Queries the current width of the given `framebuffer`.
|
|
3340
3442
|
* @returns The width of `framebuffer`.
|
|
3443
|
+
* @since 1.8
|
|
3341
3444
|
*/
|
|
3342
3445
|
get_width(): number;
|
|
3343
3446
|
|
|
3344
3447
|
/**
|
|
3345
3448
|
* Resets the current model-view matrix to the identity matrix.
|
|
3449
|
+
* @since 1.10
|
|
3346
3450
|
*/
|
|
3347
3451
|
identity_matrix(): void;
|
|
3348
3452
|
|
|
@@ -3355,6 +3459,7 @@ export namespace Cogl {
|
|
|
3355
3459
|
* @param y_2 The y coordinate for the second horizontal clipping plane
|
|
3356
3460
|
* @param near The <emphasis>distance</emphasis> to the near clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
3357
3461
|
* @param far The <emphasis>distance</emphasis> to the far clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
3462
|
+
* @since 1.10
|
|
3358
3463
|
*/
|
|
3359
3464
|
orthographic(x_1: number, y_1: number, x_2: number, y_2: number, near: number, far: number): void;
|
|
3360
3465
|
|
|
@@ -3370,6 +3475,7 @@ export namespace Cogl {
|
|
|
3370
3475
|
* @param aspect The (width over height) aspect ratio for display
|
|
3371
3476
|
* @param z_near The distance to the near clipping plane (Must be positive, and must not be 0)
|
|
3372
3477
|
* @param z_far The distance to the far clipping plane (Must be positive)
|
|
3478
|
+
* @since 1.10
|
|
3373
3479
|
*/
|
|
3374
3480
|
perspective(fov_y: number, aspect: number, z_near: number, z_far: number): void;
|
|
3375
3481
|
|
|
@@ -3377,17 +3483,20 @@ export namespace Cogl {
|
|
|
3377
3483
|
* Reverts the clipping region to the state before the last call to
|
|
3378
3484
|
* `cogl_framebuffer_push_scissor_clip()`, `cogl_framebuffer_push_rectangle_clip()`
|
|
3379
3485
|
* `cogl_framebuffer_push_path_clip()`, or `cogl_framebuffer_push_primitive_clip()`.
|
|
3486
|
+
* @since 1.10
|
|
3380
3487
|
*/
|
|
3381
3488
|
pop_clip(): void;
|
|
3382
3489
|
|
|
3383
3490
|
/**
|
|
3384
3491
|
* Restores the model-view matrix on the top of the matrix stack.
|
|
3492
|
+
* @since 1.10
|
|
3385
3493
|
*/
|
|
3386
3494
|
pop_matrix(): void;
|
|
3387
3495
|
|
|
3388
3496
|
/**
|
|
3389
3497
|
* Copies the current model-view matrix onto the matrix stack. The matrix
|
|
3390
3498
|
* can later be restored with `cogl_framebuffer_pop_matrix()`.
|
|
3499
|
+
* @since 1.10
|
|
3391
3500
|
*/
|
|
3392
3501
|
push_matrix(): void;
|
|
3393
3502
|
|
|
@@ -3404,6 +3513,7 @@ export namespace Cogl {
|
|
|
3404
3513
|
* @param y_1 y coordinate for top left corner of the clip rectangle
|
|
3405
3514
|
* @param x_2 x coordinate for bottom right corner of the clip rectangle
|
|
3406
3515
|
* @param y_2 y coordinate for bottom right corner of the clip rectangle
|
|
3516
|
+
* @since 1.10
|
|
3407
3517
|
*/
|
|
3408
3518
|
push_rectangle_clip(x_1: number, y_1: number, x_2: number, y_2: number): void;
|
|
3409
3519
|
|
|
@@ -3425,6 +3535,7 @@ export namespace Cogl {
|
|
|
3425
3535
|
* @param y top edge of the clip rectangle in window coordinates
|
|
3426
3536
|
* @param width width of the clip rectangle
|
|
3427
3537
|
* @param height height of the clip rectangle
|
|
3538
|
+
* @since 1.10
|
|
3428
3539
|
*/
|
|
3429
3540
|
push_scissor_clip(x: number, y: number, width: number, height: number): void;
|
|
3430
3541
|
|
|
@@ -3462,6 +3573,7 @@ export namespace Cogl {
|
|
|
3462
3573
|
* @param format The pixel format to store the data in
|
|
3463
3574
|
* @param pixels The address of the buffer to store the data in
|
|
3464
3575
|
* @returns `true` if the read succeeded or `false` otherwise.
|
|
3576
|
+
* @since 1.10
|
|
3465
3577
|
*/
|
|
3466
3578
|
read_pixels(x: number, y: number, width: number, height: number, format: PixelFormat, pixels: number): boolean;
|
|
3467
3579
|
|
|
@@ -3481,6 +3593,7 @@ export namespace Cogl {
|
|
|
3481
3593
|
* @param source Identifies which auxillary buffer you want to read (only COGL_READ_PIXELS_COLOR_BUFFER supported currently)
|
|
3482
3594
|
* @param bitmap The bitmap to store the results in.
|
|
3483
3595
|
* @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.
|
|
3596
|
+
* @since 1.10
|
|
3484
3597
|
*/
|
|
3485
3598
|
read_pixels_into_bitmap(x: number, y: number, source: ReadPixelsFlags, bitmap: Bitmap): boolean;
|
|
3486
3599
|
|
|
@@ -3505,6 +3618,7 @@ export namespace Cogl {
|
|
|
3505
3618
|
* If you are performing incremental updates to a framebuffer you
|
|
3506
3619
|
* should consider using `cogl_framebuffer_resolve_samples_region()`
|
|
3507
3620
|
* instead to avoid resolving redundant pixels.
|
|
3621
|
+
* @since 1.8
|
|
3508
3622
|
*/
|
|
3509
3623
|
resolve_samples(): void;
|
|
3510
3624
|
|
|
@@ -3534,6 +3648,7 @@ export namespace Cogl {
|
|
|
3534
3648
|
* @param y top-left y coordinate of region to resolve
|
|
3535
3649
|
* @param width width of region to resolve
|
|
3536
3650
|
* @param height height of region to resolve
|
|
3651
|
+
* @since 1.8
|
|
3537
3652
|
*/
|
|
3538
3653
|
resolve_samples_region(x: number, y: number, width: number, height: number): void;
|
|
3539
3654
|
|
|
@@ -3547,6 +3662,7 @@ export namespace Cogl {
|
|
|
3547
3662
|
* @param x X-component of vertex to rotate around.
|
|
3548
3663
|
* @param y Y-component of vertex to rotate around.
|
|
3549
3664
|
* @param z Z-component of vertex to rotate around.
|
|
3665
|
+
* @since 1.10
|
|
3550
3666
|
*/
|
|
3551
3667
|
rotate(angle: number, x: number, y: number, z: number): void;
|
|
3552
3668
|
|
|
@@ -3554,6 +3670,7 @@ export namespace Cogl {
|
|
|
3554
3670
|
* Multiplies the current model-view matrix by one that rotates
|
|
3555
3671
|
* according to the rotation described by `euler`.
|
|
3556
3672
|
* @param euler A {@link Graphene.Euler}
|
|
3673
|
+
* @since 2.0
|
|
3557
3674
|
*/
|
|
3558
3675
|
rotate_euler(euler: Graphene.Euler): void;
|
|
3559
3676
|
|
|
@@ -3563,6 +3680,7 @@ export namespace Cogl {
|
|
|
3563
3680
|
* @param x Amount to scale along the x-axis
|
|
3564
3681
|
* @param y Amount to scale along the y-axis
|
|
3565
3682
|
* @param z Amount to scale along the z-axis
|
|
3683
|
+
* @since 1.10
|
|
3566
3684
|
*/
|
|
3567
3685
|
scale(x: number, y: number, z: number): void;
|
|
3568
3686
|
|
|
@@ -3574,6 +3692,7 @@ export namespace Cogl {
|
|
|
3574
3692
|
*
|
|
3575
3693
|
* Depth buffer writing is enabled by default.
|
|
3576
3694
|
* @param depth_write_enabled `true` to enable depth writing or `false` to disable
|
|
3695
|
+
* @since 1.18
|
|
3577
3696
|
*/
|
|
3578
3697
|
set_depth_write_enabled(depth_write_enabled: boolean): void;
|
|
3579
3698
|
|
|
@@ -3592,18 +3711,21 @@ export namespace Cogl {
|
|
|
3592
3711
|
*
|
|
3593
3712
|
* Dithering is enabled by default.
|
|
3594
3713
|
* @param dither_enabled `true` to enable dithering or `false` to disable
|
|
3714
|
+
* @since 1.8
|
|
3595
3715
|
*/
|
|
3596
3716
|
set_dither_enabled(dither_enabled: boolean): void;
|
|
3597
3717
|
|
|
3598
3718
|
/**
|
|
3599
3719
|
* Sets `matrix` as the new model-view matrix.
|
|
3600
3720
|
* @param matrix the new model-view matrix
|
|
3721
|
+
* @since 1.10
|
|
3601
3722
|
*/
|
|
3602
3723
|
set_modelview_matrix(matrix: Matrix): void;
|
|
3603
3724
|
|
|
3604
3725
|
/**
|
|
3605
3726
|
* Sets `matrix` as the new projection matrix.
|
|
3606
3727
|
* @param matrix the new projection matrix
|
|
3728
|
+
* @since 1.10
|
|
3607
3729
|
*/
|
|
3608
3730
|
set_projection_matrix(matrix: Matrix): void;
|
|
3609
3731
|
|
|
@@ -3641,6 +3763,7 @@ export namespace Cogl {
|
|
|
3641
3763
|
* framebuffer has changed this can lead to redundant work being
|
|
3642
3764
|
* done.</note>
|
|
3643
3765
|
* @param samples_per_pixel The minimum number of samples per pixel
|
|
3766
|
+
* @since 1.8
|
|
3644
3767
|
*/
|
|
3645
3768
|
set_samples_per_pixel(samples_per_pixel: number): void;
|
|
3646
3769
|
|
|
@@ -3653,6 +3776,7 @@ export namespace Cogl {
|
|
|
3653
3776
|
* enabled. (See `cogl_onscreen_template_set_stereo_enabled()`,
|
|
3654
3777
|
* `cogl_framebuffer_get_is_stereo()`.)
|
|
3655
3778
|
* @param stereo_mode A {@link Cogl.StereoMode} specifying which stereo buffers should be drawn tow.
|
|
3779
|
+
* @since 1.20
|
|
3656
3780
|
*/
|
|
3657
3781
|
set_stereo_mode(stereo_mode: StereoMode): void;
|
|
3658
3782
|
|
|
@@ -3676,12 +3800,14 @@ export namespace Cogl {
|
|
|
3676
3800
|
* @param y The top-left y coordinate of the viewport origin (only integers supported currently)
|
|
3677
3801
|
* @param width The width of the viewport (only integers supported currently)
|
|
3678
3802
|
* @param height The height of the viewport (only integers supported currently)
|
|
3803
|
+
* @since 1.8
|
|
3679
3804
|
*/
|
|
3680
3805
|
set_viewport(x: number, y: number, width: number, height: number): void;
|
|
3681
3806
|
|
|
3682
3807
|
/**
|
|
3683
3808
|
* Multiplies the current model-view matrix by the given matrix.
|
|
3684
3809
|
* @param matrix the matrix to multiply with the current model-view
|
|
3810
|
+
* @since 1.10
|
|
3685
3811
|
*/
|
|
3686
3812
|
transform(matrix: Matrix): void;
|
|
3687
3813
|
|
|
@@ -3691,6 +3817,7 @@ export namespace Cogl {
|
|
|
3691
3817
|
* @param x Distance to translate along the x-axis
|
|
3692
3818
|
* @param y Distance to translate along the y-axis
|
|
3693
3819
|
* @param z Distance to translate along the z-axis
|
|
3820
|
+
* @since 1.10
|
|
3694
3821
|
*/
|
|
3695
3822
|
translate(x: number, y: number, z: number): void;
|
|
3696
3823
|
}
|
|
@@ -3736,32 +3863,38 @@ export namespace Cogl {
|
|
|
3736
3863
|
* keep track of a pipelines ancestry which we may use to help minimize GPU
|
|
3737
3864
|
* state changes.
|
|
3738
3865
|
* @returns a pointer to the newly allocated {@link Cogl.Pipeline}
|
|
3866
|
+
* @since 2.0
|
|
3739
3867
|
*/
|
|
3740
3868
|
copy(): Pipeline;
|
|
3741
3869
|
|
|
3742
3870
|
/**
|
|
3743
3871
|
* Iterates all the layer indices of the given `pipeline`.
|
|
3744
3872
|
* @param callback A {@link Cogl.PipelineLayerCallback} to be called for each layer index
|
|
3873
|
+
* @since 2.0
|
|
3745
3874
|
*/
|
|
3746
3875
|
foreach_layer(callback: PipelineLayerCallback): void;
|
|
3747
3876
|
|
|
3748
3877
|
/**
|
|
3749
3878
|
* @returns The alpha test function of `pipeline`.
|
|
3879
|
+
* @since 2.0
|
|
3750
3880
|
*/
|
|
3751
3881
|
get_alpha_test_function(): PipelineAlphaFunc;
|
|
3752
3882
|
|
|
3753
3883
|
/**
|
|
3754
3884
|
* @returns The alpha test reference value of `pipeline`.
|
|
3885
|
+
* @since 2.0
|
|
3755
3886
|
*/
|
|
3756
3887
|
get_alpha_test_reference(): number;
|
|
3757
3888
|
|
|
3758
3889
|
/**
|
|
3759
3890
|
* Retrieves the current pipeline color.
|
|
3891
|
+
* @since 2.0
|
|
3760
3892
|
*/
|
|
3761
3893
|
get_color(): Color;
|
|
3762
3894
|
|
|
3763
3895
|
/**
|
|
3764
3896
|
* @returns the cull face mode that was previously set with `cogl_pipeline_set_cull_face_mode()`. Status: Unstable
|
|
3897
|
+
* @since 2.0
|
|
3765
3898
|
*/
|
|
3766
3899
|
get_cull_face_mode(): PipelineCullFaceMode;
|
|
3767
3900
|
|
|
@@ -3774,6 +3907,7 @@ export namespace Cogl {
|
|
|
3774
3907
|
* {@link Cogl.Winding.CLOCKWISE} sets them to be clockwise. The default is
|
|
3775
3908
|
* {@link Cogl.Winding.COUNTER_CLOCKWISE}.
|
|
3776
3909
|
* @returns The `pipeline` front face winding Status: Unstable
|
|
3910
|
+
* @since 2.0
|
|
3777
3911
|
*/
|
|
3778
3912
|
get_front_face_winding(): Winding;
|
|
3779
3913
|
|
|
@@ -3786,6 +3920,7 @@ export namespace Cogl {
|
|
|
3786
3920
|
* changed using `cogl_pipeline_set_layer_filters()`.
|
|
3787
3921
|
* @param layer_index the layer number to change.
|
|
3788
3922
|
* @returns The magnification {@link Cogl.PipelineFilter} for the specified layer.
|
|
3923
|
+
* @since 1.10
|
|
3789
3924
|
*/
|
|
3790
3925
|
get_layer_mag_filter(layer_index: number): PipelineFilter;
|
|
3791
3926
|
|
|
@@ -3798,6 +3933,7 @@ export namespace Cogl {
|
|
|
3798
3933
|
* changed using `cogl_pipeline_set_layer_filters()`.
|
|
3799
3934
|
* @param layer_index the layer number to change.
|
|
3800
3935
|
* @returns The minification {@link Cogl.PipelineFilter} for the specified layer.
|
|
3936
|
+
* @since 1.10
|
|
3801
3937
|
*/
|
|
3802
3938
|
get_layer_min_filter(layer_index: number): PipelineFilter;
|
|
3803
3939
|
|
|
@@ -3806,12 +3942,14 @@ export namespace Cogl {
|
|
|
3806
3942
|
* texture layer.
|
|
3807
3943
|
* @param layer_index the layer number to check.
|
|
3808
3944
|
* @returns whether the texture coordinates will be replaced with point sprite coordinates.
|
|
3945
|
+
* @since 2.0
|
|
3809
3946
|
*/
|
|
3810
3947
|
get_layer_point_sprite_coords_enabled(layer_index: number): boolean;
|
|
3811
3948
|
|
|
3812
3949
|
/**
|
|
3813
3950
|
* @param layer_index the index of the layer
|
|
3814
3951
|
* @returns the texture that was set for the given layer of the pipeline or `null` if no texture was set.
|
|
3952
|
+
* @since 1.10
|
|
3815
3953
|
*/
|
|
3816
3954
|
get_layer_texture(layer_index: number): Texture;
|
|
3817
3955
|
|
|
@@ -3820,6 +3958,7 @@ export namespace Cogl {
|
|
|
3820
3958
|
* layer.
|
|
3821
3959
|
* @param layer_index the layer number to change.
|
|
3822
3960
|
* @returns the wrap mode for the 's' coordinate of texture lookups on this layer.
|
|
3961
|
+
* @since 1.6
|
|
3823
3962
|
*/
|
|
3824
3963
|
get_layer_wrap_mode_s(layer_index: number): PipelineWrapMode;
|
|
3825
3964
|
|
|
@@ -3828,17 +3967,20 @@ export namespace Cogl {
|
|
|
3828
3967
|
* layer.
|
|
3829
3968
|
* @param layer_index the layer number to change.
|
|
3830
3969
|
* @returns the wrap mode for the 't' coordinate of texture lookups on this layer.
|
|
3970
|
+
* @since 1.6
|
|
3831
3971
|
*/
|
|
3832
3972
|
get_layer_wrap_mode_t(layer_index: number): PipelineWrapMode;
|
|
3833
3973
|
|
|
3834
3974
|
/**
|
|
3835
3975
|
* Retrieves the number of layers defined for the given `pipeline`
|
|
3836
3976
|
* @returns the number of layers
|
|
3977
|
+
* @since 2.0
|
|
3837
3978
|
*/
|
|
3838
3979
|
get_n_layers(): number;
|
|
3839
3980
|
|
|
3840
3981
|
/**
|
|
3841
3982
|
* @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()`.
|
|
3983
|
+
* @since 2.0
|
|
3842
3984
|
*/
|
|
3843
3985
|
get_per_vertex_point_size(): boolean;
|
|
3844
3986
|
|
|
@@ -3846,6 +3988,7 @@ export namespace Cogl {
|
|
|
3846
3988
|
* Get the size of points drawn when {@link Cogl.VerticesMode.POINTS} is
|
|
3847
3989
|
* used with the vertex buffer API.
|
|
3848
3990
|
* @returns the point size of the `pipeline`.
|
|
3991
|
+
* @since 2.0
|
|
3849
3992
|
*/
|
|
3850
3993
|
get_point_size(): number;
|
|
3851
3994
|
|
|
@@ -3861,6 +4004,7 @@ export namespace Cogl {
|
|
|
3861
4004
|
* before calling this function.
|
|
3862
4005
|
* @param uniform_name The name of a uniform
|
|
3863
4006
|
* @returns A integer representing the location of the given uniform.
|
|
4007
|
+
* @since 2.0
|
|
3864
4008
|
*/
|
|
3865
4009
|
get_uniform_location(uniform_name: string): number;
|
|
3866
4010
|
|
|
@@ -3868,12 +4012,14 @@ export namespace Cogl {
|
|
|
3868
4012
|
* Queries what user program has been associated with the given
|
|
3869
4013
|
* `pipeline` using `cogl_pipeline_set_user_program()`.
|
|
3870
4014
|
* @returns The current user program or `null`.
|
|
4015
|
+
* @since 2.0
|
|
3871
4016
|
*/
|
|
3872
4017
|
get_user_program(): Handle;
|
|
3873
4018
|
|
|
3874
4019
|
/**
|
|
3875
4020
|
* This function removes a layer from your pipeline
|
|
3876
4021
|
* @param layer_index Specifies the layer you want to remove
|
|
4022
|
+
* @since 1.10
|
|
3877
4023
|
*/
|
|
3878
4024
|
remove_layer(layer_index: number): void;
|
|
3879
4025
|
|
|
@@ -3887,6 +4033,7 @@ export namespace Cogl {
|
|
|
3887
4033
|
* The default is {@link Cogl.PipelineAlphaFunc.ALWAYS}
|
|
3888
4034
|
* @param alpha_func A `CoglPipelineAlphaFunc` constant
|
|
3889
4035
|
* @param alpha_reference A reference point that the chosen alpha function uses to compare incoming fragments to.
|
|
4036
|
+
* @since 2.0
|
|
3890
4037
|
*/
|
|
3891
4038
|
set_alpha_test_function(alpha_func: PipelineAlphaFunc, alpha_reference: number): void;
|
|
3892
4039
|
|
|
@@ -3958,6 +4105,7 @@ export namespace Cogl {
|
|
|
3958
4105
|
* is in premultiplied form.
|
|
3959
4106
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired blend function.
|
|
3960
4107
|
* @returns `true` if the blend string was successfully parsed, and the described blending is supported by the underlying driver/hardware. If there was an error, `false` is returned and `error` is set accordingly (if present).
|
|
4108
|
+
* @since 2.0
|
|
3961
4109
|
*/
|
|
3962
4110
|
set_blend(blend_string: string): boolean;
|
|
3963
4111
|
|
|
@@ -3965,6 +4113,7 @@ export namespace Cogl {
|
|
|
3965
4113
|
* When blending is setup to reference a CONSTANT blend factor then
|
|
3966
4114
|
* blending will depend on the constant set with this function.
|
|
3967
4115
|
* @param constant_color The constant color you want
|
|
4116
|
+
* @since 2.0
|
|
3968
4117
|
*/
|
|
3969
4118
|
set_blend_constant(constant_color: Color): void;
|
|
3970
4119
|
|
|
@@ -3978,6 +4127,7 @@ export namespace Cogl {
|
|
|
3978
4127
|
*
|
|
3979
4128
|
* The default value is (1.0, 1.0, 1.0, 1.0)
|
|
3980
4129
|
* @param color The components of the color
|
|
4130
|
+
* @since 2.0
|
|
3981
4131
|
*/
|
|
3982
4132
|
set_color(color: Color): void;
|
|
3983
4133
|
|
|
@@ -3989,6 +4139,7 @@ export namespace Cogl {
|
|
|
3989
4139
|
* @param green The green component
|
|
3990
4140
|
* @param blue The blue component
|
|
3991
4141
|
* @param alpha The alpha component
|
|
4142
|
+
* @since 2.0
|
|
3992
4143
|
*/
|
|
3993
4144
|
set_color4f(red: number, green: number, blue: number, alpha: number): void;
|
|
3994
4145
|
|
|
@@ -4000,6 +4151,7 @@ export namespace Cogl {
|
|
|
4000
4151
|
* @param green The green component
|
|
4001
4152
|
* @param blue The blue component
|
|
4002
4153
|
* @param alpha The alpha component
|
|
4154
|
+
* @since 2.0
|
|
4003
4155
|
*/
|
|
4004
4156
|
set_color4ub(red: number, green: number, blue: number, alpha: number): void;
|
|
4005
4157
|
|
|
@@ -4019,6 +4171,7 @@ export namespace Cogl {
|
|
|
4019
4171
|
*
|
|
4020
4172
|
* Status: Unstable
|
|
4021
4173
|
* @param cull_face_mode The new mode to set
|
|
4174
|
+
* @since 2.0
|
|
4022
4175
|
*/
|
|
4023
4176
|
set_cull_face_mode(cull_face_mode: PipelineCullFaceMode): void;
|
|
4024
4177
|
|
|
@@ -4033,6 +4186,7 @@ export namespace Cogl {
|
|
|
4033
4186
|
*
|
|
4034
4187
|
* Status: Unstable
|
|
4035
4188
|
* @param front_winding the winding order
|
|
4189
|
+
* @since 2.0
|
|
4036
4190
|
*/
|
|
4037
4191
|
set_front_face_winding(front_winding: Winding): void;
|
|
4038
4192
|
|
|
@@ -4116,6 +4270,7 @@ export namespace Cogl {
|
|
|
4116
4270
|
* @param layer_index Specifies the layer you want define a combine function for
|
|
4117
4271
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired texture combine function.
|
|
4118
4272
|
* @returns `true` if the blend string was successfully parsed, and the described texture combining is supported by the underlying driver and or hardware. On failure, `false` is returned and `error` is set
|
|
4273
|
+
* @since 2.0
|
|
4119
4274
|
*/
|
|
4120
4275
|
set_layer_combine(layer_index: number, blend_string: string): boolean;
|
|
4121
4276
|
|
|
@@ -4124,6 +4279,7 @@ export namespace Cogl {
|
|
|
4124
4279
|
* description then you can use this function to define its value.
|
|
4125
4280
|
* @param layer_index Specifies the layer you want to specify a constant used for texture combining
|
|
4126
4281
|
* @param constant The constant color you want
|
|
4282
|
+
* @since 2.0
|
|
4127
4283
|
*/
|
|
4128
4284
|
set_layer_combine_constant(layer_index: number, constant: Color): void;
|
|
4129
4285
|
|
|
@@ -4138,6 +4294,7 @@ export namespace Cogl {
|
|
|
4138
4294
|
* @param layer_index the layer number to change.
|
|
4139
4295
|
* @param min_filter the filter used when scaling a texture down.
|
|
4140
4296
|
* @param mag_filter the filter used when magnifying a texture.
|
|
4297
|
+
* @since 1.10
|
|
4141
4298
|
*/
|
|
4142
4299
|
set_layer_filters(layer_index: number, min_filter: PipelineFilter, mag_filter: PipelineFilter): void;
|
|
4143
4300
|
|
|
@@ -4146,6 +4303,7 @@ export namespace Cogl {
|
|
|
4146
4303
|
* and rotate a single layer of a pipeline used to fill your geometry.
|
|
4147
4304
|
* @param layer_index the index for the layer inside `pipeline`
|
|
4148
4305
|
* @param matrix the transformation matrix for the layer
|
|
4306
|
+
* @since 1.10
|
|
4149
4307
|
*/
|
|
4150
4308
|
set_layer_matrix(layer_index: number, matrix: Matrix): void;
|
|
4151
4309
|
|
|
@@ -4165,6 +4323,7 @@ export namespace Cogl {
|
|
|
4165
4323
|
* specify the texture type so that any pipeline copies can share the
|
|
4166
4324
|
* internal texture type state for efficiency.
|
|
4167
4325
|
* @param layer_index The layer number to modify
|
|
4326
|
+
* @since 1.10
|
|
4168
4327
|
*/
|
|
4169
4328
|
set_layer_null_texture(layer_index: number): void;
|
|
4170
4329
|
|
|
@@ -4178,6 +4337,7 @@ export namespace Cogl {
|
|
|
4178
4337
|
* @param layer_index the layer number to change.
|
|
4179
4338
|
* @param enable whether to enable point sprite coord generation.
|
|
4180
4339
|
* @returns `true` if the function succeeds, `false` otherwise.
|
|
4340
|
+
* @since 2.0
|
|
4181
4341
|
*/
|
|
4182
4342
|
set_layer_point_sprite_coords_enabled(layer_index: number, enable: boolean): boolean;
|
|
4183
4343
|
|
|
@@ -4194,6 +4354,7 @@ export namespace Cogl {
|
|
|
4194
4354
|
* `cogl_pipeline_set_layer_wrap_mode_t()` separately.
|
|
4195
4355
|
* @param layer_index the layer number to change.
|
|
4196
4356
|
* @param mode the new wrap mode
|
|
4357
|
+
* @since 2.0
|
|
4197
4358
|
*/
|
|
4198
4359
|
set_layer_wrap_mode(layer_index: number, mode: PipelineWrapMode): void;
|
|
4199
4360
|
|
|
@@ -4201,6 +4362,7 @@ export namespace Cogl {
|
|
|
4201
4362
|
* Sets the wrap mode for the 's' coordinate of texture lookups on this layer.
|
|
4202
4363
|
* @param layer_index the layer number to change.
|
|
4203
4364
|
* @param mode the new wrap mode
|
|
4365
|
+
* @since 2.0
|
|
4204
4366
|
*/
|
|
4205
4367
|
set_layer_wrap_mode_s(layer_index: number, mode: PipelineWrapMode): void;
|
|
4206
4368
|
|
|
@@ -4208,6 +4370,7 @@ export namespace Cogl {
|
|
|
4208
4370
|
* Sets the wrap mode for the 't' coordinate of texture lookups on this layer.
|
|
4209
4371
|
* @param layer_index the layer number to change.
|
|
4210
4372
|
* @param mode the new wrap mode
|
|
4373
|
+
* @since 2.0
|
|
4211
4374
|
*/
|
|
4212
4375
|
set_layer_wrap_mode_t(layer_index: number, mode: PipelineWrapMode): void;
|
|
4213
4376
|
|
|
@@ -4224,6 +4387,7 @@ export namespace Cogl {
|
|
|
4224
4387
|
* undefined.
|
|
4225
4388
|
* @param enable whether to enable per-vertex point size
|
|
4226
4389
|
* @returns `true` if the change suceeded or `false` otherwise
|
|
4390
|
+
* @since 2.0
|
|
4227
4391
|
*/
|
|
4228
4392
|
set_per_vertex_point_size(enable: boolean): boolean;
|
|
4229
4393
|
|
|
@@ -4241,6 +4405,7 @@ export namespace Cogl {
|
|
|
4241
4405
|
* if an application wants to draw points it must make sure to use a
|
|
4242
4406
|
* pipeline that has an explicit point size set on it.
|
|
4243
4407
|
* @param point_size the new point size.
|
|
4408
|
+
* @since 2.0
|
|
4244
4409
|
*/
|
|
4245
4410
|
set_point_size(point_size: number): void;
|
|
4246
4411
|
|
|
@@ -4257,6 +4422,7 @@ export namespace Cogl {
|
|
|
4257
4422
|
* uniform.
|
|
4258
4423
|
* @param uniform_location The uniform's location identifier
|
|
4259
4424
|
* @param value The new value for the uniform
|
|
4425
|
+
* @since 2.0
|
|
4260
4426
|
*/
|
|
4261
4427
|
set_uniform_1f(uniform_location: number, value: number): void;
|
|
4262
4428
|
|
|
@@ -4273,6 +4439,7 @@ export namespace Cogl {
|
|
|
4273
4439
|
* uniform or a sampler uniform.
|
|
4274
4440
|
* @param uniform_location The uniform's location identifier
|
|
4275
4441
|
* @param value The new value for the uniform
|
|
4442
|
+
* @since 2.0
|
|
4276
4443
|
*/
|
|
4277
4444
|
set_uniform_1i(uniform_location: number, value: number): void;
|
|
4278
4445
|
|
|
@@ -4293,6 +4460,7 @@ export namespace Cogl {
|
|
|
4293
4460
|
* @param n_components The number of components in the corresponding uniform's type
|
|
4294
4461
|
* @param count The number of values to set
|
|
4295
4462
|
* @param value Pointer to the new values to set
|
|
4463
|
+
* @since 2.0
|
|
4296
4464
|
*/
|
|
4297
4465
|
set_uniform_float(uniform_location: number, n_components: number, count: number, value: number): void;
|
|
4298
4466
|
|
|
@@ -4313,6 +4481,7 @@ export namespace Cogl {
|
|
|
4313
4481
|
* @param n_components The number of components in the corresponding uniform's type
|
|
4314
4482
|
* @param count The number of values to set
|
|
4315
4483
|
* @param value Pointer to the new values to set
|
|
4484
|
+
* @since 2.0
|
|
4316
4485
|
*/
|
|
4317
4486
|
set_uniform_int(uniform_location: number, n_components: number, count: number, value: number): void;
|
|
4318
4487
|
|
|
@@ -4339,6 +4508,7 @@ export namespace Cogl {
|
|
|
4339
4508
|
* @param count The number of values to set
|
|
4340
4509
|
* @param transpose Whether to transpose the matrix
|
|
4341
4510
|
* @param value Pointer to the new values to set
|
|
4511
|
+
* @since 2.0
|
|
4342
4512
|
*/
|
|
4343
4513
|
set_uniform_matrix(uniform_location: number, dimensions: number, count: number, transpose: boolean, value: number): void;
|
|
4344
4514
|
|
|
@@ -4379,6 +4549,7 @@ export namespace Cogl {
|
|
|
4379
4549
|
* meantime we hope this will handle most practical GLSL and ARBfp
|
|
4380
4550
|
* requirements.
|
|
4381
4551
|
* @param program A {@link Cogl.Handle} to a linked CoglProgram
|
|
4552
|
+
* @since 2.0
|
|
4382
4553
|
*/
|
|
4383
4554
|
set_user_program(program: Handle): void;
|
|
4384
4555
|
}
|
|
@@ -4445,6 +4616,7 @@ export namespace Cogl {
|
|
|
4445
4616
|
* is {@link Cogl.TextureComponents.RGBA}. The other constructors which take
|
|
4446
4617
|
* a %CoglBitmap or a data pointer default to the same components as
|
|
4447
4618
|
* the pixel format of the data.
|
|
4619
|
+
* @since 1.18
|
|
4448
4620
|
*/
|
|
4449
4621
|
get_components(): TextureComponents;
|
|
4450
4622
|
|
|
@@ -4491,6 +4663,7 @@ export namespace Cogl {
|
|
|
4491
4663
|
*
|
|
4492
4664
|
* By default the pre-multipled state is `TRUE`.
|
|
4493
4665
|
* @returns `true` if red, green and blue components are internally stored pre-multiplied by the alpha value or `false` if not.
|
|
4666
|
+
* @since 1.18
|
|
4494
4667
|
*/
|
|
4495
4668
|
get_premultiplied(): boolean;
|
|
4496
4669
|
|
|
@@ -4523,6 +4696,8 @@ export namespace Cogl {
|
|
|
4523
4696
|
* @param sub_width Width in pixels of the subregion
|
|
4524
4697
|
* @param sub_height Height in pixels of the subregion
|
|
4525
4698
|
* @returns A newly created {@link Cogl.Texture} or `null` on failure
|
|
4699
|
+
* @since 1.2
|
|
4700
|
+
* @deprecated since 1.18: Use `cogl_sub_texture_new()`
|
|
4526
4701
|
*/
|
|
4527
4702
|
new_from_sub_texture(sub_x: number, sub_y: number, sub_width: number, sub_height: number): Texture;
|
|
4528
4703
|
|
|
@@ -4547,6 +4722,7 @@ export namespace Cogl {
|
|
|
4547
4722
|
* an image format as long as {@link Cogl.TextureComponents.RG} isn't used
|
|
4548
4723
|
* as the texture's components.
|
|
4549
4724
|
* @param components
|
|
4725
|
+
* @since 1.18
|
|
4550
4726
|
*/
|
|
4551
4727
|
set_components(components: TextureComponents): void;
|
|
4552
4728
|
|
|
@@ -4624,6 +4800,7 @@ export namespace Cogl {
|
|
|
4624
4800
|
*
|
|
4625
4801
|
* By default the `premultipled` state is `TRUE`.
|
|
4626
4802
|
* @param premultiplied Whether any internally stored red, green or blue components are pre-multiplied by an alpha component.
|
|
4803
|
+
* @since 1.18
|
|
4627
4804
|
*/
|
|
4628
4805
|
set_premultiplied(premultiplied: boolean): void;
|
|
4629
4806
|
|
|
@@ -4661,6 +4838,7 @@ export namespace Cogl {
|
|
|
4661
4838
|
* @param dst_height height of destination region to write. (Must be less than or equal to the bitmap height)
|
|
4662
4839
|
* @param bitmap The source bitmap to read from
|
|
4663
4840
|
* @returns `true` if the subregion upload was successful, and `false` otherwise
|
|
4841
|
+
* @since 1.8
|
|
4664
4842
|
*/
|
|
4665
4843
|
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;
|
|
4666
4844
|
}
|
|
@@ -4719,6 +4897,7 @@ export namespace Cogl {
|
|
|
4719
4897
|
* is {@link Cogl.TextureComponents.RGBA}. The other constructors which take
|
|
4720
4898
|
* a %CoglBitmap or a data pointer default to the same components as
|
|
4721
4899
|
* the pixel format of the data.
|
|
4900
|
+
* @since 1.18
|
|
4722
4901
|
*/
|
|
4723
4902
|
get_components(): TextureComponents;
|
|
4724
4903
|
|
|
@@ -4765,6 +4944,7 @@ export namespace Cogl {
|
|
|
4765
4944
|
*
|
|
4766
4945
|
* By default the pre-multipled state is `TRUE`.
|
|
4767
4946
|
* @returns `true` if red, green and blue components are internally stored pre-multiplied by the alpha value or `false` if not.
|
|
4947
|
+
* @since 1.18
|
|
4768
4948
|
*/
|
|
4769
4949
|
get_premultiplied(): boolean;
|
|
4770
4950
|
|
|
@@ -4797,6 +4977,8 @@ export namespace Cogl {
|
|
|
4797
4977
|
* @param sub_width Width in pixels of the subregion
|
|
4798
4978
|
* @param sub_height Height in pixels of the subregion
|
|
4799
4979
|
* @returns A newly created {@link Cogl.Texture} or `null` on failure
|
|
4980
|
+
* @since 1.2
|
|
4981
|
+
* @deprecated since 1.18: Use `cogl_sub_texture_new()`
|
|
4800
4982
|
*/
|
|
4801
4983
|
new_from_sub_texture(sub_x: number, sub_y: number, sub_width: number, sub_height: number): Texture;
|
|
4802
4984
|
|
|
@@ -4821,6 +5003,7 @@ export namespace Cogl {
|
|
|
4821
5003
|
* an image format as long as {@link Cogl.TextureComponents.RG} isn't used
|
|
4822
5004
|
* as the texture's components.
|
|
4823
5005
|
* @param components
|
|
5006
|
+
* @since 1.18
|
|
4824
5007
|
*/
|
|
4825
5008
|
set_components(components: TextureComponents): void;
|
|
4826
5009
|
|
|
@@ -4898,6 +5081,7 @@ export namespace Cogl {
|
|
|
4898
5081
|
*
|
|
4899
5082
|
* By default the `premultipled` state is `TRUE`.
|
|
4900
5083
|
* @param premultiplied Whether any internally stored red, green or blue components are pre-multiplied by an alpha component.
|
|
5084
|
+
* @since 1.18
|
|
4901
5085
|
*/
|
|
4902
5086
|
set_premultiplied(premultiplied: boolean): void;
|
|
4903
5087
|
|
|
@@ -4935,6 +5119,7 @@ export namespace Cogl {
|
|
|
4935
5119
|
* @param dst_height height of destination region to write. (Must be less than or equal to the bitmap height)
|
|
4936
5120
|
* @param bitmap The source bitmap to read from
|
|
4937
5121
|
* @returns `true` if the subregion upload was successful, and `false` otherwise
|
|
5122
|
+
* @since 1.8
|
|
4938
5123
|
*/
|
|
4939
5124
|
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;
|
|
4940
5125
|
}
|
|
@@ -4963,6 +5148,7 @@ export namespace Cogl {
|
|
|
4963
5148
|
* parameter, when using {@link Cogl.Color}<!-- -->s as keys in a {@link GLib.HashTable}.
|
|
4964
5149
|
* @param v1 a {@link Cogl.Color}
|
|
4965
5150
|
* @param v2 a {@link Cogl.Color}
|
|
5151
|
+
* @since 1.0
|
|
4966
5152
|
*/
|
|
4967
5153
|
static equal(v1: null, v2: null): boolean;
|
|
4968
5154
|
|
|
@@ -4972,6 +5158,7 @@ export namespace Cogl {
|
|
|
4972
5158
|
* @param hue hue value, in the 0 .. 360 range
|
|
4973
5159
|
* @param saturation saturation value, in the 0 .. 1 range
|
|
4974
5160
|
* @param luminance luminance value, in the 0 .. 1 range
|
|
5161
|
+
* @since 1.16
|
|
4975
5162
|
*/
|
|
4976
5163
|
static init_from_hsl(hue: number, saturation: number, luminance: number): Color;
|
|
4977
5164
|
|
|
@@ -4979,11 +5166,13 @@ export namespace Cogl {
|
|
|
4979
5166
|
/**
|
|
4980
5167
|
* Creates a copy of `color`
|
|
4981
5168
|
* @returns a newly-allocated {@link Cogl.Color}. Use `cogl_color_free()` to free the allocate resources
|
|
5169
|
+
* @since 1.0
|
|
4982
5170
|
*/
|
|
4983
5171
|
copy(): Color;
|
|
4984
5172
|
|
|
4985
5173
|
/**
|
|
4986
5174
|
* Frees the resources allocated by `cogl_color_new()` and `cogl_color_copy()`
|
|
5175
|
+
* @since 1.0
|
|
4987
5176
|
*/
|
|
4988
5177
|
free(): void;
|
|
4989
5178
|
|
|
@@ -4991,6 +5180,7 @@ export namespace Cogl {
|
|
|
4991
5180
|
* Retrieves the alpha channel of `color` as a fixed point
|
|
4992
5181
|
* value between 0 and 1.0.
|
|
4993
5182
|
* @returns the alpha channel of the passed color
|
|
5183
|
+
* @since 1.0
|
|
4994
5184
|
*/
|
|
4995
5185
|
get_alpha(): number;
|
|
4996
5186
|
|
|
@@ -4998,6 +5188,7 @@ export namespace Cogl {
|
|
|
4998
5188
|
* Retrieves the alpha channel of `color` as a byte value
|
|
4999
5189
|
* between 0 and 255
|
|
5000
5190
|
* @returns the alpha channel of the passed color
|
|
5191
|
+
* @since 1.0
|
|
5001
5192
|
*/
|
|
5002
5193
|
get_alpha_byte(): number;
|
|
5003
5194
|
|
|
@@ -5005,6 +5196,7 @@ export namespace Cogl {
|
|
|
5005
5196
|
* Retrieves the alpha channel of `color` as a floating point
|
|
5006
5197
|
* value between 0.0 and 1.0
|
|
5007
5198
|
* @returns the alpha channel of the passed color
|
|
5199
|
+
* @since 1.0
|
|
5008
5200
|
*/
|
|
5009
5201
|
get_alpha_float(): number;
|
|
5010
5202
|
|
|
@@ -5012,6 +5204,7 @@ export namespace Cogl {
|
|
|
5012
5204
|
* Retrieves the blue channel of `color` as a fixed point
|
|
5013
5205
|
* value between 0 and 1.0.
|
|
5014
5206
|
* @returns the blue channel of the passed color
|
|
5207
|
+
* @since 1.0
|
|
5015
5208
|
*/
|
|
5016
5209
|
get_blue(): number;
|
|
5017
5210
|
|
|
@@ -5019,6 +5212,7 @@ export namespace Cogl {
|
|
|
5019
5212
|
* Retrieves the blue channel of `color` as a byte value
|
|
5020
5213
|
* between 0 and 255
|
|
5021
5214
|
* @returns the blue channel of the passed color
|
|
5215
|
+
* @since 1.0
|
|
5022
5216
|
*/
|
|
5023
5217
|
get_blue_byte(): number;
|
|
5024
5218
|
|
|
@@ -5026,6 +5220,7 @@ export namespace Cogl {
|
|
|
5026
5220
|
* Retrieves the blue channel of `color` as a floating point
|
|
5027
5221
|
* value between 0.0 and 1.0
|
|
5028
5222
|
* @returns the blue channel of the passed color
|
|
5223
|
+
* @since 1.0
|
|
5029
5224
|
*/
|
|
5030
5225
|
get_blue_float(): number;
|
|
5031
5226
|
|
|
@@ -5033,6 +5228,7 @@ export namespace Cogl {
|
|
|
5033
5228
|
* Retrieves the green channel of `color` as a fixed point
|
|
5034
5229
|
* value between 0 and 1.0.
|
|
5035
5230
|
* @returns the green channel of the passed color
|
|
5231
|
+
* @since 1.0
|
|
5036
5232
|
*/
|
|
5037
5233
|
get_green(): number;
|
|
5038
5234
|
|
|
@@ -5040,6 +5236,7 @@ export namespace Cogl {
|
|
|
5040
5236
|
* Retrieves the green channel of `color` as a byte value
|
|
5041
5237
|
* between 0 and 255
|
|
5042
5238
|
* @returns the green channel of the passed color
|
|
5239
|
+
* @since 1.0
|
|
5043
5240
|
*/
|
|
5044
5241
|
get_green_byte(): number;
|
|
5045
5242
|
|
|
@@ -5047,6 +5244,7 @@ export namespace Cogl {
|
|
|
5047
5244
|
* Retrieves the green channel of `color` as a floating point
|
|
5048
5245
|
* value between 0.0 and 1.0
|
|
5049
5246
|
* @returns the green channel of the passed color
|
|
5247
|
+
* @since 1.0
|
|
5050
5248
|
*/
|
|
5051
5249
|
get_green_float(): number;
|
|
5052
5250
|
|
|
@@ -5054,6 +5252,7 @@ export namespace Cogl {
|
|
|
5054
5252
|
* Retrieves the red channel of `color` as a fixed point
|
|
5055
5253
|
* value between 0 and 1.0.
|
|
5056
5254
|
* @returns the red channel of the passed color
|
|
5255
|
+
* @since 1.0
|
|
5057
5256
|
*/
|
|
5058
5257
|
get_red(): number;
|
|
5059
5258
|
|
|
@@ -5061,6 +5260,7 @@ export namespace Cogl {
|
|
|
5061
5260
|
* Retrieves the red channel of `color` as a byte value
|
|
5062
5261
|
* between 0 and 255
|
|
5063
5262
|
* @returns the red channel of the passed color
|
|
5263
|
+
* @since 1.0
|
|
5064
5264
|
*/
|
|
5065
5265
|
get_red_byte(): number;
|
|
5066
5266
|
|
|
@@ -5068,6 +5268,7 @@ export namespace Cogl {
|
|
|
5068
5268
|
* Retrieves the red channel of `color` as a floating point
|
|
5069
5269
|
* value between 0.0 and 1.0
|
|
5070
5270
|
* @returns the red channel of the passed color
|
|
5271
|
+
* @since 1.0
|
|
5071
5272
|
*/
|
|
5072
5273
|
get_red_float(): number;
|
|
5073
5274
|
|
|
@@ -5077,12 +5278,14 @@ export namespace Cogl {
|
|
|
5077
5278
|
* @param green value of the green channel, between 0 and 1.0
|
|
5078
5279
|
* @param blue value of the blue channel, between 0 and 1.0
|
|
5079
5280
|
* @param alpha value of the alpha channel, between 0 and 1.0
|
|
5281
|
+
* @since 1.4
|
|
5080
5282
|
*/
|
|
5081
5283
|
init_from_4f(red: number, green: number, blue: number, alpha: number): void;
|
|
5082
5284
|
|
|
5083
5285
|
/**
|
|
5084
5286
|
* Sets the values of the passed channels into a {@link Cogl.Color}
|
|
5085
5287
|
* @param color_array a pointer to an array of 4 float color components
|
|
5288
|
+
* @since 1.4
|
|
5086
5289
|
*/
|
|
5087
5290
|
init_from_4fv(color_array: number): void;
|
|
5088
5291
|
|
|
@@ -5092,6 +5295,7 @@ export namespace Cogl {
|
|
|
5092
5295
|
* @param green value of the green channel, between 0 and 255
|
|
5093
5296
|
* @param blue value of the blue channel, between 0 and 255
|
|
5094
5297
|
* @param alpha value of the alpha channel, between 0 and 255
|
|
5298
|
+
* @since 1.4
|
|
5095
5299
|
*/
|
|
5096
5300
|
init_from_4ub(red: number, green: number, blue: number, alpha: number): void;
|
|
5097
5301
|
|
|
@@ -5099,78 +5303,91 @@ export namespace Cogl {
|
|
|
5099
5303
|
* Converts a non-premultiplied color to a pre-multiplied color. For
|
|
5100
5304
|
* example, semi-transparent red is (1.0, 0, 0, 0.5) when non-premultiplied
|
|
5101
5305
|
* and (0.5, 0, 0, 0.5) when premultiplied.
|
|
5306
|
+
* @since 1.0
|
|
5102
5307
|
*/
|
|
5103
5308
|
premultiply(): void;
|
|
5104
5309
|
|
|
5105
5310
|
/**
|
|
5106
5311
|
* Sets the alpha channel of `color` to `alpha`.
|
|
5107
5312
|
* @param alpha a float value between 0.0f and 1.0f
|
|
5313
|
+
* @since 1.4
|
|
5108
5314
|
*/
|
|
5109
5315
|
set_alpha(alpha: number): void;
|
|
5110
5316
|
|
|
5111
5317
|
/**
|
|
5112
5318
|
* Sets the alpha channel of `color` to `alpha`.
|
|
5113
5319
|
* @param alpha a byte value between 0 and 255
|
|
5320
|
+
* @since 1.4
|
|
5114
5321
|
*/
|
|
5115
5322
|
set_alpha_byte(alpha: number): void;
|
|
5116
5323
|
|
|
5117
5324
|
/**
|
|
5118
5325
|
* Sets the alpha channel of `color` to `alpha`.
|
|
5119
5326
|
* @param alpha a float value between 0.0f and 1.0f
|
|
5327
|
+
* @since 1.4
|
|
5120
5328
|
*/
|
|
5121
5329
|
set_alpha_float(alpha: number): void;
|
|
5122
5330
|
|
|
5123
5331
|
/**
|
|
5124
5332
|
* Sets the blue channel of `color` to `blue`.
|
|
5125
5333
|
* @param blue a float value between 0.0f and 1.0f
|
|
5334
|
+
* @since 1.4
|
|
5126
5335
|
*/
|
|
5127
5336
|
set_blue(blue: number): void;
|
|
5128
5337
|
|
|
5129
5338
|
/**
|
|
5130
5339
|
* Sets the blue channel of `color` to `blue`.
|
|
5131
5340
|
* @param blue a byte value between 0 and 255
|
|
5341
|
+
* @since 1.4
|
|
5132
5342
|
*/
|
|
5133
5343
|
set_blue_byte(blue: number): void;
|
|
5134
5344
|
|
|
5135
5345
|
/**
|
|
5136
5346
|
* Sets the blue channel of `color` to `blue`.
|
|
5137
5347
|
* @param blue a float value between 0.0f and 1.0f
|
|
5348
|
+
* @since 1.4
|
|
5138
5349
|
*/
|
|
5139
5350
|
set_blue_float(blue: number): void;
|
|
5140
5351
|
|
|
5141
5352
|
/**
|
|
5142
5353
|
* Sets the green channel of `color` to `green`.
|
|
5143
5354
|
* @param green a float value between 0.0f and 1.0f
|
|
5355
|
+
* @since 1.4
|
|
5144
5356
|
*/
|
|
5145
5357
|
set_green(green: number): void;
|
|
5146
5358
|
|
|
5147
5359
|
/**
|
|
5148
5360
|
* Sets the green channel of `color` to `green`.
|
|
5149
5361
|
* @param green a byte value between 0 and 255
|
|
5362
|
+
* @since 1.4
|
|
5150
5363
|
*/
|
|
5151
5364
|
set_green_byte(green: number): void;
|
|
5152
5365
|
|
|
5153
5366
|
/**
|
|
5154
5367
|
* Sets the green channel of `color` to `green`.
|
|
5155
5368
|
* @param green a float value between 0.0f and 1.0f
|
|
5369
|
+
* @since 1.4
|
|
5156
5370
|
*/
|
|
5157
5371
|
set_green_float(green: number): void;
|
|
5158
5372
|
|
|
5159
5373
|
/**
|
|
5160
5374
|
* Sets the red channel of `color` to `red`.
|
|
5161
5375
|
* @param red a float value between 0.0f and 1.0f
|
|
5376
|
+
* @since 1.4
|
|
5162
5377
|
*/
|
|
5163
5378
|
set_red(red: number): void;
|
|
5164
5379
|
|
|
5165
5380
|
/**
|
|
5166
5381
|
* Sets the red channel of `color` to `red`.
|
|
5167
5382
|
* @param red a byte value between 0 and 255
|
|
5383
|
+
* @since 1.4
|
|
5168
5384
|
*/
|
|
5169
5385
|
set_red_byte(red: number): void;
|
|
5170
5386
|
|
|
5171
5387
|
/**
|
|
5172
5388
|
* Sets the red channel of `color` to `red`.
|
|
5173
5389
|
* @param red a float value between 0.0f and 1.0f
|
|
5390
|
+
* @since 1.4
|
|
5174
5391
|
*/
|
|
5175
5392
|
set_red_float(red: number): void;
|
|
5176
5393
|
|
|
@@ -5179,6 +5396,7 @@ export namespace Cogl {
|
|
|
5179
5396
|
*
|
|
5180
5397
|
* The `hue` value is in the 0 .. 360 range. The `luminance` and
|
|
5181
5398
|
* `saturation` values are in the 0 .. 1 range.
|
|
5399
|
+
* @since 1.16
|
|
5182
5400
|
*/
|
|
5183
5401
|
to_hsl(): [number, number, number];
|
|
5184
5402
|
|
|
@@ -5186,6 +5404,7 @@ export namespace Cogl {
|
|
|
5186
5404
|
* Converts a pre-multiplied color to a non-premultiplied color. For
|
|
5187
5405
|
* example, semi-transparent red is (0.5, 0, 0, 0.5) when premultiplied
|
|
5188
5406
|
* and (1.0, 0, 0, 0.5) when non-premultiplied.
|
|
5407
|
+
* @since 1.4
|
|
5189
5408
|
*/
|
|
5190
5409
|
unpremultiply(): void;
|
|
5191
5410
|
}
|
|
@@ -5242,6 +5461,8 @@ export namespace Cogl {
|
|
|
5242
5461
|
* The default is {@link Cogl.MaterialAlphaFunc.ALWAYS}
|
|
5243
5462
|
* @param alpha_func A `CoglMaterialAlphaFunc` constant
|
|
5244
5463
|
* @param alpha_reference A reference point that the chosen alpha function uses to compare incoming fragments to.
|
|
5464
|
+
* @since 1.0
|
|
5465
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_alpha_test_function()` instead
|
|
5245
5466
|
*/
|
|
5246
5467
|
set_alpha_test_function(alpha_func: MaterialAlphaFunc, alpha_reference: number): void;
|
|
5247
5468
|
|
|
@@ -5316,6 +5537,8 @@ export namespace Cogl {
|
|
|
5316
5537
|
* is in premultiplied form.
|
|
5317
5538
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired blend function.
|
|
5318
5539
|
* @returns `true` if the blend string was successfully parsed, and the described blending is supported by the underlying driver/hardware. If there was an error, `false` is returned and `error` is set accordingly (if present).
|
|
5540
|
+
* @since 1.0
|
|
5541
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_blend()` instead
|
|
5319
5542
|
*/
|
|
5320
5543
|
set_blend(blend_string: string): boolean;
|
|
5321
5544
|
|
|
@@ -5323,6 +5546,8 @@ export namespace Cogl {
|
|
|
5323
5546
|
* When blending is setup to reference a CONSTANT blend factor then
|
|
5324
5547
|
* blending will depend on the constant set with this function.
|
|
5325
5548
|
* @param constant_color The constant color you want
|
|
5549
|
+
* @since 1.0
|
|
5550
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_blend_constant()` instead
|
|
5326
5551
|
*/
|
|
5327
5552
|
set_blend_constant(constant_color: Color): void;
|
|
5328
5553
|
|
|
@@ -5336,6 +5561,8 @@ export namespace Cogl {
|
|
|
5336
5561
|
*
|
|
5337
5562
|
* The default value is (1.0, 1.0, 1.0, 1.0)
|
|
5338
5563
|
* @param color The components of the color
|
|
5564
|
+
* @since 1.0
|
|
5565
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_color()` instead
|
|
5339
5566
|
*/
|
|
5340
5567
|
set_color(color: Color): void;
|
|
5341
5568
|
|
|
@@ -5347,6 +5574,8 @@ export namespace Cogl {
|
|
|
5347
5574
|
* @param green The green component
|
|
5348
5575
|
* @param blue The blue component
|
|
5349
5576
|
* @param alpha The alpha component
|
|
5577
|
+
* @since 1.0
|
|
5578
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_color4ub()` instead
|
|
5350
5579
|
*/
|
|
5351
5580
|
set_color4ub(red: number, green: number, blue: number, alpha: number): void;
|
|
5352
5581
|
|
|
@@ -5363,6 +5592,8 @@ export namespace Cogl {
|
|
|
5363
5592
|
* as purely GLSL based layers.</note>
|
|
5364
5593
|
* @param layer_index the index of the layer
|
|
5365
5594
|
* @param texture a {@link Cogl.Handle} for the layer object
|
|
5595
|
+
* @since 1.0
|
|
5596
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer()` instead
|
|
5366
5597
|
*/
|
|
5367
5598
|
set_layer(layer_index: number, texture: Handle): void;
|
|
5368
5599
|
|
|
@@ -5445,6 +5676,8 @@ export namespace Cogl {
|
|
|
5445
5676
|
* @param layer_index Specifies the layer you want define a combine function for
|
|
5446
5677
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired texture combine function.
|
|
5447
5678
|
* @returns `true` if the blend string was successfully parsed, and the described texture combining is supported by the underlying driver and or hardware. On failure, `false` is returned and `error` is set
|
|
5679
|
+
* @since 1.0
|
|
5680
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_combine()` instead
|
|
5448
5681
|
*/
|
|
5449
5682
|
set_layer_combine(layer_index: number, blend_string: string): boolean;
|
|
5450
5683
|
|
|
@@ -5453,6 +5686,8 @@ export namespace Cogl {
|
|
|
5453
5686
|
* description then you can use this function to define its value.
|
|
5454
5687
|
* @param layer_index Specifies the layer you want to specify a constant used for texture combining
|
|
5455
5688
|
* @param constant The constant color you want
|
|
5689
|
+
* @since 1.0
|
|
5690
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_combine_constant()` instead
|
|
5456
5691
|
*/
|
|
5457
5692
|
set_layer_combine_constant(layer_index: number, constant: Color): void;
|
|
5458
5693
|
|
|
@@ -5462,6 +5697,7 @@ export namespace Cogl {
|
|
|
5462
5697
|
* @param layer_index the layer number to change.
|
|
5463
5698
|
* @param min_filter the filter used when scaling a texture down.
|
|
5464
5699
|
* @param mag_filter the filter used when magnifying a texture.
|
|
5700
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_filters()` instead
|
|
5465
5701
|
*/
|
|
5466
5702
|
set_layer_filters(layer_index: number, min_filter: MaterialFilter, mag_filter: MaterialFilter): void;
|
|
5467
5703
|
|
|
@@ -5470,6 +5706,7 @@ export namespace Cogl {
|
|
|
5470
5706
|
* and rotate a single layer of a material used to fill your geometry.
|
|
5471
5707
|
* @param layer_index the index for the layer inside `material`
|
|
5472
5708
|
* @param matrix the transformation matrix for the layer
|
|
5709
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_matrix()` instead
|
|
5473
5710
|
*/
|
|
5474
5711
|
set_layer_matrix(layer_index: number, matrix: Matrix): void;
|
|
5475
5712
|
|
|
@@ -5483,6 +5720,8 @@ export namespace Cogl {
|
|
|
5483
5720
|
* @param layer_index the layer number to change.
|
|
5484
5721
|
* @param enable whether to enable point sprite coord generation.
|
|
5485
5722
|
* @returns `true` if the function succeeds, `false` otherwise.
|
|
5723
|
+
* @since 1.4
|
|
5724
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_layer_point_sprite_coords_enabled()` instead
|
|
5486
5725
|
*/
|
|
5487
5726
|
set_layer_point_sprite_coords_enabled(layer_index: number, enable: boolean): boolean;
|
|
5488
5727
|
|
|
@@ -5495,6 +5734,8 @@ export namespace Cogl {
|
|
|
5495
5734
|
* screen space so it will be the same regardless of any
|
|
5496
5735
|
* transformations. The default point size is 1.0.
|
|
5497
5736
|
* @param point_size the new point size.
|
|
5737
|
+
* @since 1.4
|
|
5738
|
+
* @deprecated since 1.16: Use `cogl_pipeline_set_point_size()` instead
|
|
5498
5739
|
*/
|
|
5499
5740
|
set_point_size(point_size: number): void;
|
|
5500
5741
|
|
|
@@ -5535,6 +5776,8 @@ export namespace Cogl {
|
|
|
5535
5776
|
* meantime we hope this will handle most practical GLSL and ARBfp
|
|
5536
5777
|
* requirements.
|
|
5537
5778
|
* @param program A {@link Cogl.Handle} to a linked CoglProgram
|
|
5779
|
+
* @since 1.4
|
|
5780
|
+
* @deprecated since 1.16: Use `CoglSnippet` api instead instead
|
|
5538
5781
|
*/
|
|
5539
5782
|
set_user_program(program: Handle): void;
|
|
5540
5783
|
}
|
|
@@ -5621,6 +5864,7 @@ export namespace Cogl {
|
|
|
5621
5864
|
* inverse matrix these are not considered in the comparison.
|
|
5622
5865
|
* @param v1 A 4x4 transformation matrix
|
|
5623
5866
|
* @param v2 A 4x4 transformation matrix
|
|
5867
|
+
* @since 1.4
|
|
5624
5868
|
*/
|
|
5625
5869
|
static equal(v1: null, v2: null): boolean;
|
|
5626
5870
|
|
|
@@ -5629,12 +5873,14 @@ export namespace Cogl {
|
|
|
5629
5873
|
* Allocates a new {@link Cogl.Matrix} on the heap and initializes it with
|
|
5630
5874
|
* the same values as `matrix`.
|
|
5631
5875
|
* @returns A newly allocated {@link Cogl.Matrix} which should be freed using `cogl_matrix_free()`
|
|
5876
|
+
* @since 1.6
|
|
5632
5877
|
*/
|
|
5633
5878
|
copy(): Matrix;
|
|
5634
5879
|
|
|
5635
5880
|
/**
|
|
5636
5881
|
* Frees a {@link Cogl.Matrix} that was previously allocated via a call to
|
|
5637
5882
|
* `cogl_matrix_copy()`.
|
|
5883
|
+
* @since 1.6
|
|
5638
5884
|
*/
|
|
5639
5885
|
free(): void;
|
|
5640
5886
|
|
|
@@ -5665,6 +5911,7 @@ export namespace Cogl {
|
|
|
5665
5911
|
* {@link Cogl.Matrix} so that subsequent requests for the inverse transform may
|
|
5666
5912
|
* avoid costly inversion calculations.</note>
|
|
5667
5913
|
* @returns `true` if the inverse was successfully calculated or `false` for degenerate transformations that can't be inverted (in this case the `inverse` matrix will simply be initialized with the identity matrix)
|
|
5914
|
+
* @since 1.2
|
|
5668
5915
|
*/
|
|
5669
5916
|
get_inverse(): [boolean, Matrix];
|
|
5670
5917
|
|
|
@@ -5708,12 +5955,14 @@ export namespace Cogl {
|
|
|
5708
5955
|
* @param tx x coordinate of the translation vector
|
|
5709
5956
|
* @param ty y coordinate of the translation vector
|
|
5710
5957
|
* @param tz z coordinate of the translation vector
|
|
5958
|
+
* @since 2.0
|
|
5711
5959
|
*/
|
|
5712
5960
|
init_translation(tx: number, ty: number, tz: number): void;
|
|
5713
5961
|
|
|
5714
5962
|
/**
|
|
5715
5963
|
* Determines if the given matrix is an identity matrix.
|
|
5716
5964
|
* @returns `true` if `matrix` is an identity matrix else `false`
|
|
5965
|
+
* @since 1.8
|
|
5717
5966
|
*/
|
|
5718
5967
|
is_identity(): boolean;
|
|
5719
5968
|
|
|
@@ -5753,6 +6002,7 @@ export namespace Cogl {
|
|
|
5753
6002
|
* @param world_up_x The X component of the world's up direction vector
|
|
5754
6003
|
* @param world_up_y The Y component of the world's up direction vector
|
|
5755
6004
|
* @param world_up_z The Z component of the world's up direction vector
|
|
6005
|
+
* @since 1.8
|
|
5756
6006
|
*/
|
|
5757
6007
|
look_at(eye_position_x: number, eye_position_y: number, eye_position_z: number, object_x: number, object_y: number, object_z: number, world_up_x: number, world_up_y: number, world_up_z: number): void;
|
|
5758
6008
|
|
|
@@ -5775,6 +6025,7 @@ export namespace Cogl {
|
|
|
5775
6025
|
* @param y_2 The y coordinate for the second horizontal clipping plane
|
|
5776
6026
|
* @param near The <emphasis>distance</emphasis> to the near clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
5777
6027
|
* @param far The <emphasis>distance</emphasis> to the far clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
6028
|
+
* @since 1.10
|
|
5778
6029
|
*/
|
|
5779
6030
|
orthographic(x_1: number, y_1: number, x_2: number, y_2: number, near: number, far: number): void;
|
|
5780
6031
|
|
|
@@ -5850,6 +6101,7 @@ export namespace Cogl {
|
|
|
5850
6101
|
* Multiplies `matrix` with a rotation transformation described by the
|
|
5851
6102
|
* given {@link Graphene.Euler}.
|
|
5852
6103
|
* @param euler A euler describing a rotation
|
|
6104
|
+
* @since 2.0
|
|
5853
6105
|
*/
|
|
5854
6106
|
rotate_euler(euler: Graphene.Euler): void;
|
|
5855
6107
|
|
|
@@ -5931,6 +6183,7 @@ export namespace Cogl {
|
|
|
5931
6183
|
/**
|
|
5932
6184
|
* Replaces `matrix` with its transpose. Ie, every element (i,j) in the
|
|
5933
6185
|
* new matrix is taken from element (j,i) in the old matrix.
|
|
6186
|
+
* @since 1.10
|
|
5934
6187
|
*/
|
|
5935
6188
|
transpose(): void;
|
|
5936
6189
|
|
|
@@ -5954,6 +6207,7 @@ export namespace Cogl {
|
|
|
5954
6207
|
* @param z_2d The distance to the 2D plane. (Should always be positive and be between `z_near` and the z_far value that was passed to `cogl_matrix_frustum()`)
|
|
5955
6208
|
* @param width_2d The width of the 2D coordinate system
|
|
5956
6209
|
* @param height_2d The height of the 2D coordinate system
|
|
6210
|
+
* @since 1.8
|
|
5957
6211
|
*/
|
|
5958
6212
|
view_2d_in_frustum(left: number, right: number, bottom: number, top: number, z_near: number, z_2d: number, width_2d: number, height_2d: number): void;
|
|
5959
6213
|
|
|
@@ -5975,6 +6229,7 @@ export namespace Cogl {
|
|
|
5975
6229
|
* @param z_2d The distance to the 2D plane. (Should always be positive and be between `z_near` and the z_far value that was passed to `cogl_matrix_frustum()`)
|
|
5976
6230
|
* @param width_2d The width of the 2D coordinate system
|
|
5977
6231
|
* @param height_2d The height of the 2D coordinate system
|
|
6232
|
+
* @since 1.8
|
|
5978
6233
|
*/
|
|
5979
6234
|
view_2d_in_perspective(fov_y: number, aspect: number, z_near: number, z_2d: number, width_2d: number, height_2d: number): void;
|
|
5980
6235
|
}
|
|
@@ -6197,6 +6452,7 @@ export namespace Cogl {
|
|
|
6197
6452
|
* program will abort with an error message if there is an error during
|
|
6198
6453
|
* automatic allocation.</note>
|
|
6199
6454
|
* @returns `true` if there were no error allocating the framebuffer, else `false`.
|
|
6455
|
+
* @since 1.8
|
|
6200
6456
|
*/
|
|
6201
6457
|
allocate(): boolean;
|
|
6202
6458
|
|
|
@@ -6205,6 +6461,7 @@ export namespace Cogl {
|
|
|
6205
6461
|
* that includes the color buffer then the specified `color` is used.
|
|
6206
6462
|
* @param buffers A mask of {@link Cogl.BufferBit}<!-- -->'s identifying which auxiliary buffers to clear
|
|
6207
6463
|
* @param color The color to clear the color buffer too if specified in `buffers`.
|
|
6464
|
+
* @since 1.8
|
|
6208
6465
|
*/
|
|
6209
6466
|
clear(buffers: bigint | number, color: Color): void;
|
|
6210
6467
|
|
|
@@ -6216,6 +6473,7 @@ export namespace Cogl {
|
|
|
6216
6473
|
* @param green The green component of color to clear the color buffer too if specified in `buffers`.
|
|
6217
6474
|
* @param blue The blue component of color to clear the color buffer too if specified in `buffers`.
|
|
6218
6475
|
* @param alpha The alpha component of color to clear the color buffer too if specified in `buffers`.
|
|
6476
|
+
* @since 1.8
|
|
6219
6477
|
*/
|
|
6220
6478
|
clear4f(buffers: bigint | number, red: number, green: number, blue: number, alpha: number): void;
|
|
6221
6479
|
|
|
@@ -6237,6 +6495,7 @@ export namespace Cogl {
|
|
|
6237
6495
|
* framebuffer, and it's not meaningful to try and discard the color buffer of
|
|
6238
6496
|
* a {@link Cogl.Offscreen} framebuffer since they are single-buffered.
|
|
6239
6497
|
* @param buffers A {@link Cogl.BufferBit} mask of which ancillary buffers you want to discard.
|
|
6498
|
+
* @since 1.8
|
|
6240
6499
|
*/
|
|
6241
6500
|
discard_buffers(buffers: bigint | number): void;
|
|
6242
6501
|
|
|
@@ -6286,6 +6545,7 @@ export namespace Cogl {
|
|
|
6286
6545
|
* @param y_2 y coordinate lower right on screen.
|
|
6287
6546
|
* @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.
|
|
6288
6547
|
* @param tex_coords_len The length of the `tex_coords` array. (For one layer and one group of texture coordinates, this would be 4)
|
|
6548
|
+
* @since 1.10
|
|
6289
6549
|
*/
|
|
6290
6550
|
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;
|
|
6291
6551
|
|
|
@@ -6306,6 +6566,7 @@ export namespace Cogl {
|
|
|
6306
6566
|
* @param y_1 Y coordinate of the top-left corner
|
|
6307
6567
|
* @param x_2 X coordinate of the bottom-right corner
|
|
6308
6568
|
* @param y_2 Y coordinate of the bottom-right corner
|
|
6569
|
+
* @since 1.10
|
|
6309
6570
|
*/
|
|
6310
6571
|
draw_rectangle(pipeline: Pipeline, x_1: number, y_1: number, x_2: number, y_2: number): void;
|
|
6311
6572
|
|
|
@@ -6332,6 +6593,7 @@ export namespace Cogl {
|
|
|
6332
6593
|
* @param pipeline A {@link Cogl.Pipeline} state object
|
|
6333
6594
|
* @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).
|
|
6334
6595
|
* @param n_rectangles number of rectangles defined in `coordinates`.
|
|
6596
|
+
* @since 1.10
|
|
6335
6597
|
*/
|
|
6336
6598
|
draw_rectangles(pipeline: Pipeline, coordinates: number[], n_rectangles: number): void;
|
|
6337
6599
|
|
|
@@ -6371,6 +6633,7 @@ export namespace Cogl {
|
|
|
6371
6633
|
* @param t_1 T texture coordinate of the top-left coorner
|
|
6372
6634
|
* @param s_2 S texture coordinate of the bottom-right coorner
|
|
6373
6635
|
* @param t_2 T texture coordinate of the bottom-right coorner
|
|
6636
|
+
* @since 1.10
|
|
6374
6637
|
*/
|
|
6375
6638
|
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;
|
|
6376
6639
|
|
|
@@ -6412,6 +6675,7 @@ export namespace Cogl {
|
|
|
6412
6675
|
* @param pipeline A {@link Cogl.Pipeline} state object
|
|
6413
6676
|
* @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()`.
|
|
6414
6677
|
* @param n_rectangles number of rectangles to `coordinates` to draw
|
|
6678
|
+
* @since 1.10
|
|
6415
6679
|
*/
|
|
6416
6680
|
draw_textured_rectangles(pipeline: Pipeline, coordinates: number[], n_rectangles: number): void;
|
|
6417
6681
|
|
|
@@ -6425,6 +6689,7 @@ export namespace Cogl {
|
|
|
6425
6689
|
* One example might be for benchmarking purposes to be sure timing
|
|
6426
6690
|
* measurements reflect the time that the GPU is busy for not just the time it
|
|
6427
6691
|
* takes to queue rendering commands.
|
|
6692
|
+
* @since 1.10
|
|
6428
6693
|
*/
|
|
6429
6694
|
finish(): void;
|
|
6430
6695
|
|
|
@@ -6446,18 +6711,21 @@ export namespace Cogl {
|
|
|
6446
6711
|
* @param top Y position of the top clipping plane where it intersects the near clipping plane
|
|
6447
6712
|
* @param z_near The distance to the near clipping plane (Must be positive)
|
|
6448
6713
|
* @param z_far The distance to the far clipping plane (Must be positive)
|
|
6714
|
+
* @since 1.10
|
|
6449
6715
|
*/
|
|
6450
6716
|
frustum(left: number, right: number, bottom: number, top: number, z_near: number, z_far: number): void;
|
|
6451
6717
|
|
|
6452
6718
|
/**
|
|
6453
6719
|
* Retrieves the number of alpha bits of `framebuffer`
|
|
6454
6720
|
* @returns the number of bits
|
|
6721
|
+
* @since 1.8
|
|
6455
6722
|
*/
|
|
6456
6723
|
get_alpha_bits(): number;
|
|
6457
6724
|
|
|
6458
6725
|
/**
|
|
6459
6726
|
* Retrieves the number of blue bits of `framebuffer`
|
|
6460
6727
|
* @returns the number of bits
|
|
6728
|
+
* @since 1.8
|
|
6461
6729
|
*/
|
|
6462
6730
|
get_blue_bits(): number;
|
|
6463
6731
|
|
|
@@ -6466,12 +6734,14 @@ export namespace Cogl {
|
|
|
6466
6734
|
* instantiated within. This is the {@link Cogl.Context} that was passed to
|
|
6467
6735
|
* `cogl_onscreen_new()` for example.
|
|
6468
6736
|
* @returns The {@link Cogl.Context} that the given `framebuffer` was instantiated within.
|
|
6737
|
+
* @since 1.8
|
|
6469
6738
|
*/
|
|
6470
6739
|
get_context(): Context;
|
|
6471
6740
|
|
|
6472
6741
|
/**
|
|
6473
6742
|
* Retrieves the number of depth bits of `framebuffer`
|
|
6474
6743
|
* @returns the number of bits
|
|
6744
|
+
* @since 2.0
|
|
6475
6745
|
*/
|
|
6476
6746
|
get_depth_bits(): number;
|
|
6477
6747
|
|
|
@@ -6479,6 +6749,7 @@ export namespace Cogl {
|
|
|
6479
6749
|
* Queries whether depth buffer writing is enabled for `framebuffer`. This
|
|
6480
6750
|
* can be controlled via `cogl_framebuffer_set_depth_write_enabled()`.
|
|
6481
6751
|
* @returns `true` if depth writing is enabled or `false` if not.
|
|
6752
|
+
* @since 1.18
|
|
6482
6753
|
*/
|
|
6483
6754
|
get_depth_write_enabled(): boolean;
|
|
6484
6755
|
|
|
@@ -6490,18 +6761,21 @@ export namespace Cogl {
|
|
|
6490
6761
|
* display pipeline does not support dithering. This value only represents
|
|
6491
6762
|
* the user's request for dithering.</note>
|
|
6492
6763
|
* @returns `true` if dithering has been requested or `false` if not.
|
|
6764
|
+
* @since 1.8
|
|
6493
6765
|
*/
|
|
6494
6766
|
get_dither_enabled(): boolean;
|
|
6495
6767
|
|
|
6496
6768
|
/**
|
|
6497
6769
|
* Retrieves the number of green bits of `framebuffer`
|
|
6498
6770
|
* @returns the number of bits
|
|
6771
|
+
* @since 1.8
|
|
6499
6772
|
*/
|
|
6500
6773
|
get_green_bits(): number;
|
|
6501
6774
|
|
|
6502
6775
|
/**
|
|
6503
6776
|
* Queries the current height of the given `framebuffer`.
|
|
6504
6777
|
* @returns The height of `framebuffer`.
|
|
6778
|
+
* @since 1.8
|
|
6505
6779
|
*/
|
|
6506
6780
|
get_height(): number;
|
|
6507
6781
|
|
|
@@ -6509,17 +6783,20 @@ export namespace Cogl {
|
|
|
6509
6783
|
|
|
6510
6784
|
/**
|
|
6511
6785
|
* Stores the current model-view matrix in `matrix`.
|
|
6786
|
+
* @since 1.10
|
|
6512
6787
|
*/
|
|
6513
6788
|
get_modelview_matrix(): Matrix;
|
|
6514
6789
|
|
|
6515
6790
|
/**
|
|
6516
6791
|
* Stores the current projection matrix in `matrix`.
|
|
6792
|
+
* @since 1.10
|
|
6517
6793
|
*/
|
|
6518
6794
|
get_projection_matrix(): Matrix;
|
|
6519
6795
|
|
|
6520
6796
|
/**
|
|
6521
6797
|
* Retrieves the number of red bits of `framebuffer`
|
|
6522
6798
|
* @returns the number of bits
|
|
6799
|
+
* @since 1.8
|
|
6523
6800
|
*/
|
|
6524
6801
|
get_red_bits(): number;
|
|
6525
6802
|
|
|
@@ -6537,6 +6814,7 @@ export namespace Cogl {
|
|
|
6537
6814
|
* framebuffer has been allocated the value will reflect the actual
|
|
6538
6815
|
* number of samples that will be made by the GPU.
|
|
6539
6816
|
* @returns The number of point samples made per pixel when rasterizing geometry or 0 if single-sample rendering has been chosen.
|
|
6817
|
+
* @since 1.10
|
|
6540
6818
|
*/
|
|
6541
6819
|
get_samples_per_pixel(): number;
|
|
6542
6820
|
|
|
@@ -6544,6 +6822,7 @@ export namespace Cogl {
|
|
|
6544
6822
|
* Gets the current {@link Cogl.StereoMode}, which defines which stereo buffers
|
|
6545
6823
|
* should be drawn to. See `cogl_framebuffer_set_stereo_mode()`.
|
|
6546
6824
|
* @returns A {@link Cogl.StereoMode}
|
|
6825
|
+
* @since 1.20
|
|
6547
6826
|
*/
|
|
6548
6827
|
get_stereo_mode(): StereoMode;
|
|
6549
6828
|
|
|
@@ -6552,6 +6831,7 @@ export namespace Cogl {
|
|
|
6552
6831
|
* using `cogl_framebuffer_set_viewport()` or the default values which are 0, 0,
|
|
6553
6832
|
* framebuffer_width and framebuffer_height. The values are written into the
|
|
6554
6833
|
* given `viewport` array.
|
|
6834
|
+
* @since 1.8
|
|
6555
6835
|
*/
|
|
6556
6836
|
get_viewport4fv(): number[];
|
|
6557
6837
|
|
|
@@ -6559,6 +6839,7 @@ export namespace Cogl {
|
|
|
6559
6839
|
* Queries the height of the viewport as set using `cogl_framebuffer_set_viewport()`
|
|
6560
6840
|
* or the default value which is the height of the framebuffer.
|
|
6561
6841
|
* @returns The height of the viewport.
|
|
6842
|
+
* @since 1.8
|
|
6562
6843
|
*/
|
|
6563
6844
|
get_viewport_height(): number;
|
|
6564
6845
|
|
|
@@ -6566,6 +6847,7 @@ export namespace Cogl {
|
|
|
6566
6847
|
* Queries the width of the viewport as set using `cogl_framebuffer_set_viewport()`
|
|
6567
6848
|
* or the default value which is the width of the framebuffer.
|
|
6568
6849
|
* @returns The width of the viewport.
|
|
6850
|
+
* @since 1.8
|
|
6569
6851
|
*/
|
|
6570
6852
|
get_viewport_width(): number;
|
|
6571
6853
|
|
|
@@ -6573,6 +6855,7 @@ export namespace Cogl {
|
|
|
6573
6855
|
* Queries the x coordinate of the viewport origin as set using `cogl_framebuffer_set_viewport()`
|
|
6574
6856
|
* or the default value which is 0.
|
|
6575
6857
|
* @returns The x coordinate of the viewport origin.
|
|
6858
|
+
* @since 1.8
|
|
6576
6859
|
*/
|
|
6577
6860
|
get_viewport_x(): number;
|
|
6578
6861
|
|
|
@@ -6580,17 +6863,20 @@ export namespace Cogl {
|
|
|
6580
6863
|
* Queries the y coordinate of the viewport origin as set using `cogl_framebuffer_set_viewport()`
|
|
6581
6864
|
* or the default value which is 0.
|
|
6582
6865
|
* @returns The y coordinate of the viewport origin.
|
|
6866
|
+
* @since 1.8
|
|
6583
6867
|
*/
|
|
6584
6868
|
get_viewport_y(): number;
|
|
6585
6869
|
|
|
6586
6870
|
/**
|
|
6587
6871
|
* Queries the current width of the given `framebuffer`.
|
|
6588
6872
|
* @returns The width of `framebuffer`.
|
|
6873
|
+
* @since 1.8
|
|
6589
6874
|
*/
|
|
6590
6875
|
get_width(): number;
|
|
6591
6876
|
|
|
6592
6877
|
/**
|
|
6593
6878
|
* Resets the current model-view matrix to the identity matrix.
|
|
6879
|
+
* @since 1.10
|
|
6594
6880
|
*/
|
|
6595
6881
|
identity_matrix(): void;
|
|
6596
6882
|
|
|
@@ -6603,6 +6889,7 @@ export namespace Cogl {
|
|
|
6603
6889
|
* @param y_2 The y coordinate for the second horizontal clipping plane
|
|
6604
6890
|
* @param near The <emphasis>distance</emphasis> to the near clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
6605
6891
|
* @param far The <emphasis>distance</emphasis> to the far clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
6892
|
+
* @since 1.10
|
|
6606
6893
|
*/
|
|
6607
6894
|
orthographic(x_1: number, y_1: number, x_2: number, y_2: number, near: number, far: number): void;
|
|
6608
6895
|
|
|
@@ -6618,6 +6905,7 @@ export namespace Cogl {
|
|
|
6618
6905
|
* @param aspect The (width over height) aspect ratio for display
|
|
6619
6906
|
* @param z_near The distance to the near clipping plane (Must be positive, and must not be 0)
|
|
6620
6907
|
* @param z_far The distance to the far clipping plane (Must be positive)
|
|
6908
|
+
* @since 1.10
|
|
6621
6909
|
*/
|
|
6622
6910
|
perspective(fov_y: number, aspect: number, z_near: number, z_far: number): void;
|
|
6623
6911
|
|
|
@@ -6625,17 +6913,20 @@ export namespace Cogl {
|
|
|
6625
6913
|
* Reverts the clipping region to the state before the last call to
|
|
6626
6914
|
* `cogl_framebuffer_push_scissor_clip()`, `cogl_framebuffer_push_rectangle_clip()`
|
|
6627
6915
|
* `cogl_framebuffer_push_path_clip()`, or `cogl_framebuffer_push_primitive_clip()`.
|
|
6916
|
+
* @since 1.10
|
|
6628
6917
|
*/
|
|
6629
6918
|
pop_clip(): void;
|
|
6630
6919
|
|
|
6631
6920
|
/**
|
|
6632
6921
|
* Restores the model-view matrix on the top of the matrix stack.
|
|
6922
|
+
* @since 1.10
|
|
6633
6923
|
*/
|
|
6634
6924
|
pop_matrix(): void;
|
|
6635
6925
|
|
|
6636
6926
|
/**
|
|
6637
6927
|
* Copies the current model-view matrix onto the matrix stack. The matrix
|
|
6638
6928
|
* can later be restored with `cogl_framebuffer_pop_matrix()`.
|
|
6929
|
+
* @since 1.10
|
|
6639
6930
|
*/
|
|
6640
6931
|
push_matrix(): void;
|
|
6641
6932
|
|
|
@@ -6652,6 +6943,7 @@ export namespace Cogl {
|
|
|
6652
6943
|
* @param y_1 y coordinate for top left corner of the clip rectangle
|
|
6653
6944
|
* @param x_2 x coordinate for bottom right corner of the clip rectangle
|
|
6654
6945
|
* @param y_2 y coordinate for bottom right corner of the clip rectangle
|
|
6946
|
+
* @since 1.10
|
|
6655
6947
|
*/
|
|
6656
6948
|
push_rectangle_clip(x_1: number, y_1: number, x_2: number, y_2: number): void;
|
|
6657
6949
|
|
|
@@ -6673,6 +6965,7 @@ export namespace Cogl {
|
|
|
6673
6965
|
* @param y top edge of the clip rectangle in window coordinates
|
|
6674
6966
|
* @param width width of the clip rectangle
|
|
6675
6967
|
* @param height height of the clip rectangle
|
|
6968
|
+
* @since 1.10
|
|
6676
6969
|
*/
|
|
6677
6970
|
push_scissor_clip(x: number, y: number, width: number, height: number): void;
|
|
6678
6971
|
|
|
@@ -6710,6 +7003,7 @@ export namespace Cogl {
|
|
|
6710
7003
|
* @param format The pixel format to store the data in
|
|
6711
7004
|
* @param pixels The address of the buffer to store the data in
|
|
6712
7005
|
* @returns `true` if the read succeeded or `false` otherwise.
|
|
7006
|
+
* @since 1.10
|
|
6713
7007
|
*/
|
|
6714
7008
|
read_pixels(x: number, y: number, width: number, height: number, format: PixelFormat, pixels: number): boolean;
|
|
6715
7009
|
|
|
@@ -6729,6 +7023,7 @@ export namespace Cogl {
|
|
|
6729
7023
|
* @param source Identifies which auxillary buffer you want to read (only COGL_READ_PIXELS_COLOR_BUFFER supported currently)
|
|
6730
7024
|
* @param bitmap The bitmap to store the results in.
|
|
6731
7025
|
* @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.
|
|
7026
|
+
* @since 1.10
|
|
6732
7027
|
*/
|
|
6733
7028
|
read_pixels_into_bitmap(x: number, y: number, source: ReadPixelsFlags, bitmap: Bitmap): boolean;
|
|
6734
7029
|
|
|
@@ -6753,6 +7048,7 @@ export namespace Cogl {
|
|
|
6753
7048
|
* If you are performing incremental updates to a framebuffer you
|
|
6754
7049
|
* should consider using `cogl_framebuffer_resolve_samples_region()`
|
|
6755
7050
|
* instead to avoid resolving redundant pixels.
|
|
7051
|
+
* @since 1.8
|
|
6756
7052
|
*/
|
|
6757
7053
|
resolve_samples(): void;
|
|
6758
7054
|
|
|
@@ -6782,6 +7078,7 @@ export namespace Cogl {
|
|
|
6782
7078
|
* @param y top-left y coordinate of region to resolve
|
|
6783
7079
|
* @param width width of region to resolve
|
|
6784
7080
|
* @param height height of region to resolve
|
|
7081
|
+
* @since 1.8
|
|
6785
7082
|
*/
|
|
6786
7083
|
resolve_samples_region(x: number, y: number, width: number, height: number): void;
|
|
6787
7084
|
|
|
@@ -6795,6 +7092,7 @@ export namespace Cogl {
|
|
|
6795
7092
|
* @param x X-component of vertex to rotate around.
|
|
6796
7093
|
* @param y Y-component of vertex to rotate around.
|
|
6797
7094
|
* @param z Z-component of vertex to rotate around.
|
|
7095
|
+
* @since 1.10
|
|
6798
7096
|
*/
|
|
6799
7097
|
rotate(angle: number, x: number, y: number, z: number): void;
|
|
6800
7098
|
|
|
@@ -6802,6 +7100,7 @@ export namespace Cogl {
|
|
|
6802
7100
|
* Multiplies the current model-view matrix by one that rotates
|
|
6803
7101
|
* according to the rotation described by `euler`.
|
|
6804
7102
|
* @param euler A {@link Graphene.Euler}
|
|
7103
|
+
* @since 2.0
|
|
6805
7104
|
*/
|
|
6806
7105
|
rotate_euler(euler: Graphene.Euler): void;
|
|
6807
7106
|
|
|
@@ -6811,6 +7110,7 @@ export namespace Cogl {
|
|
|
6811
7110
|
* @param x Amount to scale along the x-axis
|
|
6812
7111
|
* @param y Amount to scale along the y-axis
|
|
6813
7112
|
* @param z Amount to scale along the z-axis
|
|
7113
|
+
* @since 1.10
|
|
6814
7114
|
*/
|
|
6815
7115
|
scale(x: number, y: number, z: number): void;
|
|
6816
7116
|
|
|
@@ -6822,6 +7122,7 @@ export namespace Cogl {
|
|
|
6822
7122
|
*
|
|
6823
7123
|
* Depth buffer writing is enabled by default.
|
|
6824
7124
|
* @param depth_write_enabled `true` to enable depth writing or `false` to disable
|
|
7125
|
+
* @since 1.18
|
|
6825
7126
|
*/
|
|
6826
7127
|
set_depth_write_enabled(depth_write_enabled: boolean): void;
|
|
6827
7128
|
|
|
@@ -6840,18 +7141,21 @@ export namespace Cogl {
|
|
|
6840
7141
|
*
|
|
6841
7142
|
* Dithering is enabled by default.
|
|
6842
7143
|
* @param dither_enabled `true` to enable dithering or `false` to disable
|
|
7144
|
+
* @since 1.8
|
|
6843
7145
|
*/
|
|
6844
7146
|
set_dither_enabled(dither_enabled: boolean): void;
|
|
6845
7147
|
|
|
6846
7148
|
/**
|
|
6847
7149
|
* Sets `matrix` as the new model-view matrix.
|
|
6848
7150
|
* @param matrix the new model-view matrix
|
|
7151
|
+
* @since 1.10
|
|
6849
7152
|
*/
|
|
6850
7153
|
set_modelview_matrix(matrix: Matrix): void;
|
|
6851
7154
|
|
|
6852
7155
|
/**
|
|
6853
7156
|
* Sets `matrix` as the new projection matrix.
|
|
6854
7157
|
* @param matrix the new projection matrix
|
|
7158
|
+
* @since 1.10
|
|
6855
7159
|
*/
|
|
6856
7160
|
set_projection_matrix(matrix: Matrix): void;
|
|
6857
7161
|
|
|
@@ -6889,6 +7193,7 @@ export namespace Cogl {
|
|
|
6889
7193
|
* framebuffer has changed this can lead to redundant work being
|
|
6890
7194
|
* done.</note>
|
|
6891
7195
|
* @param samples_per_pixel The minimum number of samples per pixel
|
|
7196
|
+
* @since 1.8
|
|
6892
7197
|
*/
|
|
6893
7198
|
set_samples_per_pixel(samples_per_pixel: number): void;
|
|
6894
7199
|
|
|
@@ -6901,6 +7206,7 @@ export namespace Cogl {
|
|
|
6901
7206
|
* enabled. (See `cogl_onscreen_template_set_stereo_enabled()`,
|
|
6902
7207
|
* `cogl_framebuffer_get_is_stereo()`.)
|
|
6903
7208
|
* @param stereo_mode A {@link Cogl.StereoMode} specifying which stereo buffers should be drawn tow.
|
|
7209
|
+
* @since 1.20
|
|
6904
7210
|
*/
|
|
6905
7211
|
set_stereo_mode(stereo_mode: StereoMode): void;
|
|
6906
7212
|
|
|
@@ -6924,12 +7230,14 @@ export namespace Cogl {
|
|
|
6924
7230
|
* @param y The top-left y coordinate of the viewport origin (only integers supported currently)
|
|
6925
7231
|
* @param width The width of the viewport (only integers supported currently)
|
|
6926
7232
|
* @param height The height of the viewport (only integers supported currently)
|
|
7233
|
+
* @since 1.8
|
|
6927
7234
|
*/
|
|
6928
7235
|
set_viewport(x: number, y: number, width: number, height: number): void;
|
|
6929
7236
|
|
|
6930
7237
|
/**
|
|
6931
7238
|
* Multiplies the current model-view matrix by the given matrix.
|
|
6932
7239
|
* @param matrix the matrix to multiply with the current model-view
|
|
7240
|
+
* @since 1.10
|
|
6933
7241
|
*/
|
|
6934
7242
|
transform(matrix: Matrix): void;
|
|
6935
7243
|
|
|
@@ -6939,6 +7247,7 @@ export namespace Cogl {
|
|
|
6939
7247
|
* @param x Distance to translate along the x-axis
|
|
6940
7248
|
* @param y Distance to translate along the y-axis
|
|
6941
7249
|
* @param z Distance to translate along the z-axis
|
|
7250
|
+
* @since 1.10
|
|
6942
7251
|
*/
|
|
6943
7252
|
translate(x: number, y: number, z: number): void;
|
|
6944
7253
|
}
|
|
@@ -7012,6 +7321,7 @@ export namespace Cogl {
|
|
|
7012
7321
|
* is {@link Cogl.TextureComponents.RGBA}. The other constructors which take
|
|
7013
7322
|
* a %CoglBitmap or a data pointer default to the same components as
|
|
7014
7323
|
* the pixel format of the data.
|
|
7324
|
+
* @since 1.18
|
|
7015
7325
|
*/
|
|
7016
7326
|
get_components(): TextureComponents;
|
|
7017
7327
|
|
|
@@ -7058,6 +7368,7 @@ export namespace Cogl {
|
|
|
7058
7368
|
*
|
|
7059
7369
|
* By default the pre-multipled state is `TRUE`.
|
|
7060
7370
|
* @returns `true` if red, green and blue components are internally stored pre-multiplied by the alpha value or `false` if not.
|
|
7371
|
+
* @since 1.18
|
|
7061
7372
|
*/
|
|
7062
7373
|
get_premultiplied(): boolean;
|
|
7063
7374
|
|
|
@@ -7090,6 +7401,8 @@ export namespace Cogl {
|
|
|
7090
7401
|
* @param sub_width Width in pixels of the subregion
|
|
7091
7402
|
* @param sub_height Height in pixels of the subregion
|
|
7092
7403
|
* @returns A newly created {@link Cogl.Texture} or `null` on failure
|
|
7404
|
+
* @since 1.2
|
|
7405
|
+
* @deprecated since 1.18: Use `cogl_sub_texture_new()`
|
|
7093
7406
|
*/
|
|
7094
7407
|
new_from_sub_texture(sub_x: number, sub_y: number, sub_width: number, sub_height: number): Texture;
|
|
7095
7408
|
|
|
@@ -7114,6 +7427,7 @@ export namespace Cogl {
|
|
|
7114
7427
|
* an image format as long as {@link Cogl.TextureComponents.RG} isn't used
|
|
7115
7428
|
* as the texture's components.
|
|
7116
7429
|
* @param components
|
|
7430
|
+
* @since 1.18
|
|
7117
7431
|
*/
|
|
7118
7432
|
set_components(components: TextureComponents): void;
|
|
7119
7433
|
|
|
@@ -7191,6 +7505,7 @@ export namespace Cogl {
|
|
|
7191
7505
|
*
|
|
7192
7506
|
* By default the `premultipled` state is `TRUE`.
|
|
7193
7507
|
* @param premultiplied Whether any internally stored red, green or blue components are pre-multiplied by an alpha component.
|
|
7508
|
+
* @since 1.18
|
|
7194
7509
|
*/
|
|
7195
7510
|
set_premultiplied(premultiplied: boolean): void;
|
|
7196
7511
|
|
|
@@ -7228,6 +7543,7 @@ export namespace Cogl {
|
|
|
7228
7543
|
* @param dst_height height of destination region to write. (Must be less than or equal to the bitmap height)
|
|
7229
7544
|
* @param bitmap The source bitmap to read from
|
|
7230
7545
|
* @returns `true` if the subregion upload was successful, and `false` otherwise
|
|
7546
|
+
* @since 1.8
|
|
7231
7547
|
*/
|
|
7232
7548
|
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;
|
|
7233
7549
|
}
|