Cogl.Texture3D.new_with_size
function new_with_size(context: Cogl.Context, width: Number(gint), height: Number(gint), depth: Number(gint)): Cogl.Texture3D { // Gjs wrapper for cogl_texture_3d_new_with_size() }
Creates a low-level Cogl.Texture3D texture with the specified dimensions and pixel format.
The storage for the texture is not allocated before this function returns. You can call Cogl.Texture.prototype.allocate to explicitly allocate the underlying storage or preferably let Cogl automatically allocate storage lazily when it may know more about how the texture is going to be used and can optimize how it is allocated.
The texture is still configurable until it has been allocated so for example you can influence the internal format of the texture using Cogl.Texture.prototype.set_components and Cogl.Texture.prototype.set_premultiplied.
<note>This texture will fail to allocate later if Cogl.FeatureID.ogl_feature_id_texture_3d is not advertised. Allocation can also fail if the requested dimensions are not supported by the GPU.</note>
Since 1.10
- context
- width
width of the texture in pixels.
- height
height of the texture in pixels.
- depth
depth of the texture in pixels.
- Returns
A new Cogl.Texture3D object with no storage yet allocated.