package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gdk/Ocgtk_gdk/Gdk/Wrappers/Dmabuf_texture_builder/index.html
Module Wrappers.Dmabuf_texture_builder
type t = [ `dmabuf_texture_builder | `object_ ] Gobject.objval new_ : unit -> tCreate a new DmabufTextureBuilder
val set_width : t -> int -> unitSets the width of the texture.
The width must be set before calling method@Gdk.GLTextureBuilder.build.
val set_update_texture :
t ->
[ `texture | `object_ ] Gobject.obj option ->
unitSets the texture to be updated by this texture. See method@Gdk.DmabufTextureBuilder.set_update_region for an explanation.
val set_update_region : t -> Ocgtk_cairo.Cairo.Wrappers.Region.t option -> unitSets the region to be updated by this texture. Together with property@Gdk.DmabufTextureBuilder:update-texture this describes an update of a previous texture.
When rendering animations of large textures, it is possible that consecutive textures are only updating contents in parts of the texture. It is then possible to describe this update via these two properties, so that GTK can avoid rerendering parts that did not change.
An example would be a screen recording where only the mouse pointer moves.
val set_stride : t -> int -> int -> unitSets the stride for a plane.
The stride must be set for all planes before calling method@Gdk.GLTextureBuilder.build.
val set_premultiplied : t -> bool -> unitSets whether the data is premultiplied.
Unless otherwise specified, all formats including alpha channels are assumed to be premultiplied.
val set_offset : t -> int -> int -> unitSets the offset for a plane.
val set_n_planes : t -> int -> unitSets the number of planes of the texture.
val set_height : t -> int -> unitSets the height of the texture.
The height must be set before calling method@Gdk.GLTextureBuilder.build.
Sets the format of the texture.
The format is specified as a fourcc code.
The format must be set before calling method@Gdk.GLTextureBuilder.build.
val set_fd : t -> int -> int -> unitSets the file descriptor for a plane.
val set_display : t -> [ `display | `object_ ] Gobject.obj -> unitSets the display that this texture builder is associated with.
The display is used to determine the supported dma-buf formats.
val get_width : t -> intGets the width previously set via gdk_dmabuf_texture_builder_set_width() or 0 if the width wasn't set.
val get_update_texture : t -> [ `texture | `object_ ] Gobject.obj optionGets the texture previously set via gdk_dmabuf_texture_builder_set_update_texture() or %NULL if none was set.
val get_update_region : t -> Ocgtk_cairo.Cairo.Wrappers.Region.t optionGets the region previously set via gdk_dmabuf_texture_builder_set_update_region() or %NULL if none was set.
val get_stride : t -> int -> intGets the stride value for a plane.
val get_premultiplied : t -> boolWhether the data is premultiplied.
val get_offset : t -> int -> intGets the offset value for a plane.
val get_n_planes : t -> intGets the number of planes.
val get_height : t -> intGets the height previously set via gdk_dmabuf_texture_builder_set_height() or 0 if the height wasn't set.
Gets the format previously set via gdk_dmabuf_texture_builder_set_fourcc() or 0 if the format wasn't set.
The format is specified as a fourcc code.
val get_fd : t -> int -> intGets the file descriptor for a plane.
val get_display : t -> [ `display | `object_ ] Gobject.objReturns the display that this texture builder is associated with.