Creates a low-level 3D texture and initializes it with the images in bitmap
.
The images are assumed to be packed together after one another in the increasing y axis. The height of individual image is given as
height
and the number of images is given in depth
. The actual height of the bitmap can be larger than
height
× depth
. In this case it assumes there is padding between the images.
The storage for the texture is not allocated before this function returns. You can call 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 set_components and set_premultiplied.
<note>This texture will fail to allocate later if cogl_feature_id_texture_3d is not advertised. Allocation can also fail if the requested dimensions are not supported by the GPU.</note>
bitmap |
A Bitmap object. |
height |
height of the texture in pixels. |
depth |
depth of the texture in pixels. |
a newly created Texture3D |