One Hat Cyber Team
Your IP :
216.73.217.15
Server IP :
157.15.65.100
Server :
Linux 157-15-65-100.cprapid.com 5.14.0-362.24.2.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Mar 30 14:11:54 EDT 2024 x86_64
Server Software :
Apache
PHP Version :
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
lib64
/
mutter-8
/
View File Name :
Cogl-8.gir
<?xml version="1.0"?> <!-- This file was automatically generated from C sources - DO NOT EDIT! To affect the contents of this file, edit the original C definitions, and/or use gtk-doc annotations. --> <repository version="1.2" xmlns="http://www.gtk.org/introspection/core/1.0" xmlns:c="http://www.gtk.org/introspection/c/1.0" xmlns:glib="http://www.gtk.org/introspection/glib/1.0"> <include name="GL" version="1.0"/> <include name="GObject" version="2.0"/> <include name="Graphene" version="1.0"/> <include name="cairo" version="1.0"/> <c:include name="cogl/cogl.h"/> <namespace name="Cogl" version="8" shared-library="libmutter-cogl-8.so.0" c:identifier-prefixes="Cogl" c:symbol-prefixes="cogl"> <alias name="Angle" c:type="CoglAngle"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="91">Integer representation of an angle such that 1024 corresponds to full circle (i.e., 2 * pi).</doc> <source-position filename="cogl/cogl/cogl-types.h" line="99"/> <type name="gint32" c:type="int32_t"/> </alias> <alias name="Handle" c:type="CoglHandle"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="77">Type used for storing references to cogl objects, the CoglHandle is a fully opaque type without any public data members.</doc> <source-position filename="cogl/cogl/cogl-types.h" line="83"/> <type name="gpointer" c:type="void*"/> </alias> <alias name="PipelineKey" c:type="CoglPipelineKey"> <source-position filename="cogl/cogl/cogl-context.h" line="341"/> <type name="utf8" c:type="const char* const"/> </alias> <alias name="UserDataDestroyCallback" c:type="CoglUserDataDestroyCallback"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="130">When associating private data with a #CoglObject a callback can be given which will be called either if the object is destroyed or if cogl_object_set_user_data() is called with NULL user_data for the same key.</doc> <source-position filename="cogl/cogl/cogl-object.h" line="142"/> <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/> </alias> <constant name="AFIRST_BIT" value="64" c:type="COGL_AFIRST_BIT"> <source-position filename="cogl/cogl/cogl-pixel-format.h" line="66"/> <type name="gint" c:type="gint"/> </constant> <constant name="A_BIT" value="16" c:type="COGL_A_BIT"> <source-position filename="cogl/cogl/cogl-pixel-format.h" line="64"/> <type name="gint" c:type="gint"/> </constant> <enumeration name="AttributeType" version="1.0" c:type="CoglAttributeType"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="282">Data types for the components of a vertex attribute.</doc> <source-position filename="cogl/cogl/cogl-types.h" line="303"/> <member name="byte" value="5120" c:identifier="COGL_ATTRIBUTE_TYPE_BYTE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="284">Data is the same size of a byte</doc> </member> <member name="unsigned_byte" value="5121" c:identifier="COGL_ATTRIBUTE_TYPE_UNSIGNED_BYTE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="285">Data is the same size of an unsigned byte</doc> </member> <member name="short" value="5122" c:identifier="COGL_ATTRIBUTE_TYPE_SHORT"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="287">Data is the same size of a short integer</doc> </member> <member name="unsigned_short" value="5123" c:identifier="COGL_ATTRIBUTE_TYPE_UNSIGNED_SHORT"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="288">Data is the same size of an unsigned short integer</doc> </member> <member name="float" value="5126" c:identifier="COGL_ATTRIBUTE_TYPE_FLOAT"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="290">Data is the same size of a float</doc> </member> </enumeration> <constant name="BGR_BIT" value="32" c:type="COGL_BGR_BIT"> <source-position filename="cogl/cogl/cogl-pixel-format.h" line="65"/> <type name="gint" c:type="gint"/> </constant> <function-macro name="BUFFER" c:identifier="COGL_BUFFER" introspectable="0"> <source-position filename="cogl/cogl/deprecated/cogl-type-casts.h" line="48"/> <parameters> <parameter name="X"> </parameter> </parameters> </function-macro> <class name="Bitmap" c:symbol-prefix="bitmap" c:type="CoglBitmap" parent="Object" glib:type-name="CoglBitmap" glib:get-type="cogl_bitmap_get_gtype" glib:fundamental="1"> <constructor name="new_for_data" c:identifier="cogl_bitmap_new_for_data" version="1.10" introspectable="0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="150">Creates a bitmap using some existing data. The data is not copied so the application must keep the buffer alive for the lifetime of the #CoglBitmap. This can be used for example with cogl_framebuffer_read_pixels_into_bitmap() to read data directly into an application buffer with the specified rowstride.</doc> <source-position filename="cogl/cogl/cogl-bitmap.h" line="171"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="166">A new #CoglBitmap.</doc> <type name="Bitmap" c:type="CoglBitmap*"/> </return-value> <parameters> <parameter name="context" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="152">A #CoglContext</doc> <type name="Context" c:type="CoglContext*"/> </parameter> <parameter name="width" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="153">The width of the bitmap.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="height" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="154">The height of the bitmap.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="format" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="155">The format of the pixel data.</doc> <type name="PixelFormat" c:type="CoglPixelFormat"/> </parameter> <parameter name="rowstride" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="156">The rowstride of the bitmap (the number of bytes from the start of one row of the bitmap to the next).</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="data" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="158">A pointer to the data. The bitmap will take ownership of this data.</doc> <type name="guint8" c:type="uint8_t*"/> </parameter> </parameters> </constructor> <constructor name="new_from_buffer" c:identifier="cogl_bitmap_new_from_buffer" version="1.8" introspectable="0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="88">Wraps some image data that has been uploaded into a #CoglBuffer as a #CoglBitmap. The data is not copied in this process.</doc> <source-position filename="cogl/cogl/cogl-bitmap.h" line="108"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="102">a #CoglBitmap encapsulating the given @buffer.</doc> <type name="Bitmap" c:type="CoglBitmap*"/> </return-value> <parameters> <parameter name="buffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="90">A #CoglBuffer containing image data</doc> <type c:type="CoglBuffer*"/> </parameter> <parameter name="format" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="91">The #CoglPixelFormat defining the format of the image data in the given @buffer.</doc> <type name="PixelFormat" c:type="CoglPixelFormat"/> </parameter> <parameter name="width" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="93">The width of the image data in the given @buffer.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="height" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="94">The height of the image data in the given @buffer.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="rowstride" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="95">The rowstride in bytes of the image data in the given @buffer.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="offset" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="96">The offset into the given @buffer to the first pixel that should be considered part of the #CoglBitmap.</doc> <type name="gint" c:type="int"/> </parameter> </parameters> </constructor> <constructor name="new_from_file" c:identifier="cogl_bitmap_new_from_file" version="1.0" throws="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="71">Loads an image file from disk. This function can be safely called from within a thread.</doc> <source-position filename="cogl/cogl/cogl-bitmap.h" line="85"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="79">a #CoglBitmap to the new loaded image data, or %NULL if loading the image failed.</doc> <type name="Bitmap" c:type="CoglBitmap*"/> </return-value> <parameters> <parameter name="filename" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="73">the file to load.</doc> <type name="utf8" c:type="const char*"/> </parameter> </parameters> </constructor> <constructor name="new_with_size" c:identifier="cogl_bitmap_new_with_size" version="1.10" introspectable="0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="115">Creates a new #CoglBitmap with the given width, height and format. The initial contents of the bitmap are undefined. The data for the bitmap will be stored in a newly created #CoglPixelBuffer. You can get a pointer to the pixel buffer using cogl_bitmap_get_buffer(). The #CoglBuffer API can then be used to fill the bitmap with data. <note>Cogl will try its best to provide a hardware array you can map, write into and effectively do a zero copy upload when creating a texture from it with cogl_texture_new_from_bitmap(). For various reasons, such arrays are likely to have a stride larger than width * bytes_per_pixel. The user must take the stride into account when writing into it. The stride can be retrieved with cogl_bitmap_get_rowstride().</note></doc> <source-position filename="cogl/cogl/cogl-bitmap.h" line="145"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="138">a #CoglPixelBuffer representing the newly created array or %NULL on failure</doc> <type name="Bitmap" c:type="CoglBitmap*"/> </return-value> <parameters> <parameter name="context" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="117">A #CoglContext</doc> <type name="Context" c:type="CoglContext*"/> </parameter> <parameter name="width" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="118">width of the bitmap in pixels</doc> <type name="guint" c:type="unsigned int"/> </parameter> <parameter name="height" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="119">height of the bitmap in pixels</doc> <type name="guint" c:type="unsigned int"/> </parameter> <parameter name="format" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="120">the format of the pixels the array will store</doc> <type name="PixelFormat" c:type="CoglPixelFormat"/> </parameter> </parameters> </constructor> <function name="error_quark" c:identifier="cogl_bitmap_error_quark"> <source-position filename="cogl/cogl/cogl-bitmap.h" line="302"/> <return-value transfer-ownership="none"> <type name="guint32" c:type="uint32_t"/> </return-value> </function> <function name="get_size_from_file" c:identifier="cogl_bitmap_get_size_from_file" version="1.0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="238">Parses an image file enough to extract the width and height of the bitmap.</doc> <source-position filename="cogl/cogl/cogl-bitmap.h" line="252"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="247">%TRUE if the image was successfully parsed</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="filename" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="240">the file to check</doc> <type name="utf8" c:type="const char*"/> </parameter> <parameter name="width" direction="out" caller-allocates="0" transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="241">return location for the bitmap width, or %NULL</doc> <type name="gint" c:type="int*"/> </parameter> <parameter name="height" direction="out" caller-allocates="0" transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="242">return location for the bitmap height, or %NULL</doc> <type name="gint" c:type="int*"/> </parameter> </parameters> </function> <method name="get_buffer" c:identifier="cogl_bitmap_get_buffer" version="1.10" introspectable="0" stability="Unstable"> <source-position filename="cogl/cogl/cogl-bitmap.h" line="236"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="228">the #CoglPixelBuffer that this buffer uses for storage. Note that if the bitmap was created with cogl_bitmap_new_from_file() then it will not actually be using a pixel buffer and this function will return %NULL.</doc> <type c:type="CoglPixelBuffer*"/> </return-value> <parameters> <instance-parameter name="bitmap" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="226">A #CoglBitmap</doc> <type name="Bitmap" c:type="CoglBitmap*"/> </instance-parameter> </parameters> </method> <method name="get_format" c:identifier="cogl_bitmap_get_format" version="1.10" stability="Unstable"> <source-position filename="cogl/cogl/cogl-bitmap.h" line="187"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="182">the #CoglPixelFormat that the data for the bitmap is in.</doc> <type name="PixelFormat" c:type="CoglPixelFormat"/> </return-value> <parameters> <instance-parameter name="bitmap" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="180">A #CoglBitmap</doc> <type name="Bitmap" c:type="CoglBitmap*"/> </instance-parameter> </parameters> </method> <method name="get_height" c:identifier="cogl_bitmap_get_height" version="1.10" stability="Unstable"> <source-position filename="cogl/cogl/cogl-bitmap.h" line="209"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="204">the height of the bitmap</doc> <type name="gint" c:type="int"/> </return-value> <parameters> <instance-parameter name="bitmap" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="202">A #CoglBitmap</doc> <type name="Bitmap" c:type="CoglBitmap*"/> </instance-parameter> </parameters> </method> <method name="get_rowstride" c:identifier="cogl_bitmap_get_rowstride" version="1.10" stability="Unstable"> <source-position filename="cogl/cogl/cogl-bitmap.h" line="222"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="215">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.</doc> <type name="gint" c:type="int"/> </return-value> <parameters> <instance-parameter name="bitmap" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="213">A #CoglBitmap</doc> <type name="Bitmap" c:type="CoglBitmap*"/> </instance-parameter> </parameters> </method> <method name="get_width" c:identifier="cogl_bitmap_get_width" version="1.10" stability="Unstable"> <source-position filename="cogl/cogl/cogl-bitmap.h" line="198"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="193">the width of the bitmap</doc> <type name="gint" c:type="int"/> </return-value> <parameters> <instance-parameter name="bitmap" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="191">A #CoglBitmap</doc> <type name="Bitmap" c:type="CoglBitmap*"/> </instance-parameter> </parameters> </method> </class> <enumeration name="BitmapError" version="1.4" c:type="CoglBitmapError"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="279">Error codes that can be thrown when performing bitmap operations. Note that gdk_pixbuf_new_from_file() can also throw errors directly from the underlying image loading library. For example, if GdkPixbuf is used then errors #GdkPixbufError<!-- -->s will be used directly.</doc> <source-position filename="cogl/cogl/cogl-bitmap.h" line="299"/> <member name="failed" value="0" c:identifier="COGL_BITMAP_ERROR_FAILED"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="281">Generic failure code, something went wrong.</doc> </member> <member name="unknown_type" value="1" c:identifier="COGL_BITMAP_ERROR_UNKNOWN_TYPE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="283">Unknown image type.</doc> </member> <member name="corrupt_image" value="2" c:identifier="COGL_BITMAP_ERROR_CORRUPT_IMAGE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="284">An image file was broken somehow.</doc> </member> </enumeration> <enumeration name="BlendStringError" version="1.0" c:type="CoglBlendStringError"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="220">Error enumeration for the blend strings parser</doc> <source-position filename="cogl/cogl/cogl-types.h" line="238"/> <member name="parse_error" value="0" c:identifier="COGL_BLEND_STRING_ERROR_PARSE_ERROR"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="222">Generic parse error</doc> </member> <member name="argument_parse_error" value="1" c:identifier="COGL_BLEND_STRING_ERROR_ARGUMENT_PARSE_ERROR"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="223">Argument parse error</doc> </member> <member name="invalid_error" value="2" c:identifier="COGL_BLEND_STRING_ERROR_INVALID_ERROR"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="224">Internal parser error</doc> </member> <member name="gpu_unsupported_error" value="3" c:identifier="COGL_BLEND_STRING_ERROR_GPU_UNSUPPORTED_ERROR"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="225">Blend string not supported by the GPU</doc> </member> </enumeration> <bitfield name="BufferBit" version="1.0" c:type="CoglBufferBit"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="482">Types of auxiliary buffers</doc> <source-position filename="cogl/cogl/cogl-types.h" line="497"/> <member name="color" value="1" c:identifier="COGL_BUFFER_BIT_COLOR"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="484">Selects the primary color buffer</doc> </member> <member name="depth" value="2" c:identifier="COGL_BUFFER_BIT_DEPTH"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="485">Selects the depth buffer</doc> </member> <member name="stencil" value="4" c:identifier="COGL_BUFFER_BIT_STENCIL"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="486">Selects the stencil buffer</doc> </member> </bitfield> <bitfield name="BufferTarget" version="0.8" c:type="CoglBufferTarget"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="121">Target flags for FBOs.</doc> <source-position filename="cogl/cogl/cogl-types.h" line="134"/> <member name="window_buffer" value="2" c:identifier="COGL_WINDOW_BUFFER"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="123">FIXME</doc> </member> <member name="offscreen_buffer" value="4" c:identifier="COGL_OFFSCREEN_BUFFER"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="124">FIXME</doc> </member> </bitfield> <function-macro name="CONTEXT" c:identifier="COGL_CONTEXT" introspectable="0"> <source-position filename="cogl/cogl/cogl-context.h" line="96"/> <parameters> <parameter name="OBJECT"> </parameter> </parameters> </function-macro> <record name="Color" c:type="CoglColor" version="1.0" glib:type-name="CoglColor" glib:get-type="cogl_color_get_gtype" c:symbol-prefix="color"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="136">A structure for holding a color definition. The contents of the CoglColor structure are private and should never by accessed directly.</doc> <source-position filename="cogl/cogl/cogl-types.h" line="163"/> <field name="private_member_red" readable="0" private="1"> <type name="guint8" c:type="uint8_t"/> </field> <field name="private_member_green" readable="0" private="1"> <type name="guint8" c:type="uint8_t"/> </field> <field name="private_member_blue" readable="0" private="1"> <type name="guint8" c:type="uint8_t"/> </field> <field name="private_member_alpha" readable="0" private="1"> <type name="guint8" c:type="uint8_t"/> </field> <field name="private_member_padding0" readable="0" private="1"> <type name="guint32" c:type="uint32_t"/> </field> <field name="private_member_padding1" readable="0" private="1"> <type name="guint32" c:type="uint32_t"/> </field> <field name="private_member_padding2" readable="0" private="1"> <type name="guint32" c:type="uint32_t"/> </field> <constructor name="new" c:identifier="cogl_color_new" version="1.0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="63">Creates a new (empty) color</doc> <source-position filename="cogl/cogl/cogl-color.h" line="74"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="68">a newly-allocated #CoglColor. Use cogl_color_free() to free the allocated resources</doc> <type name="Color" c:type="CoglColor*"/> </return-value> </constructor> <method name="copy" c:identifier="cogl_color_copy" version="1.0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="76">Creates a copy of @color</doc> <source-position filename="cogl/cogl/cogl-color.h" line="88"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="82">a newly-allocated #CoglColor. Use cogl_color_free() to free the allocate resources</doc> <type name="Color" c:type="CoglColor*"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="78">the color to copy</doc> <type name="Color" c:type="const CoglColor*"/> </instance-parameter> </parameters> </method> <method name="free" c:identifier="cogl_color_free" version="1.0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="90">Frees the resources allocated by cogl_color_new() and cogl_color_copy()</doc> <source-position filename="cogl/cogl/cogl-color.h" line="99"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="92">the color to free</doc> <type name="Color" c:type="CoglColor*"/> </instance-parameter> </parameters> </method> <method name="get_alpha" c:identifier="cogl_color_get_alpha" version="1.0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="306">Retrieves the alpha channel of @color as a fixed point value between 0 and 1.0.</doc> <source-position filename="cogl/cogl/cogl-color.h" line="318"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="313">the alpha channel of the passed color</doc> <type name="gfloat" c:type="float"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="308">a #CoglColor</doc> <type name="Color" c:type="const CoglColor*"/> </instance-parameter> </parameters> </method> <method name="get_alpha_byte" c:identifier="cogl_color_get_alpha_byte" version="1.0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="194">Retrieves the alpha channel of @color as a byte value between 0 and 255</doc> <source-position filename="cogl/cogl/cogl-color.h" line="206"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="201">the alpha channel of the passed color</doc> <type name="guint8" c:type="unsigned char"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="196">a #CoglColor</doc> <type name="Color" c:type="const CoglColor*"/> </instance-parameter> </parameters> </method> <method name="get_alpha_float" c:identifier="cogl_color_get_alpha_float" version="1.0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="250">Retrieves the alpha channel of @color as a floating point value between 0.0 and 1.0</doc> <source-position filename="cogl/cogl/cogl-color.h" line="262"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="257">the alpha channel of the passed color</doc> <type name="gfloat" c:type="float"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="252">a #CoglColor</doc> <type name="Color" c:type="const CoglColor*"/> </instance-parameter> </parameters> </method> <method name="get_blue" c:identifier="cogl_color_get_blue" version="1.0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="292">Retrieves the blue channel of @color as a fixed point value between 0 and 1.0.</doc> <source-position filename="cogl/cogl/cogl-color.h" line="304"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="299">the blue channel of the passed color</doc> <type name="gfloat" c:type="float"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="294">a #CoglColor</doc> <type name="Color" c:type="const CoglColor*"/> </instance-parameter> </parameters> </method> <method name="get_blue_byte" c:identifier="cogl_color_get_blue_byte" version="1.0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="180">Retrieves the blue channel of @color as a byte value between 0 and 255</doc> <source-position filename="cogl/cogl/cogl-color.h" line="192"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="187">the blue channel of the passed color</doc> <type name="guint8" c:type="unsigned char"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="182">a #CoglColor</doc> <type name="Color" c:type="const CoglColor*"/> </instance-parameter> </parameters> </method> <method name="get_blue_float" c:identifier="cogl_color_get_blue_float" version="1.0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="236">Retrieves the blue channel of @color as a floating point value between 0.0 and 1.0</doc> <source-position filename="cogl/cogl/cogl-color.h" line="248"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="243">the blue channel of the passed color</doc> <type name="gfloat" c:type="float"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="238">a #CoglColor</doc> <type name="Color" c:type="const CoglColor*"/> </instance-parameter> </parameters> </method> <method name="get_green" c:identifier="cogl_color_get_green" version="1.0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="278">Retrieves the green channel of @color as a fixed point value between 0 and 1.0.</doc> <source-position filename="cogl/cogl/cogl-color.h" line="290"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="285">the green channel of the passed color</doc> <type name="gfloat" c:type="float"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="280">a #CoglColor</doc> <type name="Color" c:type="const CoglColor*"/> </instance-parameter> </parameters> </method> <method name="get_green_byte" c:identifier="cogl_color_get_green_byte" version="1.0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="166">Retrieves the green channel of @color as a byte value between 0 and 255</doc> <source-position filename="cogl/cogl/cogl-color.h" line="178"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="173">the green channel of the passed color</doc> <type name="guint8" c:type="unsigned char"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="168">a #CoglColor</doc> <type name="Color" c:type="const CoglColor*"/> </instance-parameter> </parameters> </method> <method name="get_green_float" c:identifier="cogl_color_get_green_float" version="1.0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="222">Retrieves the green channel of @color as a floating point value between 0.0 and 1.0</doc> <source-position filename="cogl/cogl/cogl-color.h" line="234"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="229">the green channel of the passed color</doc> <type name="gfloat" c:type="float"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="224">a #CoglColor</doc> <type name="Color" c:type="const CoglColor*"/> </instance-parameter> </parameters> </method> <method name="get_red" c:identifier="cogl_color_get_red" version="1.0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="264">Retrieves the red channel of @color as a fixed point value between 0 and 1.0.</doc> <source-position filename="cogl/cogl/cogl-color.h" line="276"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="271">the red channel of the passed color</doc> <type name="gfloat" c:type="float"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="266">a #CoglColor</doc> <type name="Color" c:type="const CoglColor*"/> </instance-parameter> </parameters> </method> <method name="get_red_byte" c:identifier="cogl_color_get_red_byte" version="1.0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="152">Retrieves the red channel of @color as a byte value between 0 and 255</doc> <source-position filename="cogl/cogl/cogl-color.h" line="164"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="159">the red channel of the passed color</doc> <type name="guint8" c:type="unsigned char"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="154">a #CoglColor</doc> <type name="Color" c:type="const CoglColor*"/> </instance-parameter> </parameters> </method> <method name="get_red_float" c:identifier="cogl_color_get_red_float" version="1.0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="208">Retrieves the red channel of @color as a floating point value between 0.0 and 1.0</doc> <source-position filename="cogl/cogl/cogl-color.h" line="220"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="215">the red channel of the passed color</doc> <type name="gfloat" c:type="float"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="210">a #CoglColor</doc> <type name="Color" c:type="const CoglColor*"/> </instance-parameter> </parameters> </method> <method name="init_from_4f" c:identifier="cogl_color_init_from_4f" version="1.4"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="120">Sets the values of the passed channels into a #CoglColor</doc> <source-position filename="cogl/cogl/cogl-color.h" line="133"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="122">A pointer to a #CoglColor to initialize</doc> <type name="Color" c:type="CoglColor*"/> </instance-parameter> <parameter name="red" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="123">value of the red channel, between 0 and 1.0</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="green" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="124">value of the green channel, between 0 and 1.0</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="blue" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="125">value of the blue channel, between 0 and 1.0</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="alpha" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="126">value of the alpha channel, between 0 and 1.0</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="init_from_4fv" c:identifier="cogl_color_init_from_4fv" version="1.4"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="139">Sets the values of the passed channels into a #CoglColor</doc> <source-position filename="cogl/cogl/cogl-color.h" line="149"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="141">A pointer to a #CoglColor to initialize</doc> <type name="Color" c:type="CoglColor*"/> </instance-parameter> <parameter name="color_array" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="142">a pointer to an array of 4 float color components</doc> <type name="gfloat" c:type="const float*"/> </parameter> </parameters> </method> <method name="init_from_4ub" c:identifier="cogl_color_init_from_4ub" version="1.4"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="101">Sets the values of the passed channels into a #CoglColor.</doc> <source-position filename="cogl/cogl/cogl-color.h" line="114"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="103">A pointer to a #CoglColor to initialize</doc> <type name="Color" c:type="CoglColor*"/> </instance-parameter> <parameter name="red" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="104">value of the red channel, between 0 and 255</doc> <type name="guint8" c:type="uint8_t"/> </parameter> <parameter name="green" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="105">value of the green channel, between 0 and 255</doc> <type name="guint8" c:type="uint8_t"/> </parameter> <parameter name="blue" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="106">value of the blue channel, between 0 and 255</doc> <type name="guint8" c:type="uint8_t"/> </parameter> <parameter name="alpha" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="107">value of the alpha channel, between 0 and 255</doc> <type name="guint8" c:type="uint8_t"/> </parameter> </parameters> </method> <method name="premultiply" c:identifier="cogl_color_premultiply" version="1.0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="476">Converts a non-premultiplied color to a pre-multiplied color. For example, semi-transparent red is (1.0, 0, 0, 0.5) when non-premultiplied and (0.5, 0, 0, 0.5) when premultiplied.</doc> <source-position filename="cogl/cogl/cogl-color.h" line="487"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="478">the color to premultiply</doc> <type name="Color" c:type="CoglColor*"/> </instance-parameter> </parameters> </method> <method name="set_alpha" c:identifier="cogl_color_set_alpha" version="1.4"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="463">Sets the alpha channel of @color to @alpha.</doc> <source-position filename="cogl/cogl/cogl-color.h" line="473"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="465">a #CoglColor</doc> <type name="Color" c:type="CoglColor*"/> </instance-parameter> <parameter name="alpha" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="466">a float value between 0.0f and 1.0f</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="set_alpha_byte" c:identifier="cogl_color_set_alpha_byte" version="1.4"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="359">Sets the alpha channel of @color to @alpha.</doc> <source-position filename="cogl/cogl/cogl-color.h" line="369"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="361">a #CoglColor</doc> <type name="Color" c:type="CoglColor*"/> </instance-parameter> <parameter name="alpha" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="362">a byte value between 0 and 255</doc> <type name="guint8" c:type="unsigned char"/> </parameter> </parameters> </method> <method name="set_alpha_float" c:identifier="cogl_color_set_alpha_float" version="1.4"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="411">Sets the alpha channel of @color to @alpha.</doc> <source-position filename="cogl/cogl/cogl-color.h" line="421"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="413">a #CoglColor</doc> <type name="Color" c:type="CoglColor*"/> </instance-parameter> <parameter name="alpha" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="414">a float value between 0.0f and 1.0f</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="set_blue" c:identifier="cogl_color_set_blue" version="1.4"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="450">Sets the blue channel of @color to @blue.</doc> <source-position filename="cogl/cogl/cogl-color.h" line="460"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="452">a #CoglColor</doc> <type name="Color" c:type="CoglColor*"/> </instance-parameter> <parameter name="blue" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="453">a float value between 0.0f and 1.0f</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="set_blue_byte" c:identifier="cogl_color_set_blue_byte" version="1.4"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="346">Sets the blue channel of @color to @blue.</doc> <source-position filename="cogl/cogl/cogl-color.h" line="356"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="348">a #CoglColor</doc> <type name="Color" c:type="CoglColor*"/> </instance-parameter> <parameter name="blue" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="349">a byte value between 0 and 255</doc> <type name="guint8" c:type="unsigned char"/> </parameter> </parameters> </method> <method name="set_blue_float" c:identifier="cogl_color_set_blue_float" version="1.4"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="398">Sets the blue channel of @color to @blue.</doc> <source-position filename="cogl/cogl/cogl-color.h" line="408"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="400">a #CoglColor</doc> <type name="Color" c:type="CoglColor*"/> </instance-parameter> <parameter name="blue" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="401">a float value between 0.0f and 1.0f</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="set_green" c:identifier="cogl_color_set_green" version="1.4"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="437">Sets the green channel of @color to @green.</doc> <source-position filename="cogl/cogl/cogl-color.h" line="447"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="439">a #CoglColor</doc> <type name="Color" c:type="CoglColor*"/> </instance-parameter> <parameter name="green" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="440">a float value between 0.0f and 1.0f</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="set_green_byte" c:identifier="cogl_color_set_green_byte" version="1.4"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="333">Sets the green channel of @color to @green.</doc> <source-position filename="cogl/cogl/cogl-color.h" line="343"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="335">a #CoglColor</doc> <type name="Color" c:type="CoglColor*"/> </instance-parameter> <parameter name="green" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="336">a byte value between 0 and 255</doc> <type name="guint8" c:type="unsigned char"/> </parameter> </parameters> </method> <method name="set_green_float" c:identifier="cogl_color_set_green_float" version="1.4"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="385">Sets the green channel of @color to @green.</doc> <source-position filename="cogl/cogl/cogl-color.h" line="395"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="387">a #CoglColor</doc> <type name="Color" c:type="CoglColor*"/> </instance-parameter> <parameter name="green" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="388">a float value between 0.0f and 1.0f</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="set_red" c:identifier="cogl_color_set_red" version="1.4"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="424">Sets the red channel of @color to @red.</doc> <source-position filename="cogl/cogl/cogl-color.h" line="434"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="426">a #CoglColor</doc> <type name="Color" c:type="CoglColor*"/> </instance-parameter> <parameter name="red" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="427">a float value between 0.0f and 1.0f</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="set_red_byte" c:identifier="cogl_color_set_red_byte" version="1.4"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="320">Sets the red channel of @color to @red.</doc> <source-position filename="cogl/cogl/cogl-color.h" line="330"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="322">a #CoglColor</doc> <type name="Color" c:type="CoglColor*"/> </instance-parameter> <parameter name="red" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="323">a byte value between 0 and 255</doc> <type name="guint8" c:type="unsigned char"/> </parameter> </parameters> </method> <method name="set_red_float" c:identifier="cogl_color_set_red_float" version="1.4"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="372">Sets the red channel of @color to @red.</doc> <source-position filename="cogl/cogl/cogl-color.h" line="382"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="374">a #CoglColor</doc> <type name="Color" c:type="CoglColor*"/> </instance-parameter> <parameter name="red" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="375">a float value between 0.0f and 1.0f</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="to_hsl" c:identifier="cogl_color_to_hsl" version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="519">Converts @color to the HLS format. The @hue value is in the 0 .. 360 range. The @luminance and @saturation values are in the 0 .. 1 range.</doc> <source-position filename="cogl/cogl/cogl-color.h" line="534"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="521">a #CoglColor</doc> <type name="Color" c:type="const CoglColor*"/> </instance-parameter> <parameter name="hue" direction="out" caller-allocates="0" transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="522">return location for the hue value or %NULL</doc> <type name="gfloat" c:type="float*"/> </parameter> <parameter name="saturation" direction="out" caller-allocates="0" transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="523">return location for the saturation value or %NULL</doc> <type name="gfloat" c:type="float*"/> </parameter> <parameter name="luminance" direction="out" caller-allocates="0" transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="524">return location for the luminance value or %NULL</doc> <type name="gfloat" c:type="float*"/> </parameter> </parameters> </method> <method name="unpremultiply" c:identifier="cogl_color_unpremultiply" version="1.4"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="489">Converts a pre-multiplied color to a non-premultiplied color. For example, semi-transparent red is (0.5, 0, 0, 0.5) when premultiplied and (1.0, 0, 0, 0.5) when non-premultiplied.</doc> <source-position filename="cogl/cogl/cogl-color.h" line="500"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="491">the color to unpremultiply</doc> <type name="Color" c:type="CoglColor*"/> </instance-parameter> </parameters> </method> <function name="equal" c:identifier="cogl_color_equal" version="1.0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="502">Compares two #CoglColor<!-- -->s and checks if they are the same. This function can be passed to g_hash_table_new() as the @key_equal_func parameter, when using #CoglColor<!-- -->s as keys in a #GHashTable.</doc> <source-position filename="cogl/cogl/cogl-color.h" line="517"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="512">%TRUE if the two colors are the same.</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="v1" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="504">a #CoglColor</doc> <type name="gpointer" c:type="void*"/> </parameter> <parameter name="v2" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="505">a #CoglColor</doc> <type name="gpointer" c:type="void*"/> </parameter> </parameters> </function> <function name="init_from_hsl" c:identifier="cogl_color_init_from_hsl" version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="539">Converts a color expressed in HLS (hue, luminance and saturation) values into a #CoglColor.</doc> <source-position filename="cogl/cogl/cogl-color.h" line="552"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="color" direction="out" caller-allocates="1" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="541">return location for a #CoglColor</doc> <type name="Color" c:type="CoglColor*"/> </parameter> <parameter name="hue" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="542">hue value, in the 0 .. 360 range</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="saturation" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="543">saturation value, in the 0 .. 1 range</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="luminance" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="544">luminance value, in the 0 .. 1 range</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </function> </record> <class name="Context" c:symbol-prefix="context" c:type="CoglContext" parent="Object" glib:type-name="CoglContext" glib:get-type="cogl_context_get_gtype" glib:fundamental="1"> <constructor name="new" c:identifier="cogl_context_new" version="1.8" introspectable="0" stability="Unstable" throws="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="106">Creates a new #CoglContext which acts as an application sandbox for any state objects that are allocated.</doc> <source-position filename="cogl/cogl/cogl-context.h" line="119"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="114">A newly allocated #CoglContext</doc> <type name="Context" c:type="CoglContext*"/> </return-value> <parameters> <parameter name="display" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="108">A #CoglDisplay pointer</doc> <type c:type="CoglDisplay*"/> </parameter> </parameters> </constructor> <method name="get_display" c:identifier="cogl_context_get_display" version="1.8" introspectable="0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="122">Retrieves the #CoglDisplay that is internally associated with the given @context. This will return the same #CoglDisplay that was passed to cogl_context_new() or if %NULL was passed to cogl_context_new() then this function returns a pointer to the display that was automatically setup internally.</doc> <source-position filename="cogl/cogl/cogl-context.h" line="138"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="132">The #CoglDisplay associated with the given @context.</doc> <type c:type="CoglDisplay*"/> </return-value> <parameters> <instance-parameter name="context" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="124">A #CoglContext pointer</doc> <type name="Context" c:type="CoglContext*"/> </instance-parameter> </parameters> </method> <method name="get_named_pipeline" c:identifier="cogl_context_get_named_pipeline"> <source-position filename="cogl/cogl/cogl-context.h" line="370"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="365">The #CoglPipeline associated with the given @context and @key, or %NULL if no such #CoglPipeline was found.</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </return-value> <parameters> <instance-parameter name="context" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="362">a #CoglContext pointer</doc> <type name="Context" c:type="CoglContext*"/> </instance-parameter> <parameter name="key" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="363">a #CoglPipelineKey pointer</doc> <type name="PipelineKey" c:type="CoglPipelineKey*"/> </parameter> </parameters> </method> <method name="get_renderer" c:identifier="cogl_context_get_renderer" version="1.16" introspectable="0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="140">Retrieves the #CoglRenderer that is internally associated with the given @context. This will return the same #CoglRenderer that was passed to cogl_display_new() or if %NULL was passed to cogl_display_new() or cogl_context_new() then this function returns a pointer to the renderer that was automatically connected internally.</doc> <source-position filename="cogl/cogl/cogl-context.h" line="157"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="151">The #CoglRenderer associated with the given @context.</doc> <type c:type="CoglRenderer*"/> </return-value> <parameters> <instance-parameter name="context" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="142">A #CoglContext pointer</doc> <type name="Context" c:type="CoglContext*"/> </instance-parameter> </parameters> </method> <method name="is_hardware_accelerated" c:identifier="cogl_context_is_hardware_accelerated"> <source-position filename="cogl/cogl/cogl-context.h" line="339"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="335">%TRUE if the @context is hardware accelerated, or %FALSE if not.</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="context" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="333">a #CoglContext pointer</doc> <type name="Context" c:type="CoglContext*"/> </instance-parameter> </parameters> </method> <method name="set_named_pipeline" c:identifier="cogl_context_set_named_pipeline"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="343">Associate a #CoglPipeline with a @context and @key. This will not take a new reference to the @pipeline, but will unref all associated pipelines when the @context gets destroyed. Similarly, if a pipeline gets overwritten, it will get unreffed as well.</doc> <source-position filename="cogl/cogl/cogl-context.h" line="356"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="context" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="345">a #CoglContext pointer</doc> <type name="Context" c:type="CoglContext*"/> </instance-parameter> <parameter name="key" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="346">a #CoglPipelineKey pointer</doc> <type name="PipelineKey" c:type="CoglPipelineKey*"/> </parameter> <parameter name="pipeline" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="347">a #CoglPipeline to associate with the @context and @key</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </parameter> </parameters> </method> </class> <constant name="DEPTH_BIT" value="256" c:type="COGL_DEPTH_BIT"> <source-position filename="cogl/cogl/cogl-pixel-format.h" line="68"/> <type name="gint" c:type="gint"/> </constant> <callback name="DebugObjectForeachTypeCallback" c:type="CoglDebugObjectForeachTypeCallback" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="161">A callback function to use for cogl_debug_object_foreach_type().</doc> <source-position filename="cogl/cogl/cogl-object.h" line="171"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="info" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="163">A pointer to a struct containing information about the type.</doc> <type name="DebugObjectTypeInfo" c:type="const CoglDebugObjectTypeInfo*"/> </parameter> <parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="1"> <type name="gpointer" c:type="void*"/> </parameter> </parameters> </callback> <record name="DebugObjectTypeInfo" c:type="CoglDebugObjectTypeInfo" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="144">This struct is used to pass information to the callback when cogl_debug_object_foreach_type() is called.</doc> <source-position filename="cogl/cogl/cogl-object.h" line="159"/> <field name="name" writable="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="146">A human readable name for the type.</doc> <type name="utf8" c:type="const char*"/> </field> <field name="instance_count" writable="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="147">The number of objects of this type that are currently in use</doc> <type name="gulong" c:type="unsigned long"/> </field> </record> <enumeration name="DepthTestFunction" c:type="CoglDepthTestFunction"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="365">When using depth testing one of these functions is used to compare the depth of an incoming fragment against the depth value currently stored in the depth buffer. The function is changed using cogl_depth_state_set_test_function(). The test is only done when depth testing is explicitly enabled. (See cogl_depth_state_set_test_enabled())</doc> <source-position filename="cogl/cogl/cogl-types.h" line="400"/> <member name="never" value="512" c:identifier="COGL_DEPTH_TEST_FUNCTION_NEVER"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="367">Never passes.</doc> </member> <member name="less" value="513" c:identifier="COGL_DEPTH_TEST_FUNCTION_LESS"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="368">Passes if the fragment's depth value is less than the value currently in the depth buffer.</doc> </member> <member name="equal" value="514" c:identifier="COGL_DEPTH_TEST_FUNCTION_EQUAL"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="370">Passes if the fragment's depth value is equal to the value currently in the depth buffer.</doc> </member> <member name="lequal" value="515" c:identifier="COGL_DEPTH_TEST_FUNCTION_LEQUAL"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="372">Passes if the fragment's depth value is less or equal to the value currently in the depth buffer.</doc> </member> <member name="greater" value="516" c:identifier="COGL_DEPTH_TEST_FUNCTION_GREATER"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="374">Passes if the fragment's depth value is greater than the value currently in the depth buffer.</doc> </member> <member name="notequal" value="517" c:identifier="COGL_DEPTH_TEST_FUNCTION_NOTEQUAL"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="376">Passes if the fragment's depth value is not equal to the value currently in the depth buffer.</doc> </member> <member name="gequal" value="518" c:identifier="COGL_DEPTH_TEST_FUNCTION_GEQUAL"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="378">Passes if the fragment's depth value greater than or equal to the value currently in the depth buffer.</doc> </member> <member name="always" value="519" c:identifier="COGL_DEPTH_TEST_FUNCTION_ALWAYS"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="380">Always passes.</doc> </member> </enumeration> <record name="DmaBufHandle" c:type="CoglDmaBufHandle" disguised="1" introspectable="0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="104">An opaque type that tracks the lifetime of a DMA buffer fd. Release with cogl_dma_buf_handle_free().</doc> <source-position filename="cogl/cogl/cogl-types.h" line="110"/> </record> <bitfield name="EglImageFlags" c:type="CoglEglImageFlags"> <source-position filename="cogl/cogl/cogl-texture-2d.h" line="67"/> <member name="none" value="0" c:identifier="COGL_EGL_IMAGE_FLAG_NONE"> </member> <member name="no_get_data" value="1" c:identifier="COGL_EGL_IMAGE_FLAG_NO_GET_DATA"> </member> </bitfield> <function-macro name="FRAME_INFO" c:identifier="COGL_FRAME_INFO" introspectable="0"> <source-position filename="cogl/cogl/cogl-frame-info.h" line="54"/> <parameters> <parameter name="X"> </parameter> </parameters> </function-macro> <callback name="FeatureCallback" c:type="CoglFeatureCallback" version="0.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="258">A callback used with cogl_foreach_feature() for enumerating all context level features supported by Cogl.</doc> <source-position filename="cogl/cogl/cogl-context.h" line="269"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="feature" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="260">A single feature currently supported by Cogl</doc> <type name="FeatureID" c:type="CoglFeatureID"/> </parameter> <parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="261">A private pointer passed to cogl_foreach_feature().</doc> <type name="gpointer" c:type="void*"/> </parameter> </parameters> </callback> <enumeration name="FeatureID" version="1.10" c:type="CoglFeatureID"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="177">All the capabilities that can vary between different GPUs supported by Cogl. Applications that depend on any of these features should explicitly check for them using cogl_has_feature() or cogl_has_features().</doc> <source-position filename="cogl/cogl/cogl-context.h" line="214"/> <member name="ogl_feature_id_unsigned_int_indices" value="0" c:identifier="COGL_FEATURE_ID_UNSIGNED_INT_INDICES"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="182">Set if %COGL_INDICES_TYPE_UNSIGNED_INT is supported in cogl_indices_new().</doc> </member> <member name="ogl_feature_id_map_buffer_for_read" value="1" c:identifier="COGL_FEATURE_ID_MAP_BUFFER_FOR_READ"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="185">Whether cogl_buffer_map() is supported with CoglBufferAccess including read support.</doc> </member> <member name="ogl_feature_id_map_buffer_for_write" value="2" c:identifier="COGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="187">Whether cogl_buffer_map() is supported with CoglBufferAccess including write support.</doc> </member> <member name="ogl_feature_id_fence" value="3" c:identifier="COGL_FEATURE_ID_FENCE"> </member> <member name="ogl_feature_id_texture_rg" value="4" c:identifier="COGL_FEATURE_ID_TEXTURE_RG"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="179">Support for %COGL_TEXTURE_COMPONENTS_RG as the internal components of a texture.</doc> </member> <member name="ogl_feature_id_buffer_age" value="5" c:identifier="COGL_FEATURE_ID_BUFFER_AGE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="189">Available if the age of #CoglOnscreen back buffers are tracked and so cogl_onscreen_get_buffer_age() can be expected to return age values other than 0.</doc> </member> <member name="ogl_feature_id_texture_egl_image_external" value="6" c:identifier="COGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL"> </member> <member name="ogl_feature_id_blit_framebuffer" value="7" c:identifier="COGL_FEATURE_ID_BLIT_FRAMEBUFFER"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="192">Whether blitting using cogl_blit_framebuffer() is supported.</doc> </member> </enumeration> <enumeration name="FilterReturn" stability="Unstable" c:type="CoglFilterReturn"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="409">Return values for the #CoglXlibFilterFunc and #CoglWin32FilterFunc functions.</doc> <source-position filename="cogl/cogl/cogl-types.h" line="422"/> <member name="continue" value="0" c:identifier="COGL_FILTER_CONTINUE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="411">The event was not handled, continues the processing</doc> </member> <member name="remove" value="1" c:identifier="COGL_FILTER_REMOVE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="413">Remove the event, stops the processing</doc> </member> </enumeration> <callback name="FrameCallback" c:type="CoglFrameCallback" version="1.14" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="366">Is a callback that can be registered via cogl_onscreen_add_frame_callback() to be called when a frame progresses in some notable way. Please see the documentation for #CoglFrameEvent and cogl_onscreen_add_frame_callback() for more details about what events can be notified.</doc> <source-position filename="cogl/cogl/cogl-onscreen.h" line="386"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="onscreen" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="368">The onscreen that the frame is associated with</doc> <type name="Onscreen" c:type="CoglOnscreen*"/> </parameter> <parameter name="event" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="369">A #CoglFrameEvent notifying how the frame has progressed</doc> <type name="FrameEvent" c:type="CoglFrameEvent"/> </parameter> <parameter name="info" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="370">The meta information, such as timing information, about the frame that has progressed.</doc> <type name="FrameInfo" c:type="CoglFrameInfo*"/> </parameter> <parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="3"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="372">The user pointer passed to cogl_onscreen_add_frame_callback()</doc> <type name="gpointer" c:type="void*"/> </parameter> </parameters> </callback> <record name="FrameClosure" c:type="CoglFrameClosure" version="1.14" stability="Unstable" glib:type-name="CoglFrameClosure" glib:get-type="cogl_frame_closure_get_gtype" c:symbol-prefix="frame_closure"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="391">An opaque type that tracks a #CoglFrameCallback and associated user data. A #CoglFrameClosure pointer will be returned from cogl_onscreen_add_frame_callback() and it allows you to remove a callback later using cogl_onscreen_remove_frame_callback().</doc> <source-position filename="cogl/cogl/cogl-onscreen.h" line="402"/> </record> <enumeration name="FrameEvent" version="1.14" stability="Unstable" c:type="CoglFrameEvent"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="329">Identifiers that are passed to #CoglFrameCallback functions (registered using cogl_onscreen_add_frame_callback()) that mark the progression of a frame in some way which usually means that new information will have been accumulated in the frame's corresponding #CoglFrameInfo object. The last event that will be sent for a frame will be a @COGL_FRAME_EVENT_COMPLETE event and so these are a good opportunity to collect statistics about a frame since the #CoglFrameInfo should hold the most data at this point. <note>A frame may not be completed before the next frame can start so applications should avoid needing to collect all statistics for a particular frame before they can start a new frame.</note></doc> <source-position filename="cogl/cogl/cogl-onscreen.h" line="364"/> <member name="sync" value="1" c:identifier="COGL_FRAME_EVENT_SYNC"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="331">Notifies that the system compositor has acknowledged a frame and is ready for a new frame to be created.</doc> </member> <member name="complete" value="2" c:identifier="COGL_FRAME_EVENT_COMPLETE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="334">Notifies that a frame has ended. This is a good time for applications to collect statistics about the frame since the #CoglFrameInfo should hold the most data at this point. No other events should be expected after a @COGL_FRAME_EVENT_COMPLETE event.</doc> </member> </enumeration> <class name="FrameInfo" c:symbol-prefix="frame_info" c:type="CoglFrameInfo" parent="Object" glib:type-name="CoglFrameInfo" glib:get-type="cogl_frame_info_get_gtype" glib:fundamental="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-frame-info.h" line="48">Frame information.</doc> <method name="get_frame_counter" c:identifier="cogl_frame_info_get_frame_counter" version="1.14" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-frame-info.h" line="78">Gets the frame counter for the #CoglOnscreen that corresponds to this frame.</doc> <source-position filename="cogl/cogl/cogl-frame-info.h" line="90"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-frame-info.h" line="85">The frame counter value</doc> <type name="gint64" c:type="int64_t"/> </return-value> <parameters> <instance-parameter name="info" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-frame-info.h" line="80">a #CoglFrameInfo object</doc> <type name="FrameInfo" c:type="CoglFrameInfo*"/> </instance-parameter> </parameters> </method> <method name="get_global_frame_counter" c:identifier="cogl_frame_info_get_global_frame_counter" introspectable="0"> <source-position filename="cogl/cogl/cogl-frame-info.h" line="136"/> <return-value transfer-ownership="none"> <type name="gint64" c:type="int64_t"/> </return-value> <parameters> <instance-parameter name="info" transfer-ownership="none"> <type name="FrameInfo" c:type="CoglFrameInfo*"/> </instance-parameter> </parameters> </method> <method name="get_is_symbolic" c:identifier="cogl_frame_info_get_is_symbolic"> <source-position filename="cogl/cogl/cogl-frame-info.h" line="139"/> <return-value transfer-ownership="none"> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="info" transfer-ownership="none"> <type name="FrameInfo" c:type="CoglFrameInfo*"/> </instance-parameter> </parameters> </method> <method name="get_presentation_time_us" c:identifier="cogl_frame_info_get_presentation_time_us" version="1.14" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-frame-info.h" line="92">Gets the presentation time for the frame. This is the time at which the frame became visible to the user. The presentation time measured in microseconds, is based on CLOCK_MONOTONIC. <note>Some buggy Mesa drivers up to 9.0.1 may incorrectly report non-monotonic timestamps.</note></doc> <source-position filename="cogl/cogl/cogl-frame-info.h" line="110"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-frame-info.h" line="105">the presentation time for the frame</doc> <type name="gint64" c:type="int64_t"/> </return-value> <parameters> <instance-parameter name="info" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-frame-info.h" line="94">a #CoglFrameInfo object</doc> <type name="FrameInfo" c:type="CoglFrameInfo*"/> </instance-parameter> </parameters> </method> <method name="get_refresh_rate" c:identifier="cogl_frame_info_get_refresh_rate" version="1.14" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-frame-info.h" line="112">Gets the refresh rate in Hertz for the output that the frame was on at the time the frame was presented. <note>Some platforms can't associate a #CoglOutput with a #CoglFrameInfo object but are able to report a refresh rate via this api. Therefore if you need this information then this api is more reliable than using cogl_frame_info_get_output() followed by cogl_output_get_refresh_rate().</note></doc> <source-position filename="cogl/cogl/cogl-frame-info.h" line="130"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-frame-info.h" line="125">the refresh rate in Hertz</doc> <type name="gfloat" c:type="float"/> </return-value> <parameters> <instance-parameter name="info" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-frame-info.h" line="114">a #CoglFrameInfo object</doc> <type name="FrameInfo" c:type="CoglFrameInfo*"/> </instance-parameter> </parameters> </method> <method name="get_sequence" c:identifier="cogl_frame_info_get_sequence"> <source-position filename="cogl/cogl/cogl-frame-info.h" line="151"/> <return-value transfer-ownership="none"> <type name="guint" c:type="unsigned int"/> </return-value> <parameters> <instance-parameter name="info" transfer-ownership="none"> <type name="FrameInfo" c:type="CoglFrameInfo*"/> </instance-parameter> </parameters> </method> <method name="is_hw_clock" c:identifier="cogl_frame_info_is_hw_clock"> <source-position filename="cogl/cogl/cogl-frame-info.h" line="142"/> <return-value transfer-ownership="none"> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="info" transfer-ownership="none"> <type name="FrameInfo" c:type="CoglFrameInfo*"/> </instance-parameter> </parameters> </method> <method name="is_vsync" c:identifier="cogl_frame_info_is_vsync"> <source-position filename="cogl/cogl/cogl-frame-info.h" line="148"/> <return-value transfer-ownership="none"> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="info" transfer-ownership="none"> <type name="FrameInfo" c:type="CoglFrameInfo*"/> </instance-parameter> </parameters> </method> <method name="is_zero_copy" c:identifier="cogl_frame_info_is_zero_copy"> <source-position filename="cogl/cogl/cogl-frame-info.h" line="145"/> <return-value transfer-ownership="none"> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="info" transfer-ownership="none"> <type name="FrameInfo" c:type="CoglFrameInfo*"/> </instance-parameter> </parameters> </method> </class> <class name="Framebuffer" c:symbol-prefix="framebuffer" c:type="CoglFramebuffer" parent="GObject.Object" abstract="1" glib:type-name="CoglFramebuffer" glib:get-type="cogl_framebuffer_get_type" glib:type-struct="FramebufferClass"> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="103"/> <function name="error_quark" c:identifier="cogl_framebuffer_error_quark"> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="1464"/> <return-value transfer-ownership="none"> <type name="guint32" c:type="uint32_t"/> </return-value> </function> <virtual-method name="allocate" invoker="allocate" version="1.8" stability="Unstable" throws="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="105">Explicitly allocates a configured #CoglFramebuffer allowing developers to check and handle any errors that might arise from an unsupported configuration so that fallback configurations may be tried. <note>Many applications don't support any fallback options at least when they are initially developed and in that case the don't need to use this API since Cogl will automatically allocate a framebuffer when it first gets used. The disadvantage of relying on automatic allocation is that the program will abort with an error message if there is an error during automatic allocation.</note></doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="100"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="121">%TRUE if there were no error allocating the framebuffer, else %FALSE.</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="107">A #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </virtual-method> <virtual-method name="is_y_flipped"> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="102"/> <return-value transfer-ownership="none"> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </virtual-method> <method name="allocate" c:identifier="cogl_framebuffer_allocate" version="1.8" stability="Unstable" throws="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="105">Explicitly allocates a configured #CoglFramebuffer allowing developers to check and handle any errors that might arise from an unsupported configuration so that fallback configurations may be tried. <note>Many applications don't support any fallback options at least when they are initially developed and in that case the don't need to use this API since Cogl will automatically allocate a framebuffer when it first gets used. The disadvantage of relying on automatic allocation is that the program will abort with an error message if there is an error during automatic allocation.</note></doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="126"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="121">%TRUE if there were no error allocating the framebuffer, else %FALSE.</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="107">A #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </method> <method name="clear" c:identifier="cogl_framebuffer_clear" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1002">Clears all the auxiliary buffers identified in the @buffers mask, and if that includes the color buffer then the specified @color is used.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="1017"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1004">A #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="buffers" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1005">A mask of #CoglBufferBit<!-- -->'s identifying which auxiliary buffers to clear</doc> <type name="gulong" c:type="unsigned long"/> </parameter> <parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1007">The color to clear the color buffer too if specified in @buffers.</doc> <type name="Color" c:type="const CoglColor*"/> </parameter> </parameters> </method> <method name="clear4f" c:identifier="cogl_framebuffer_clear4f" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1021">Clears all the auxiliary buffers identified in the @buffers mask, and if that includes the color buffer then the specified @color is used.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="1042"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1023">A #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="buffers" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1024">A mask of #CoglBufferBit<!-- -->'s identifying which auxiliary buffers to clear</doc> <type name="gulong" c:type="unsigned long"/> </parameter> <parameter name="red" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1026">The red component of color to clear the color buffer too if specified in @buffers.</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="green" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1028">The green component of color to clear the color buffer too if specified in @buffers.</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="blue" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1030">The blue component of color to clear the color buffer too if specified in @buffers.</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="alpha" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1032">The alpha component of color to clear the color buffer too if specified in @buffers.</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="discard_buffers" c:identifier="cogl_framebuffer_discard_buffers" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1331">Declares that the specified @buffers no longer need to be referenced by any further rendering commands. This can be an important optimization to avoid subsequent frames of rendering depending on the results of a previous frame. For example; some tile-based rendering GPUs are able to avoid allocating and accessing system memory for the depth and stencil buffer so long as these buffers are not required as input for subsequent frames and that can save a significant amount of memory bandwidth used to save and restore their contents to system memory between frames. It is currently considered an error to try and explicitly discard the color buffer by passing %COGL_BUFFER_BIT_COLOR. This is because the color buffer is already implicitly discard when you finish rendering to a #CoglOnscreen framebuffer, and it's not meaningful to try and discard the color buffer of a #CoglOffscreen framebuffer since they are single-buffered.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="1359"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1333">A #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="buffers" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1334">A #CoglBufferBit mask of which ancillary buffers you want to discard.</doc> <type name="gulong" c:type="unsigned long"/> </parameter> </parameters> </method> <method name="draw_multitextured_rectangle" c:identifier="cogl_framebuffer_draw_multitextured_rectangle" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1166">Draws a textured rectangle to @framebuffer with the given @pipeline state with the top left corner positioned at (@x_1, @y_1) and the bottom right corner positioned at (@x_2, @y_2). As a pipeline may contain multiple texture layers this interface lets you supply texture coordinates for each layer of the pipeline. <note>The position is the position before the rectangle has been transformed by the model-view matrix and the projection matrix.</note> This is a high level drawing api that can handle any kind of #CoglMetaTexture texture for the first layer such as #CoglTexture2DSliced textures which may internally be comprised of multiple low-level textures. This is unlike low-level drawing apis such as cogl_primitive_draw() which only support low level texture types that are directly supported by GPUs such as #CoglTexture2D. <note>This api can not currently handle multiple high-level meta texture layers. The first layer may be a high level meta texture such as #CoglTexture2DSliced but all other layers much be low level textures such as #CoglTexture2D. The top left texture coordinate for layer 0 of any pipeline will be (tex_coords[0], tex_coords[1]) and the bottom right coordinate will be (tex_coords[2], tex_coords[3]). The coordinates for layer 1 would be (tex_coords[4], tex_coords[5]) (tex_coords[6], tex_coords[7]) and so on... The given texture coordinates should always be normalized such that (0, 0) corresponds to the top left and (1, 1) corresponds to the bottom right. To map an entire texture across the rectangle pass in tex_coords[0]=0, tex_coords[1]=0, tex_coords[2]=1, tex_coords[3]=1. The first pair of coordinates are for the first layer (with the smallest layer index) and if you supply less texture coordinates than there are layers in the current source material then default texture coordinates (0.0, 0.0, 1.0, 1.0) are generated.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="1226"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1168">A destination #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1169">A #CoglPipeline state object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </parameter> <parameter name="x_1" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1170">x coordinate upper left on screen.</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="y_1" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1171">y coordinate upper left on screen.</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="x_2" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1172">x coordinate lower right on screen.</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="y_2" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1173">y coordinate lower right on screen.</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="tex_coords" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1174">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.</doc> <array zero-terminated="0" c:type="const float*"> <type name="gfloat" c:type="float"/> </array> </parameter> <parameter name="tex_coords_len" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1180">The length of the @tex_coords array. (For one layer and one group of texture coordinates, this would be 4)</doc> <type name="gint" c:type="int"/> </parameter> </parameters> </method> <method name="draw_primitive" c:identifier="cogl_framebuffer_draw_primitive" version="1.10" introspectable="0" deprecated="1" deprecated-version="1.16" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1049">Draws the given @primitive geometry to the specified destination @framebuffer using the graphics processing state described by @pipeline. This drawing api doesn't support high-level meta texture types such as #CoglTexture2DSliced so it is the user's responsibility to ensure that only low-level textures that can be directly sampled by a GPU such as #CoglTexture2D are associated with layers of the given @pipeline. <note>This api doesn't support any of the legacy global state options such as cogl_set_depth_test_enabled() or cogl_set_backface_culling_enabled().</note></doc> <doc-deprecated xml:space="preserve">Use #CoglPrimitive<!-- -->s and cogl_primitive_draw() instead</doc-deprecated> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="1075"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1051">A destination #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1052">A #CoglPipeline state object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </parameter> <parameter name="primitive" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1053">A #CoglPrimitive geometry object</doc> <type c:type="CoglPrimitive*"/> </parameter> </parameters> </method> <method name="draw_rectangle" c:identifier="cogl_framebuffer_draw_rectangle" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1079">Draws a rectangle to @framebuffer with the given @pipeline state and with the top left corner positioned at (@x_1, @y_1) and the bottom right corner positioned at (@x_2, @y_2). <note>The position is the position before the rectangle has been transformed by the model-view matrix and the projection matrix.</note> <note>If you want to describe a rectangle with a texture mapped on it then you can use cogl_framebuffer_draw_textured_rectangle().</note></doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="1104"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1081">A destination #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1082">A #CoglPipeline state object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </parameter> <parameter name="x_1" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1083">X coordinate of the top-left corner</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="y_1" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1084">Y coordinate of the top-left corner</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="x_2" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1085">X coordinate of the bottom-right corner</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="y_2" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1086">Y coordinate of the bottom-right corner</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="draw_rectangles" c:identifier="cogl_framebuffer_draw_rectangles" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1235">Draws a series of rectangles to @framebuffer with the given @pipeline state in the same way that cogl_framebuffer_draw_rectangle() does. The top left corner of the first rectangle is positioned at (coordinates[0], coordinates[1]) and the bottom right corner is positioned at (coordinates[2], coordinates[3]). The positions for the second rectangle are (coordinates[4], coordinates[5]) and (coordinates[6], coordinates[7]) and so on... <note>The position is the position before the rectangle has been transformed by the model-view matrix and the projection matrix.</note> As a general rule for better performance its recommended to use this this API instead of calling cogl_framebuffer_draw_textured_rectangle() separately for multiple rectangles if all of the rectangles will be drawn together with the same @pipeline state.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="1270"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1237">A destination #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1238">A #CoglPipeline state object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </parameter> <parameter name="coordinates" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1239">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).</doc> <array zero-terminated="0" c:type="const float*"> <type name="gfloat" c:type="float"/> </array> </parameter> <parameter name="n_rectangles" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1244">number of rectangles defined in @coordinates.</doc> <type name="guint" c:type="unsigned int"/> </parameter> </parameters> </method> <method name="draw_textured_rectangle" c:identifier="cogl_framebuffer_draw_textured_rectangle" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1111">Draws a textured rectangle to @framebuffer using the given @pipeline state with the top left corner positioned at (@x_1, @y_1) and the bottom right corner positioned at (@x_2, @y_2). The top left corner will have texture coordinates of (@s_1, @t_1) and the bottom right corner will have texture coordinates of (@s_2, @t_2). <note>The position is the position before the rectangle has been transformed by the model-view matrix and the projection matrix.</note> This is a high level drawing api that can handle any kind of #CoglMetaTexture texture such as #CoglTexture2DSliced textures which may internally be comprised of multiple low-level textures. This is unlike low-level drawing apis such as cogl_primitive_draw() which only support low level texture types that are directly supported by GPUs such as #CoglTexture2D. <note>The given texture coordinates will only be used for the first texture layer of the pipeline and if your pipeline has more than one layer then all other layers will have default texture coordinates of @s_1=0.0 @t_1=0.0 @s_2=1.0 @t_2=1.0 </note> The given texture coordinates should always be normalized such that (0, 0) corresponds to the top left and (1, 1) corresponds to the bottom right. To map an entire texture across the rectangle pass in @s_1=0, @t_1=0, @s_2=1, @t_2=1.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="1155"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1113">A destination #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1114">A #CoglPipeline state object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </parameter> <parameter name="x_1" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1115">x coordinate upper left on screen.</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="y_1" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1116">y coordinate upper left on screen.</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="x_2" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1117">x coordinate lower right on screen.</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="y_2" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1118">y coordinate lower right on screen.</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="s_1" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1119">S texture coordinate of the top-left coorner</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="t_1" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1120">T texture coordinate of the top-left coorner</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="s_2" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1121">S texture coordinate of the bottom-right coorner</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="t_2" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1122">T texture coordinate of the bottom-right coorner</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="draw_textured_rectangles" c:identifier="cogl_framebuffer_draw_textured_rectangles" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1275">Draws a series of rectangles to @framebuffer with the given @pipeline state in the same way that cogl_framebuffer_draw_textured_rectangle() does. <note>The position is the position before the rectangle has been transformed by the model-view matrix and the projection matrix.</note> This is a high level drawing api that can handle any kind of #CoglMetaTexture texture such as #CoglTexture2DSliced textures which may internally be comprised of multiple low-level textures. This is unlike low-level drawing apis such as cogl_primitive_draw() which only support low level texture types that are directly supported by GPUs such as #CoglTexture2D. The top left corner of the first rectangle is positioned at (coordinates[0], coordinates[1]) and the bottom right corner is positioned at (coordinates[2], coordinates[3]). The top left texture coordinate is (coordinates[4], coordinates[5]) and the bottom right texture coordinate is (coordinates[6], coordinates[7]). The coordinates for subsequent rectangles are defined similarly by the subsequent coordinates. As a general rule for better performance its recommended to use this this API instead of calling cogl_framebuffer_draw_textured_rectangle() separately for multiple rectangles if all of the rectangles will be drawn together with the same @pipeline state. The given texture coordinates should always be normalized such that (0, 0) corresponds to the top left and (1, 1) corresponds to the bottom right. To map an entire texture across the rectangle pass in tex_coords[0]=0, tex_coords[1]=0, tex_coords[2]=1, tex_coords[3]=1.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="1324"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1277">A destination #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1278">A #CoglPipeline state object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </parameter> <parameter name="coordinates" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1279">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().</doc> <array zero-terminated="0" c:type="const float*"> <type name="gfloat" c:type="float"/> </array> </parameter> <parameter name="n_rectangles" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1283">number of rectangles to @coordinates to draw</doc> <type name="guint" c:type="unsigned int"/> </parameter> </parameters> </method> <method name="finish" c:identifier="cogl_framebuffer_finish" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1362">This blocks the CPU until all pending rendering associated with the specified framebuffer has completed. It's very rare that developers should ever need this level of synchronization with the GPU and should never be used unless you clearly understand why you need to explicitly force synchronization. One example might be for benchmarking purposes to be sure timing measurements reflect the time that the GPU is busy for not just the time it takes to queue rendering commands.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="1380"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1364">A #CoglFramebuffer pointer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </method> <method name="flush" c:identifier="cogl_framebuffer_flush"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1555">Flushes @framebuffer to ensure the current batch of commands is submitted to the GPU. Unlike cogl_framebuffer_finish(), this does not block the CPU.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="1565"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1557">A #CoglFramebuffer pointer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </method> <method name="frustum" c:identifier="cogl_framebuffer_frustum" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="447">Replaces the current projection matrix with a perspective matrix for a given viewing frustum defined by 4 side clip planes that all cross through the origin and 2 near and far clip planes.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="469"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="449">A #CoglFramebuffer pointer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="left" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="450">X position of the left clipping plane where it intersects the near clipping plane</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="right" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="452">X position of the right clipping plane where it intersects the near clipping plane</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="bottom" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="454">Y position of the bottom clipping plane where it intersects the near clipping plane</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="top" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="456">Y position of the top clipping plane where it intersects the near clipping plane</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="z_near" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="458">The distance to the near clipping plane (Must be positive)</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="z_far" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="459">The distance to the far clipping plane (Must be positive)</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="get_alpha_bits" c:identifier="cogl_framebuffer_get_alpha_bits" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="685">Retrieves the number of alpha bits of @framebuffer</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="697"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="691">the number of bits</doc> <type name="gint" c:type="int"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="687">a pointer to a #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </method> <method name="get_blue_bits" c:identifier="cogl_framebuffer_get_blue_bits" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="671">Retrieves the number of blue bits of @framebuffer</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="683"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="677">the number of bits</doc> <type name="gint" c:type="int"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="673">a pointer to a #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </method> <method name="get_context" c:identifier="cogl_framebuffer_get_context" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="986">Can be used to query the #CoglContext a given @framebuffer was instantiated within. This is the #CoglContext that was passed to cogl_onscreen_new() for example.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="1000"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="994">The #CoglContext that the given @framebuffer was instantiated within.</doc> <type name="Context" c:type="CoglContext*"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="988">A #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </method> <method name="get_depth_bits" c:identifier="cogl_framebuffer_get_depth_bits" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="699">Retrieves the number of depth bits of @framebuffer</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="711"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="705">the number of bits</doc> <type name="gint" c:type="int"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="701">a pointer to a #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </method> <method name="get_depth_write_enabled" c:identifier="cogl_framebuffer_get_depth_write_enabled" version="1.18" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="774">Queries whether depth buffer writing is enabled for @framebuffer. This can be controlled via cogl_framebuffer_set_depth_write_enabled().</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="786"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="781">%TRUE if depth writing is enabled or %FALSE if not.</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="776">a pointer to a #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </method> <method name="get_dither_enabled" c:identifier="cogl_framebuffer_get_dither_enabled" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="730">Returns whether dithering has been requested for the given @framebuffer. See cogl_framebuffer_set_dither_enabled() for more details about dithering. <note>This may return %TRUE even when the underlying @framebuffer display pipeline does not support dithering. This value only represents the user's request for dithering.</note></doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="746"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="741">%TRUE if dithering has been requested or %FALSE if not.</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="732">a pointer to a #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </method> <method name="get_green_bits" c:identifier="cogl_framebuffer_get_green_bits" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="657">Retrieves the number of green bits of @framebuffer</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="669"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="663">the number of bits</doc> <type name="gint" c:type="int"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="659">a pointer to a #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </method> <method name="get_height" c:identifier="cogl_framebuffer_get_height" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="142">Queries the current height of the given @framebuffer.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="153"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="148">The height of @framebuffer.</doc> <type name="gint" c:type="int"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="144">A #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </method> <method name="get_is_stereo" c:identifier="cogl_framebuffer_get_is_stereo"> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="728"/> <return-value transfer-ownership="none"> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </method> <method name="get_modelview_matrix" c:identifier="cogl_framebuffer_get_modelview_matrix" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="392">Stores the current model-view matrix in @matrix.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="403"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="394">A #CoglFramebuffer pointer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="matrix" direction="out" caller-allocates="1" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="395">return location for the model-view matrix</doc> <type name="Graphene.Matrix" c:type="graphene_matrix_t*"/> </parameter> </parameters> </method> <method name="get_projection_matrix" c:identifier="cogl_framebuffer_get_projection_matrix" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="506">Stores the current projection matrix in @matrix.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="517"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="508">A #CoglFramebuffer pointer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="matrix" direction="out" caller-allocates="1" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="509">return location for the projection matrix</doc> <type name="Graphene.Matrix" c:type="graphene_matrix_t*"/> </parameter> </parameters> </method> <method name="get_red_bits" c:identifier="cogl_framebuffer_get_red_bits" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="643">Retrieves the number of red bits of @framebuffer</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="655"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="649">the number of bits</doc> <type name="gint" c:type="int"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="645">a pointer to a #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </method> <method name="get_samples_per_pixel" c:identifier="cogl_framebuffer_get_samples_per_pixel" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="887">Gets the number of points that are sampled per-pixel when rasterizing geometry. Usually by default this will return 0 which means that single-sample not multisample rendering has been chosen. When using a GPU supporting multisample rendering it's possible to increase the number of samples per pixel using cogl_framebuffer_set_samples_per_pixel(). Calling cogl_framebuffer_get_samples_per_pixel() before the framebuffer has been allocated will simply return the value set using cogl_framebuffer_set_samples_per_pixel(). After the framebuffer has been allocated the value will reflect the actual number of samples that will be made by the GPU.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="912"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="904">The number of point samples made per pixel when rasterizing geometry or 0 if single-sample rendering has been chosen.</doc> <type name="gint" c:type="int"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="889">A #CoglFramebuffer framebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </method> <method name="get_stereo_mode" c:identifier="cogl_framebuffer_get_stereo_mode" version="1.20" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="807">Gets the current #CoglStereoMode, which defines which stereo buffers should be drawn to. See cogl_framebuffer_set_stereo_mode().</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="819"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="814">A #CoglStereoMode</doc> <type name="StereoMode" c:type="CoglStereoMode"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="809">a pointer to a #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </method> <method name="get_viewport4fv" c:identifier="cogl_framebuffer_get_viewport4fv" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="247">Queries the x, y, width and height components of the current viewport as set using cogl_framebuffer_set_viewport() or the default values which are 0, 0, framebuffer_width and framebuffer_height. The values are written into the given @viewport array.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="263"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="249">A #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="viewport" direction="out" caller-allocates="1" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="250">A pointer to an array of 4 floats to receive the (x, y, width, height) components of the current viewport.</doc> <array zero-terminated="0" c:type="float*" fixed-size="4"> <type name="gfloat" c:type="float"/> </array> </parameter> </parameters> </method> <method name="get_viewport_height" c:identifier="cogl_framebuffer_get_viewport_height" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="233">Queries the height of the viewport as set using cogl_framebuffer_set_viewport() or the default value which is the height of the framebuffer.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="245"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="240">The height of the viewport.</doc> <type name="gfloat" c:type="float"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="235">A #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </method> <method name="get_viewport_width" c:identifier="cogl_framebuffer_get_viewport_width" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="219">Queries the width of the viewport as set using cogl_framebuffer_set_viewport() or the default value which is the width of the framebuffer.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="231"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="226">The width of the viewport.</doc> <type name="gfloat" c:type="float"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="221">A #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </method> <method name="get_viewport_x" c:identifier="cogl_framebuffer_get_viewport_x" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="191">Queries the x coordinate of the viewport origin as set using cogl_framebuffer_set_viewport() or the default value which is 0.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="203"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="198">The x coordinate of the viewport origin.</doc> <type name="gfloat" c:type="float"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="193">A #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </method> <method name="get_viewport_y" c:identifier="cogl_framebuffer_get_viewport_y" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="205">Queries the y coordinate of the viewport origin as set using cogl_framebuffer_set_viewport() or the default value which is 0.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="217"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="212">The y coordinate of the viewport origin.</doc> <type name="gfloat" c:type="float"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="207">A #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </method> <method name="get_width" c:identifier="cogl_framebuffer_get_width" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="129">Queries the current width of the given @framebuffer.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="140"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="135">The width of @framebuffer.</doc> <type name="gint" c:type="int"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="131">A #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </method> <method name="identity_matrix" c:identifier="cogl_framebuffer_identity_matrix" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="289">Resets the current model-view matrix to the identity matrix.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="299"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="291">A #CoglFramebuffer pointer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </method> <method name="orthographic" c:identifier="cogl_framebuffer_orthographic" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="477">Replaces the current projection matrix with an orthographic projection matrix.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="498"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="479">A #CoglFramebuffer pointer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="x_1" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="480">The x coordinate for the first vertical clipping plane</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="y_1" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="481">The y coordinate for the first horizontal clipping plane</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="x_2" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="482">The x coordinate for the second vertical clipping plane</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="y_2" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="483">The y coordinate for the second horizontal clipping plane</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="near" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="484">The <emphasis>distance</emphasis> to the near clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="far" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="487">The <emphasis>distance</emphasis> to the far clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="perspective" c:identifier="cogl_framebuffer_perspective" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="420">Replaces the current projection matrix with a perspective matrix based on the provided values. <note>You should be careful not to have to great a @z_far / @z_near ratio since that will reduce the effectiveness of depth testing since there won't be enough precision to identify the depth of objects near to each other.</note></doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="441"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="422">A #CoglFramebuffer pointer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="fov_y" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="423">Vertical field of view angle in degrees.</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="aspect" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="424">The (width over height) aspect ratio for display</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="z_near" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="425">The distance to the near clipping plane (Must be positive, and must not be 0)</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="z_far" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="427">The distance to the far clipping plane (Must be positive)</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="pop_clip" c:identifier="cogl_framebuffer_pop_clip" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="629">Reverts the clipping region to the state before the last call to cogl_framebuffer_push_scissor_clip(), cogl_framebuffer_push_rectangle_clip() cogl_framebuffer_push_path_clip(), or cogl_framebuffer_push_primitive_clip().</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="641"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="631">A #CoglFramebuffer pointer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </method> <method name="pop_matrix" c:identifier="cogl_framebuffer_pop_matrix" version="1.10"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="278">Restores the model-view matrix on the top of the matrix stack.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="287"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="280">A #CoglFramebuffer pointer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </method> <method name="push_matrix" c:identifier="cogl_framebuffer_push_matrix" version="1.10"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="266">Copies the current model-view matrix onto the matrix stack. The matrix can later be restored with cogl_framebuffer_pop_matrix().</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="276"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="268">A #CoglFramebuffer pointer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </method> <method name="push_primitive_clip" c:identifier="cogl_framebuffer_push_primitive_clip" version="1.10" introspectable="0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="588">Sets a new clipping area using a 2D shaped described with a #CoglPrimitive. The shape must not contain self overlapping geometry and must lie on a single 2D plane. A bounding box of the 2D shape in local coordinates (the same coordinates used to describe the shape) must be given. It is acceptable for the bounds to be larger than the true bounds but behaviour is undefined if the bounds are smaller than the true bounds. The primitive is transformed by the current model-view matrix and the silhouette is intersected with the previous clipping area. To restore the previous clipping area, call cogl_framebuffer_pop_clip().</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="618"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="590">A #CoglFramebuffer pointer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="primitive" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="591">A #CoglPrimitive describing a flat 2D shape</doc> <type c:type="CoglPrimitive*"/> </parameter> <parameter name="bounds_x1" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="592">x coordinate for the top-left corner of the primitives bounds</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="bounds_y1" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="594">y coordinate for the top-left corner of the primitives bounds</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="bounds_x2" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="596">x coordinate for the bottom-right corner of the primitives bounds.</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="bounds_y2" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="598">y coordinate for the bottom-right corner of the primitives bounds.</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="push_rectangle_clip" c:identifier="cogl_framebuffer_push_rectangle_clip" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="561">Specifies a modelview transformed rectangular clipping area for all subsequent drawing operations. Any drawing commands that extend outside the rectangle will be clipped so that only the portion inside the rectangle will be displayed. The rectangle dimensions are transformed by the current model-view matrix. The rectangle is intersected with the current clip region. To undo the effect of this function, call cogl_framebuffer_pop_clip().</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="582"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="563">A #CoglFramebuffer pointer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="x_1" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="564">x coordinate for top left corner of the clip rectangle</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="y_1" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="565">y coordinate for top left corner of the clip rectangle</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="x_2" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="566">x coordinate for bottom right corner of the clip rectangle</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="y_2" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="567">y coordinate for bottom right corner of the clip rectangle</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="push_region_clip" c:identifier="cogl_framebuffer_push_region_clip"> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="626"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="region" transfer-ownership="none"> <type name="cairo.Region" c:type="cairo_region_t*"/> </parameter> </parameters> </method> <method name="push_scissor_clip" c:identifier="cogl_framebuffer_push_scissor_clip" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="534">Specifies a rectangular clipping area for all subsequent drawing operations. Any drawing commands that extend outside the rectangle will be clipped so that only the portion inside the rectangle will be displayed. The rectangle dimensions are not transformed by the current model-view matrix. The rectangle is intersected with the current clip region. To undo the effect of this function, call cogl_framebuffer_pop_clip().</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="555"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="536">A #CoglFramebuffer pointer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="x" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="537">left edge of the clip rectangle in window coordinates</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="y" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="538">top edge of the clip rectangle in window coordinates</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="width" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="539">width of the clip rectangle</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="height" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="540">height of the clip rectangle</doc> <type name="gint" c:type="int"/> </parameter> </parameters> </method> <method name="read_pixels" c:identifier="cogl_framebuffer_read_pixels" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1415">This is a convenience wrapper around cogl_framebuffer_read_pixels_into_bitmap() which allocates a temporary #CoglBitmap to read pixel data directly into the given buffer. The rowstride of the buffer is assumed to be the width of the region times the bytes per pixel of the format. The source for the data is always taken from the color buffer. If you want to use any other rowstride or source, please use the cogl_framebuffer_read_pixels_into_bitmap() function directly. The implementation of the function looks like this: |[ bitmap = cogl_bitmap_new_for_data (context, width, height, format, /<!-- -->* rowstride *<!-- -->/ bpp * width, pixels); cogl_framebuffer_read_pixels_into_bitmap (framebuffer, x, y, COGL_READ_PIXELS_COLOR_BUFFER, bitmap); cogl_object_unref (bitmap); ]|</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="1455"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1450">%TRUE if the read succeeded or %FALSE otherwise.</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1417">A #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="x" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1418">The x position to read from</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="y" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1419">The y position to read from</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="width" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1420">The width of the region of rectangles to read</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="height" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1421">The height of the region of rectangles to read</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="format" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1422">The pixel format to store the data in</doc> <type name="PixelFormat" c:type="CoglPixelFormat"/> </parameter> <parameter name="pixels" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1423">The address of the buffer to store the data in</doc> <type name="guint8" c:type="uint8_t*"/> </parameter> </parameters> </method> <method name="read_pixels_into_bitmap" c:identifier="cogl_framebuffer_read_pixels_into_bitmap" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1382">This reads a rectangle of pixels from the given framebuffer where position (0, 0) is the top left. The pixel at (x, y) is the first read, and a rectangle of pixels with the same size as the bitmap is read right and downwards from that point. Currently Cogl assumes that the framebuffer is in a premultiplied format so if the format of @bitmap is non-premultiplied it will convert it. To read the pixel values without any conversion you should either specify a format that doesn't use an alpha channel or use one of the formats ending in PRE.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="1409"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1402">%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.</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1384">A #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="x" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1385">The x position to read from</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="y" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1386">The y position to read from</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="source" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1387">Identifies which auxiliary buffer you want to read (only COGL_READ_PIXELS_COLOR_BUFFER supported currently)</doc> <type name="ReadPixelsFlags" c:type="CoglReadPixelsFlags"/> </parameter> <parameter name="bitmap" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1389">The bitmap to store the results in.</doc> <type name="Bitmap" c:type="CoglBitmap*"/> </parameter> </parameters> </method> <method name="resolve_samples" c:identifier="cogl_framebuffer_resolve_samples" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="915">When point sample rendering (also known as multisample rendering) has been enabled via cogl_framebuffer_set_samples_per_pixel() then you can optionally call this function (or cogl_framebuffer_resolve_samples_region()) to explicitly resolve the point samples into values for the final color buffer. Some GPUs will implicitly resolve the point samples during rendering and so this function is effectively a nop, but with other architectures it is desirable to defer the resolve step until the end of the frame. Since Cogl will automatically ensure samples are resolved if the target color buffer is used as a source this API only needs to be used if explicit control is desired - perhaps because you want to ensure that the resolve is completed in advance to avoid later having to wait for the resolve to complete. If you are performing incremental updates to a framebuffer you should consider using cogl_framebuffer_resolve_samples_region() instead to avoid resolving redundant pixels.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="944"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="917">A #CoglFramebuffer framebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> </parameters> </method> <method name="resolve_samples_region" c:identifier="cogl_framebuffer_resolve_samples_region" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="946">When point sample rendering (also known as multisample rendering) has been enabled via cogl_framebuffer_set_samples_per_pixel() then you can optionally call this function (or cogl_framebuffer_resolve_samples()) to explicitly resolve the point samples into values for the final color buffer. Some GPUs will implicitly resolve the point samples during rendering and so this function is effectively a nop, but with other architectures it is desirable to defer the resolve step until the end of the frame. Use of this API is recommended if incremental, small updates to a framebuffer are being made because by default Cogl will implicitly resolve all the point samples of the framebuffer which can result in redundant work if only a small number of samples have changed. Because some GPUs implicitly resolve point samples this function only guarantees that at-least the region specified will be resolved and if you have rendered to a larger region then it's possible that other samples may be implicitly resolved.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="980"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="948">A #CoglFramebuffer framebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="x" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="949">top-left x coordinate of region to resolve</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="y" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="950">top-left y coordinate of region to resolve</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="width" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="951">width of region to resolve</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="height" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="952">height of region to resolve</doc> <type name="gint" c:type="int"/> </parameter> </parameters> </method> <method name="rotate" c:identifier="cogl_framebuffer_rotate" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="339">Multiplies the current model-view matrix by one that rotates the model around the axis-vector specified by @x, @y and @z. The rotation follows the right-hand thumb rule so for example rotating by 10 degrees about the axis-vector (0, 0, 1) causes a small counter-clockwise rotation.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="357"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="341">A #CoglFramebuffer pointer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="angle" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="342">Angle in degrees to rotate.</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="x" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="343">X-component of vertex to rotate around.</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="y" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="344">Y-component of vertex to rotate around.</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="z" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="345">Z-component of vertex to rotate around.</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="rotate_euler" c:identifier="cogl_framebuffer_rotate_euler" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="363">Multiplies the current model-view matrix by one that rotates according to the rotation described by @euler.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="375"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="365">A #CoglFramebuffer pointer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="euler" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="366">A #graphene_euler_t</doc> <type name="Graphene.Euler" c:type="const graphene_euler_t*"/> </parameter> </parameters> </method> <method name="scale" c:identifier="cogl_framebuffer_scale" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="301">Multiplies the current model-view matrix by one that scales the x, y and z axes by the given values.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="315"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="303">A #CoglFramebuffer pointer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="x" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="304">Amount to scale along the x-axis</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="y" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="305">Amount to scale along the y-axis</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="z" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="306">Amount to scale along the z-axis</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="set_depth_write_enabled" c:identifier="cogl_framebuffer_set_depth_write_enabled" version="1.18" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="788">Enables or disables depth buffer writing when rendering to @framebuffer. If depth writing is enabled for both the framebuffer and the rendering pipeline, and the framebuffer has an associated depth buffer, depth information will be written to this buffer during rendering. Depth buffer writing is enabled by default.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="804"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="790">a pointer to a #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="depth_write_enabled" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="791">%TRUE to enable depth writing or %FALSE to disable</doc> <type name="gboolean" c:type="gboolean"/> </parameter> </parameters> </method> <method name="set_dither_enabled" c:identifier="cogl_framebuffer_set_dither_enabled" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="748">Enables or disabled dithering if supported by the hardware. Dithering is a hardware dependent technique to increase the visible color resolution beyond what the underlying hardware supports by playing tricks with the colors placed into the framebuffer to give the illusion of other colors. (For example this can be compared to half-toning used by some news papers to show varying levels of grey even though their may only be black and white are available). If the current display pipeline for @framebuffer does not support dithering then this has no affect. Dithering is enabled by default.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="771"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="750">a pointer to a #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="dither_enabled" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="751">%TRUE to enable dithering or %FALSE to disable</doc> <type name="gboolean" c:type="gboolean"/> </parameter> </parameters> </method> <method name="set_modelview_matrix" c:identifier="cogl_framebuffer_set_modelview_matrix" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="406">Sets @matrix as the new model-view matrix.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="417"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="408">A #CoglFramebuffer pointer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="matrix" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="409">the new model-view matrix</doc> <type name="Graphene.Matrix" c:type="const graphene_matrix_t*"/> </parameter> </parameters> </method> <method name="set_projection_matrix" c:identifier="cogl_framebuffer_set_projection_matrix" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="520">Sets @matrix as the new projection matrix.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="531"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="522">A #CoglFramebuffer pointer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="matrix" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="523">the new projection matrix</doc> <type name="Graphene.Matrix" c:type="const graphene_matrix_t*"/> </parameter> </parameters> </method> <method name="set_samples_per_pixel" c:identifier="cogl_framebuffer_set_samples_per_pixel" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="842">Requires that when rendering to @framebuffer then @n point samples should be made per pixel which will all contribute to the final resolved color for that pixel. The idea is that the hardware aims to get quality similar to what you would get if you rendered everything twice as big (for 4 samples per pixel) and then scaled that image back down with filtering. It can effectively remove the jagged edges of polygons and should be more efficient than if you were to manually render at a higher resolution and downscale because the hardware is often able to take some shortcuts. For example the GPU may only calculate a single texture sample for all points of a single pixel, and for tile based architectures all the extra sample data (such as depth and stencil samples) may be handled on-chip and so avoid increased demand on system memory bandwidth. By default this value is usually set to 0 and that is referred to as "single-sample" rendering. A value of 1 or greater is referred to as "multisample" rendering. <note>There are some semantic differences between single-sample rendering and multisampling with just 1 point sample such as it being redundant to use the cogl_framebuffer_resolve_samples() and cogl_framebuffer_resolve_samples_region() apis with single-sample rendering.</note> <note>It's recommended that cogl_framebuffer_resolve_samples_region() be explicitly used at the end of rendering to a point sample buffer to minimize the number of samples that get resolved. By default Cogl will implicitly resolve all framebuffer samples but if only a small region of a framebuffer has changed this can lead to redundant work being done.</note></doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="884"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="844">A #CoglFramebuffer framebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="samples_per_pixel" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="845">The minimum number of samples per pixel</doc> <type name="gint" c:type="int"/> </parameter> </parameters> </method> <method name="set_stereo_mode" c:identifier="cogl_framebuffer_set_stereo_mode" version="1.20" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="821">Sets which stereo buffers should be drawn to. The default is %COGL_STEREO_BOTH, which means that both the left and right buffers will be affected by drawing. For this to have an effect, the display system must support stereo drawables, and the framebuffer must have been created with stereo enabled. (See cogl_onscreen_template_set_stereo_enabled(), cogl_framebuffer_get_is_stereo().)</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="839"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="823">a pointer to a #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="stereo_mode" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="824">A #CoglStereoMode specifying which stereo buffers should be drawn tow.</doc> <type name="StereoMode" c:type="CoglStereoMode"/> </parameter> </parameters> </method> <method name="set_viewport" c:identifier="cogl_framebuffer_set_viewport" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="155">Defines a scale and offset for everything rendered relative to the top-left of the destination framebuffer. By default the viewport has an origin of (0,0) and width and height that match the framebuffer's size. Assuming a default projection and modelview matrix then you could translate the contents of a window down and right by leaving the viewport size unchanged by moving the offset to (10,10). The viewport coordinates are measured in pixels. If you left the x and y origin as (0,0) you could scale the windows contents down by specify and width and height that's half the real size of the framebuffer. <note>Although the function takes floating point arguments, existing drivers only allow the use of integer values. In the future floating point values will be exposed via a checkable feature.</note></doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="185"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="157">A #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="x" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="158">The top-left x coordinate of the viewport origin (only integers supported currently)</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="y" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="160">The top-left y coordinate of the viewport origin (only integers supported currently)</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="width" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="162">The width of the viewport (only integers supported currently)</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="height" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="163">The height of the viewport (only integers supported currently)</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="transform" c:identifier="cogl_framebuffer_transform" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="378">Multiplies the current model-view matrix by the given matrix.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="389"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="380">A #CoglFramebuffer pointer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="matrix" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="381">the matrix to multiply with the current model-view</doc> <type name="Graphene.Matrix" c:type="const graphene_matrix_t*"/> </parameter> </parameters> </method> <method name="translate" c:identifier="cogl_framebuffer_translate" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="320">Multiplies the current model-view matrix by one that translates the model along all three axes according to the given values.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="334"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="322">A #CoglFramebuffer pointer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </instance-parameter> <parameter name="x" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="323">Distance to translate along the x-axis</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="y" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="324">Distance to translate along the y-axis</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="z" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="325">Distance to translate along the z-axis</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <property name="context" introspectable="0" writable="1" construct-only="1" transfer-ownership="none"> <type/> </property> <property name="driver-config" writable="1" construct-only="1" transfer-ownership="none"> <type name="gpointer" c:type="gpointer"/> </property> <property name="height" writable="1" construct="1" transfer-ownership="none"> <type name="gint" c:type="gint"/> </property> <property name="width" writable="1" construct="1" transfer-ownership="none"> <type name="gint" c:type="gint"/> </property> <field name="parent_instance"> <type name="GObject.Object" c:type="GObject"/> </field> <glib:signal name="destroy" when="last"> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> </glib:signal> </class> <record name="FramebufferClass" c:type="CoglFramebufferClass" glib:is-gtype-struct-for="Framebuffer"> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="103"/> <field name="parent_class" readable="0" private="1"> <type name="GObject.ObjectClass" c:type="GObjectClass"/> </field> <field name="allocate"> <callback name="allocate" throws="1"> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="100"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="121">%TRUE if there were no error allocating the framebuffer, else %FALSE.</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="107">A #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </parameter> </parameters> </callback> </field> <field name="is_y_flipped"> <callback name="is_y_flipped"> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="102"/> <return-value transfer-ownership="none"> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="framebuffer" transfer-ownership="none"> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </parameter> </parameters> </callback> </field> </record> <record name="FramebufferDriverConfig" c:type="CoglFramebufferDriverConfig" disguised="1"> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="88"/> </record> <enumeration name="FramebufferError" c:type="CoglFramebufferError"> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="1476"/> <member name="framebuffer_error_allocate" value="0" c:identifier="COGL_FRAMEBUFFER_ERROR_ALLOCATE"> </member> </enumeration> <enumeration name="GraphicsResetStatus" c:type="CoglGraphicsResetStatus"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="289">All the error values that might be returned by cogl_get_graphics_reset_status(). Each value's meaning corresponds to the similarly named value defined in the ARB_robustness and NV_robustness_video_memory_purge extensions.</doc> <source-position filename="cogl/cogl/cogl-context.h" line="309"/> <member name="no_error" value="0" c:identifier="COGL_GRAPHICS_RESET_STATUS_NO_ERROR"> </member> <member name="guilty_context_reset" value="1" c:identifier="COGL_GRAPHICS_RESET_STATUS_GUILTY_CONTEXT_RESET"> </member> <member name="innocent_context_reset" value="2" c:identifier="COGL_GRAPHICS_RESET_STATUS_INNOCENT_CONTEXT_RESET"> </member> <member name="unknown_context_reset" value="3" c:identifier="COGL_GRAPHICS_RESET_STATUS_UNKNOWN_CONTEXT_RESET"> </member> <member name="purged_context_reset" value="4" c:identifier="COGL_GRAPHICS_RESET_STATUS_PURGED_CONTEXT_RESET"> </member> </enumeration> <enumeration name="IndicesType" c:type="CoglIndicesType"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="305">You should aim to use the smallest data type that gives you enough range, since it reduces the size of your index array and can help reduce the demand on memory bandwidth. Note that %COGL_INDICES_TYPE_UNSIGNED_INT is only supported if the %COGL_FEATURE_ID_UNSIGNED_INT_INDICES feature is available. This should always be available on OpenGL but on OpenGL ES it will only be available if the GL_OES_element_index_uint extension is advertized.</doc> <source-position filename="cogl/cogl/cogl-types.h" line="326"/> <member name="byte" value="0" c:identifier="COGL_INDICES_TYPE_UNSIGNED_BYTE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="307">Your indices are unsigned bytes</doc> </member> <member name="short" value="1" c:identifier="COGL_INDICES_TYPE_UNSIGNED_SHORT"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="308">Your indices are unsigned shorts</doc> </member> <member name="int" value="2" c:identifier="COGL_INDICES_TYPE_UNSIGNED_INT"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="309">Your indices are unsigned ints</doc> </member> </enumeration> <function-macro name="MATERIAL" c:identifier="COGL_MATERIAL" introspectable="0"> <source-position filename="cogl/cogl/deprecated/cogl-material-compat.h" line="62"/> <parameters> <parameter name="OBJECT"> </parameter> </parameters> </function-macro> <function-macro name="META_TEXTURE" c:identifier="COGL_META_TEXTURE" introspectable="0"> <source-position filename="cogl/cogl/deprecated/cogl-type-casts.h" line="50"/> <parameters> <parameter name="X"> </parameter> </parameters> </function-macro> <record name="Material" c:type="CoglMaterial" glib:type-name="CoglMaterial" glib:get-type="cogl_material_get_type" c:symbol-prefix="material"> <source-position filename="cogl/cogl/deprecated/cogl-material-compat.h" line="55"/> <constructor name="new" c:identifier="cogl_material_new" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="144">Allocates and initializes a blank white material</doc> <doc-deprecated xml:space="preserve">Use cogl_pipeline_new() instead</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-material-compat.h" line="154"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="149">a pointer to a new #CoglMaterial</doc> <type name="Material" c:type="CoglMaterial*"/> </return-value> </constructor> <method name="set_alpha_test_function" c:identifier="cogl_material_set_alpha_test_function" version="1.0" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="235">Before a primitive is blended with the framebuffer, it goes through an alpha test stage which lets you discard fragments based on the current alpha value. This function lets you change the function used to evaluate the alpha channel, and thus determine which fragments are discarded and which continue on to the blending stage. The default is %COGL_MATERIAL_ALPHA_FUNC_ALWAYS</doc> <doc-deprecated xml:space="preserve">Use cogl_pipeline_set_alpha_test_function() instead</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-material-compat.h" line="255"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="material" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="237">A #CoglMaterial object</doc> <type name="Material" c:type="CoglMaterial*"/> </instance-parameter> <parameter name="alpha_func" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="238">A @CoglMaterialAlphaFunc constant</doc> <type name="MaterialAlphaFunc" c:type="CoglMaterialAlphaFunc"/> </parameter> <parameter name="alpha_reference" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="239">A reference point that the chosen alpha function uses to compare incoming fragments to.</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="set_blend" c:identifier="cogl_material_set_blend" version="1.0" deprecated="1" deprecated-version="1.16" throws="1"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="259">If not already familiar; please refer <link linkend="cogl-Blend-Strings">here</link> for an overview of what blend strings are, and their syntax. Blending occurs after the alpha test function, and combines fragments with the framebuffer. Currently the only blend function Cogl exposes is ADD(). So any valid blend statements will be of the form: |[ &lt;channel-mask&gt;=ADD(SRC_COLOR*(&lt;factor&gt;), DST_COLOR*(&lt;factor&gt;)) ]| <warning>The brackets around blend factors are currently not optional!</warning> This is the list of source-names usable as blend factors: <itemizedlist> <listitem><para>SRC_COLOR: The color of the incoming fragment</para></listitem> <listitem><para>DST_COLOR: The color of the framebuffer</para></listitem> <listitem><para>CONSTANT: The constant set via cogl_material_set_blend_constant()</para></listitem> </itemizedlist> The source names can be used according to the <link linkend="cogl-Blend-String-syntax">color-source and factor syntax</link>, so for example "(1-SRC_COLOR[A])" would be a valid factor, as would "(CONSTANT[RGB])" These can also be used as factors: <itemizedlist> <listitem>0: (0, 0, 0, 0)</listitem> <listitem>1: (1, 1, 1, 1)</listitem> <listitem>SRC_ALPHA_SATURATE_FACTOR: (f,f,f,1) where f = MIN(SRC_COLOR[A],1-DST_COLOR[A])</listitem> </itemizedlist> <note>Remember; all color components are normalized to the range [0, 1] before computing the result of blending.</note> <example id="cogl-Blend-Strings-blend-unpremul"> <title>Blend Strings/1</title> <para>Blend a non-premultiplied source over a destination with premultiplied alpha:</para> <programlisting> "RGB = ADD(SRC_COLOR*(SRC_COLOR[A]), DST_COLOR*(1-SRC_COLOR[A]))" "A = ADD(SRC_COLOR, DST_COLOR*(1-SRC_COLOR[A]))" </programlisting> </example> <example id="cogl-Blend-Strings-blend-premul"> <title>Blend Strings/2</title> <para>Blend a premultiplied source over a destination with premultiplied alpha</para> <programlisting> "RGBA = ADD(SRC_COLOR, DST_COLOR*(1-SRC_COLOR[A]))" </programlisting> </example> The default blend string is: |[ RGBA = ADD (SRC_COLOR, DST_COLOR*(1-SRC_COLOR[A])) ]| That gives normal alpha-blending when the calculated color for the material is in premultiplied form.</doc> <doc-deprecated xml:space="preserve">Use cogl_pipeline_set_blend() instead</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-material-compat.h" line="346"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="336">%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).</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="material" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="261">A #CoglMaterial object</doc> <type name="Material" c:type="CoglMaterial*"/> </instance-parameter> <parameter name="blend_string" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="262">A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired blend function.</doc> <type name="utf8" c:type="const char*"/> </parameter> </parameters> </method> <method name="set_blend_constant" c:identifier="cogl_material_set_blend_constant" version="1.0" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="350">When blending is setup to reference a CONSTANT blend factor then blending will depend on the constant set with this function.</doc> <doc-deprecated xml:space="preserve">Use cogl_pipeline_set_blend_constant() instead</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-material-compat.h" line="363"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="material" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="352">A #CoglMaterial object</doc> <type name="Material" c:type="CoglMaterial*"/> </instance-parameter> <parameter name="constant_color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="353">The constant color you want</doc> <type name="Color" c:type="const CoglColor*"/> </parameter> </parameters> </method> <method name="set_color" c:identifier="cogl_material_set_color" version="1.0" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="156">Sets the basic color of the material, used when no lighting is enabled. Note that if you don't add any layers to the material then the color will be blended unmodified with the destination; the default blend expects premultiplied colors: for example, use (0.5, 0.0, 0.0, 0.5) for semi-transparent red. See cogl_color_premultiply(). The default value is (1.0, 1.0, 1.0, 1.0)</doc> <doc-deprecated xml:space="preserve">Use cogl_pipeline_set_color() instead</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-material-compat.h" line="175"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="material" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="158">A #CoglMaterial object</doc> <type name="Material" c:type="CoglMaterial*"/> </instance-parameter> <parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="159">The components of the color</doc> <type name="Color" c:type="const CoglColor*"/> </parameter> </parameters> </method> <method name="set_color4ub" c:identifier="cogl_material_set_color4ub" version="1.0" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="178">Sets the basic color of the material, used when no lighting is enabled. The default value is (0xff, 0xff, 0xff, 0xff)</doc> <doc-deprecated xml:space="preserve">Use cogl_pipeline_set_color4ub() instead</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-material-compat.h" line="195"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="material" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="180">A #CoglMaterial object</doc> <type name="Material" c:type="CoglMaterial*"/> </instance-parameter> <parameter name="red" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="181">The red component</doc> <type name="guint8" c:type="uint8_t"/> </parameter> <parameter name="green" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="182">The green component</doc> <type name="guint8" c:type="uint8_t"/> </parameter> <parameter name="blue" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="183">The blue component</doc> <type name="guint8" c:type="uint8_t"/> </parameter> <parameter name="alpha" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="184">The alpha component</doc> <type name="guint8" c:type="uint8_t"/> </parameter> </parameters> </method> <method name="set_layer" c:identifier="cogl_material_set_layer" version="1.0" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="434">In addition to the standard OpenGL lighting model a Cogl material may have one or more layers comprised of textures that can be blended together in order, with a number of different texture combine modes. This function defines a new texture layer. The index values of multiple layers do not have to be consecutive; it is only their relative order that is important. <note>In the future, we may define other types of material layers, such as purely GLSL based layers.</note></doc> <doc-deprecated xml:space="preserve">Use cogl_pipeline_set_layer() instead</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-material-compat.h" line="456"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="material" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="436">A #CoglMaterial object</doc> <type name="Material" c:type="CoglMaterial*"/> </instance-parameter> <parameter name="layer_index" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="437">the index of the layer</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="texture" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="438">a #CoglHandle for the layer object</doc> <type name="Handle" c:type="CoglHandle"/> </parameter> </parameters> </method> <method name="set_layer_combine" c:identifier="cogl_material_set_layer_combine" version="1.0" deprecated="1" deprecated-version="1.16" throws="1"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="460">If not already familiar; you can refer <link linkend="cogl-Blend-Strings">here</link> for an overview of what blend strings are and there syntax. These are all the functions available for texture combining: <itemizedlist> <listitem>REPLACE(arg0) = arg0</listitem> <listitem>MODULATE(arg0, arg1) = arg0 x arg1</listitem> <listitem>ADD(arg0, arg1) = arg0 + arg1</listitem> <listitem>ADD_SIGNED(arg0, arg1) = arg0 + arg1 - 0.5</listitem> <listitem>INTERPOLATE(arg0, arg1, arg2) = arg0 x arg2 + arg1 x (1 - arg2)</listitem> <listitem>SUBTRACT(arg0, arg1) = arg0 - arg1</listitem> <listitem> <programlisting> DOT3_RGB(arg0, arg1) = 4 x ((arg0[R] - 0.5)) * (arg1[R] - 0.5) + (arg0[G] - 0.5)) * (arg1[G] - 0.5) + (arg0[B] - 0.5)) * (arg1[B] - 0.5)) </programlisting> </listitem> <listitem> <programlisting> DOT3_RGBA(arg0, arg1) = 4 x ((arg0[R] - 0.5)) * (arg1[R] - 0.5) + (arg0[G] - 0.5)) * (arg1[G] - 0.5) + (arg0[B] - 0.5)) * (arg1[B] - 0.5)) </programlisting> </listitem> </itemizedlist> Refer to the <link linkend="cogl-Blend-String-syntax">color-source syntax</link> for describing the arguments. The valid source names for texture combining are: <variablelist> <varlistentry> <term>TEXTURE</term> <listitem>Use the color from the current texture layer</listitem> </varlistentry> <varlistentry> <term>TEXTURE_0, TEXTURE_1, etc</term> <listitem>Use the color from the specified texture layer</listitem> </varlistentry> <varlistentry> <term>CONSTANT</term> <listitem>Use the color from the constant given with cogl_material_set_layer_constant()</listitem> </varlistentry> <varlistentry> <term>PRIMARY</term> <listitem>Use the color of the material as set with cogl_material_set_color()</listitem> </varlistentry> <varlistentry> <term>PREVIOUS</term> <listitem>Either use the texture color from the previous layer, or if this is layer 0, use the color of the material as set with cogl_material_set_color()</listitem> </varlistentry> </variablelist> <refsect2 id="cogl-Layer-Combine-Examples"> <title>Layer Combine Examples</title> <para>This is effectively what the default blending is:</para> <informalexample><programlisting> RGBA = MODULATE (PREVIOUS, TEXTURE) </programlisting></informalexample> <para>This could be used to cross-fade between two images, using the alpha component of a constant as the interpolator. The constant color is given by calling cogl_material_set_layer_constant.</para> <informalexample><programlisting> RGBA = INTERPOLATE (PREVIOUS, TEXTURE, CONSTANT[A]) </programlisting></informalexample> </refsect2> <note>You can't give a multiplication factor for arguments as you can with blending.</note></doc> <doc-deprecated xml:space="preserve">Use cogl_pipeline_set_layer_combine() instead</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-material-compat.h" line="555"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="546">%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</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="material" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="462">A #CoglMaterial object</doc> <type name="Material" c:type="CoglMaterial*"/> </instance-parameter> <parameter name="layer_index" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="463">Specifies the layer you want define a combine function for</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="blend_string" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="464">A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired texture combine function.</doc> <type name="utf8" c:type="const char*"/> </parameter> </parameters> </method> <method name="set_layer_combine_constant" c:identifier="cogl_material_set_layer_combine_constant" version="1.0" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="560">When you are using the 'CONSTANT' color source in a layer combine description then you can use this function to define its value.</doc> <doc-deprecated xml:space="preserve">Use cogl_pipeline_set_layer_combine_constant() instead</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-material-compat.h" line="576"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="material" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="562">A #CoglMaterial object</doc> <type name="Material" c:type="CoglMaterial*"/> </instance-parameter> <parameter name="layer_index" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="563">Specifies the layer you want to specify a constant used for texture combining</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="constant" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="565">The constant color you want</doc> <type name="Color" c:type="const CoglColor*"/> </parameter> </parameters> </method> <method name="set_layer_filters" c:identifier="cogl_material_set_layer_filters" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="596">Changes the decimation and interpolation filters used when a texture is drawn at other scales than 100%.</doc> <doc-deprecated xml:space="preserve">Use cogl_pipeline_set_layer_filters() instead</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-material-compat.h" line="609"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="material" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="598">A #CoglMaterial object</doc> <type name="Material" c:type="CoglMaterial*"/> </instance-parameter> <parameter name="layer_index" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="599">the layer number to change.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="min_filter" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="600">the filter used when scaling a texture down.</doc> <type name="MaterialFilter" c:type="CoglMaterialFilter"/> </parameter> <parameter name="mag_filter" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="601">the filter used when magnifying a texture.</doc> <type name="MaterialFilter" c:type="CoglMaterialFilter"/> </parameter> </parameters> </method> <method name="set_layer_matrix" c:identifier="cogl_material_set_layer_matrix" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="580">This function lets you set a matrix that can be used to e.g. translate and rotate a single layer of a material used to fill your geometry.</doc> <doc-deprecated xml:space="preserve">Use cogl_pipeline_set_layer_matrix() instead</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-material-compat.h" line="592"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="material" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="582">A #CoglMaterial object</doc> <type name="Material" c:type="CoglMaterial*"/> </instance-parameter> <parameter name="layer_index" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="583">the index for the layer inside @material</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="matrix" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="584">the transformation matrix for the layer</doc> <type name="Graphene.Matrix" c:type="const graphene_matrix_t*"/> </parameter> </parameters> </method> <method name="set_layer_point_sprite_coords_enabled" c:identifier="cogl_material_set_layer_point_sprite_coords_enabled" version="1.4" deprecated="1" deprecated-version="1.16" throws="1"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="614">When rendering points, if @enable is %TRUE then the texture coordinates for this layer will be replaced with coordinates that vary from 0.0 to 1.0 across the primitive. The top left of the point will have the coordinates 0.0,0.0 and the bottom right will have 1.0,1.0. If @enable is %FALSE then the coordinates will be fixed for the entire point.</doc> <doc-deprecated xml:space="preserve">Use cogl_pipeline_set_layer_point_sprite_coords_enabled() instead</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-material-compat.h" line="635"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="628">%TRUE if the function succeeds, %FALSE otherwise.</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="material" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="616">a #CoglHandle to a material.</doc> <type name="Material" c:type="CoglMaterial*"/> </instance-parameter> <parameter name="layer_index" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="617">the layer number to change.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="enable" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="618">whether to enable point sprite coord generation.</doc> <type name="gboolean" c:type="gboolean"/> </parameter> </parameters> </method> <method name="set_point_size" c:identifier="cogl_material_set_point_size" version="1.4" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="366">Changes the size of points drawn when %COGL_VERTICES_MODE_POINTS is used with the vertex buffer API. Note that typically the GPU will only support a limited minimum and maximum range of point sizes. If the chosen point size is outside that range then the nearest value within that range will be used instead. The size of a point is in screen space so it will be the same regardless of any transformations. The default point size is 1.0.</doc> <doc-deprecated xml:space="preserve">Use cogl_pipeline_set_point_size() instead</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-material-compat.h" line="384"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="material" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="368">a material.</doc> <type name="Material" c:type="CoglMaterial*"/> </instance-parameter> <parameter name="point_size" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="369">the new point size.</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="set_user_program" c:identifier="cogl_material_set_user_program" version="1.4" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="387">Associates a linked CoglProgram with the given material so that the program can take full control of vertex and/or fragment processing. This is an example of how it can be used to associate an ARBfp program with a #CoglMaterial: |[ CoglHandle shader; CoglHandle program; CoglMaterial *material; shader = cogl_create_shader (COGL_SHADER_TYPE_FRAGMENT); cogl_shader_source (shader, "!!ARBfp1.0\n" "MOV result.color,fragment.color;\n" "END\n"); program = cogl_create_program (); cogl_program_attach_shader (program, shader); cogl_program_link (program); material = cogl_material_new (); cogl_material_set_user_program (material, program); cogl_set_source_color4ub (0xff, 0x00, 0x00, 0xff); cogl_rectangle (0, 0, 100, 100); ]| It is possibly worth keeping in mind that this API is not part of the long term design for how we want to expose shaders to Cogl developers (We are planning on deprecating the cogl_program and cogl_shader APIs in favour of a "snippet" framework) but in the meantime we hope this will handle most practical GLSL and ARBfp requirements.</doc> <doc-deprecated xml:space="preserve">Use #CoglSnippet api instead instead</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-material-compat.h" line="431"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="material" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="389">a #CoglMaterial object.</doc> <type name="Material" c:type="CoglMaterial*"/> </instance-parameter> <parameter name="program" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="390">A #CoglHandle to a linked CoglProgram</doc> <type name="Handle" c:type="CoglHandle"/> </parameter> </parameters> </method> </record> <enumeration name="MaterialAlphaFunc" c:type="CoglMaterialAlphaFunc"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="201">Alpha testing happens before blending primitives with the framebuffer and gives an opportunity to discard fragments based on a comparison with the incoming alpha value and a reference alpha value. The #CoglMaterialAlphaFunc determines how the comparison is done.</doc> <source-position filename="cogl/cogl/deprecated/cogl-material-compat.h" line="233"/> <member name="never" value="512" c:identifier="COGL_MATERIAL_ALPHA_FUNC_NEVER"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="203">Never let the fragment through.</doc> </member> <member name="less" value="513" c:identifier="COGL_MATERIAL_ALPHA_FUNC_LESS"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="204">Let the fragment through if the incoming alpha value is less than the reference alpha value</doc> </member> <member name="equal" value="514" c:identifier="COGL_MATERIAL_ALPHA_FUNC_EQUAL"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="206">Let the fragment through if the incoming alpha value equals the reference alpha value</doc> </member> <member name="lequal" value="515" c:identifier="COGL_MATERIAL_ALPHA_FUNC_LEQUAL"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="208">Let the fragment through if the incoming alpha value is less than or equal to the reference alpha value</doc> </member> <member name="greater" value="516" c:identifier="COGL_MATERIAL_ALPHA_FUNC_GREATER"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="210">Let the fragment through if the incoming alpha value is greater than the reference alpha value</doc> </member> <member name="notequal" value="517" c:identifier="COGL_MATERIAL_ALPHA_FUNC_NOTEQUAL"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="212">Let the fragment through if the incoming alpha value does not equal the reference alpha value</doc> </member> <member name="gequal" value="518" c:identifier="COGL_MATERIAL_ALPHA_FUNC_GEQUAL"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="214">Let the fragment through if the incoming alpha value is greater than or equal to the reference alpha value.</doc> </member> <member name="always" value="519" c:identifier="COGL_MATERIAL_ALPHA_FUNC_ALWAYS"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="216">Always let the fragment through.</doc> </member> </enumeration> <enumeration name="MaterialFilter" c:type="CoglMaterialFilter"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="64">Texture filtering is used whenever the current pixel maps either to more than one texture element (texel) or less than one. These filter enums correspond to different strategies used to come up with a pixel color, by possibly referring to multiple neighbouring texels and taking a weighted average or simply using the nearest texel.</doc> <source-position filename="cogl/cogl/deprecated/cogl-material-compat.h" line="99"/> <member name="nearest" value="9728" c:identifier="COGL_MATERIAL_FILTER_NEAREST"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="66">Measuring in manhatten distance from the, current pixel center, use the nearest texture texel</doc> </member> <member name="linear" value="9729" c:identifier="COGL_MATERIAL_FILTER_LINEAR"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="68">Use the weighted average of the 4 texels nearest the current pixel center</doc> </member> <member name="nearest_mipmap_nearest" value="9984" c:identifier="COGL_MATERIAL_FILTER_NEAREST_MIPMAP_NEAREST"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="70">Select the mimap level whose texel size most closely matches the current pixel, and use the %COGL_MATERIAL_FILTER_NEAREST criterion</doc> </member> <member name="linear_mipmap_nearest" value="9985" c:identifier="COGL_MATERIAL_FILTER_LINEAR_MIPMAP_NEAREST"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="73">Select the mimap level whose texel size most closely matches the current pixel, and use the %COGL_MATERIAL_FILTER_LINEAR criterion</doc> </member> <member name="nearest_mipmap_linear" value="9986" c:identifier="COGL_MATERIAL_FILTER_NEAREST_MIPMAP_LINEAR"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="76">Select the two mimap levels whose texel size most closely matches the current pixel, use the %COGL_MATERIAL_FILTER_NEAREST criterion on each one and take their weighted average</doc> </member> <member name="linear_mipmap_linear" value="9987" c:identifier="COGL_MATERIAL_FILTER_LINEAR_MIPMAP_LINEAR"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="80">Select the two mimap levels whose texel size most closely matches the current pixel, use the %COGL_MATERIAL_FILTER_LINEAR criterion on each one and take their weighted average</doc> </member> </enumeration> <record name="MaterialLayer" c:type="CoglMaterialLayer" disguised="1"> <source-position filename="cogl/cogl/deprecated/cogl-material-compat.h" line="56"/> </record> <enumeration name="MaterialWrapMode" version="1.4" c:type="CoglMaterialWrapMode"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="102">The wrap mode specifies what happens when texture coordinates outside the range 0→1 are used. Note that if the filter mode is anything but %COGL_MATERIAL_FILTER_NEAREST then texels outside the range 0→1 might be used even when the coordinate is exactly 0 or 1 because OpenGL will try to sample neighbouring pixels. For example if you are trying to render the full texture then you may get artifacts around the edges when the pixels from the other side are merged in if the wrap mode is set to repeat.</doc> <source-position filename="cogl/cogl/deprecated/cogl-material-compat.h" line="141"/> <member name="repeat" value="10497" c:identifier="COGL_MATERIAL_WRAP_MODE_REPEAT"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="104">The texture will be repeated. This is useful for example to draw a tiled background.</doc> </member> <member name="clamp_to_edge" value="33071" c:identifier="COGL_MATERIAL_WRAP_MODE_CLAMP_TO_EDGE"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="106">The coordinates outside the range 0→1 will sample copies of the edge pixels of the texture. This is useful to avoid artifacts if only one copy of the texture is being rendered.</doc> </member> <member name="automatic" value="519" c:identifier="COGL_MATERIAL_WRAP_MODE_AUTOMATIC"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="110">Cogl will try to automatically decide which of the above two to use. For cogl_rectangle(), it will use repeat mode if any of the texture coordinates are outside the range 0→1, otherwise it will use clamp to edge. For cogl_polygon() it will always use repeat mode. For cogl_vertex_buffer_draw() it will use repeat mode except for layers that have point sprite coordinate generation enabled. This is the default value.</doc> </member> </enumeration> <function-macro name="OBJECT" c:identifier="COGL_OBJECT" introspectable="0"> <source-position filename="cogl/cogl/cogl-object.h" line="42"/> <parameters> <parameter name="X"> </parameter> </parameters> </function-macro> <class name="Object" c:symbol-prefix="object" c:type="CoglObject" abstract="1" glib:type-name="CoglObject" glib:get-type="cogl_object_get_gtype" glib:fundamental="1" glib:ref-func="cogl_object_ref" glib:unref-func="cogl_object_unref" glib:set-value-func="cogl_object_value_set_object" glib:get-value-func="cogl_object_value_get_object"> <function name="ref" c:identifier="cogl_object_ref" introspectable="0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="58">Increases the reference count of @object by 1</doc> <source-position filename="cogl/cogl/cogl-object.h" line="67"/> <return-value transfer-ownership="none" nullable="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="64">the @object, with its reference count increased</doc> <type name="gpointer" c:type="void*"/> </return-value> <parameters> <parameter name="object" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="60">a #CoglObject</doc> <type name="gpointer" c:type="void*"/> </parameter> </parameters> </function> <function name="unref" c:identifier="cogl_object_unref" introspectable="0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="69">Drecreases the reference count of @object by 1; if the reference count reaches 0, the resources allocated by @object will be freed</doc> <source-position filename="cogl/cogl/cogl-object.h" line="77"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="object" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="71">a #CoglObject</doc> <type name="gpointer" c:type="void*"/> </parameter> </parameters> </function> <method name="get_user_data" c:identifier="cogl_object_get_user_data" version="1.4" introspectable="0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="197">Finds the user data previously associated with @object using the given @key. If no user data has been associated with @object for the given @key this function returns NULL.</doc> <source-position filename="cogl/cogl/cogl-object.h" line="214"/> <return-value transfer-ownership="none" nullable="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="207">The user data previously associated with @object using the given @key; or %NULL if no associated data is found.</doc> <type name="gpointer" c:type="void*"/> </return-value> <parameters> <instance-parameter name="object" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="199">The object with associated private data to query</doc> <type name="Object" c:type="CoglObject*"/> </instance-parameter> <parameter name="key" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="200">The address of a #CoglUserDataKey which provides a unique value with which to index the private data.</doc> <type name="UserDataKey" c:type="CoglUserDataKey*"/> </parameter> </parameters> </method> <method name="set_user_data" c:identifier="cogl_object_set_user_data" version="1.4" introspectable="0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="174">Associates some private @user_data with a given #CoglObject. To later remove the association call cogl_object_set_user_data() with the same @key but NULL for the @user_data.</doc> <source-position filename="cogl/cogl/cogl-object.h" line="192"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="object" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="176">The object to associate private data with</doc> <type name="Object" c:type="CoglObject*"/> </instance-parameter> <parameter name="key" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="177">The address of a #CoglUserDataKey which provides a unique value with which to index the private data.</doc> <type name="UserDataKey" c:type="CoglUserDataKey*"/> </parameter> <parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="179">The data to associate with the given object, or %NULL to remove a previous association.</doc> <type name="gpointer" c:type="void*"/> </parameter> <parameter name="destroy" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="181">A #CoglUserDataDestroyCallback to call if the object is destroyed or if the association is removed by later setting %NULL data for the same key.</doc> <type name="UserDataDestroyCallback" c:type="CoglUserDataDestroyCallback"/> </parameter> </parameters> </method> </class> <class name="Offscreen" c:symbol-prefix="offscreen" c:type="CoglOffscreen" parent="Framebuffer" glib:type-name="CoglOffscreen" glib:get-type="cogl_offscreen_get_type" glib:type-struct="OffscreenClass"> <source-position filename="cogl/cogl/cogl-offscreen.h" line="57"/> <constructor name="new_with_texture" c:identifier="cogl_offscreen_new_with_texture"> <doc xml:space="preserve" filename="cogl/cogl/cogl-offscreen.h" line="61">This creates an offscreen framebuffer object using the given @texture as the primary color buffer. It doesn't just initialize the contents of the offscreen buffer with the @texture; they are tightly bound so that drawing to the offscreen buffer effectively updates the contents of the given texture. You don't need to destroy the offscreen buffer before you can use the @texture again. <note>This api only works with low-level #CoglTexture types such as #CoglTexture2D and not with meta-texture types such as #CoglTexture2DSliced.</note> The storage for the framebuffer is actually allocated lazily so this function will never return %NULL to indicate a runtime error. This means it is still possible to configure the framebuffer before it is really allocated. Simple applications without full error handling can simply rely on Cogl to lazily allocate the storage of framebuffers but you should be aware that if Cogl encounters an error (such as running out of GPU memory) then your application will simply abort with an error message. If you need to be able to catch such exceptions at runtime then you can explicitly allocate your framebuffer when you have finished configuring it by calling cogl_framebuffer_allocate() and passing in a #GError argument to catch any exceptions.</doc> <source-position filename="cogl/cogl/cogl-offscreen.h" line="94"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-offscreen.h" line="90">a newly instantiated #CoglOffscreen framebuffer.</doc> <type name="Offscreen" c:type="CoglOffscreen*"/> </return-value> <parameters> <parameter name="texture" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-offscreen.h" line="63">A #CoglTexture pointer</doc> <type name="Texture" c:type="CoglTexture*"/> </parameter> </parameters> </constructor> <method name="get_texture" c:identifier="cogl_offscreen_get_texture" introspectable="0"> <source-position filename="cogl/cogl/cogl-offscreen.h" line="100"/> <return-value> <type name="Texture" c:type="CoglTexture*"/> </return-value> <parameters> <instance-parameter name="offscreen" transfer-ownership="none"> <type name="Offscreen" c:type="CoglOffscreen*"/> </instance-parameter> </parameters> </method> </class> <record name="OffscreenClass" c:type="CoglOffscreenClass" glib:is-gtype-struct-for="Offscreen"> <source-position filename="cogl/cogl/cogl-offscreen.h" line="57"/> <field name="parent_class"> <type name="FramebufferClass" c:type="CoglFramebufferClass"/> </field> </record> <class name="Onscreen" c:symbol-prefix="onscreen" c:type="CoglOnscreen" parent="Framebuffer" glib:type-name="CoglOnscreen" glib:get-type="cogl_onscreen_get_type" glib:type-struct="OnscreenClass"> <source-position filename="cogl/cogl/cogl-onscreen.h" line="84"/> <virtual-method name="bind"> <source-position filename="cogl/cogl/cogl-onscreen.h" line="63"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="onscreen" transfer-ownership="none"> <type name="Onscreen" c:type="CoglOnscreen*"/> </instance-parameter> </parameters> </virtual-method> <virtual-method name="direct_scanout" invoker="direct_scanout" introspectable="0" throws="1"> <source-position filename="cogl/cogl/cogl-onscreen.h" line="77"/> <return-value transfer-ownership="none"> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="onscreen" transfer-ownership="none"> <type name="Onscreen" c:type="CoglOnscreen*"/> </instance-parameter> <parameter name="scanout" transfer-ownership="none"> <type name="Scanout" c:type="CoglScanout*"/> </parameter> <parameter name="info" transfer-ownership="none"> <type name="FrameInfo" c:type="CoglFrameInfo*"/> </parameter> <parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="2"> <type name="gpointer" c:type="gpointer"/> </parameter> </parameters> </virtual-method> <virtual-method name="get_buffer_age" invoker="get_buffer_age" version="1.14" stability="Stable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="178">Gets the current age of the buffer contents. This function allows applications to query the age of the current back buffer contents for a #CoglOnscreen as the number of frames elapsed since the contents were most recently defined. These age values exposes enough information to applications about how Cogl internally manages back buffers to allow applications to re-use the contents of old frames and minimize how much must be redrawn for the next frame. The back buffer contents can either be reported as invalid (has an age of 0) or it may be reported to be the same contents as from n frames prior to the current frame. The queried value remains valid until the next buffer swap. <note>One caveat is that under X11 the buffer age does not reflect changes to buffer contents caused by the window systems. X11 applications must track Expose events to determine what buffer regions need to additionally be repaired each frame.</note> The recommended way to take advantage of this buffer age api is to build up a circular buffer of length 3 for tracking damage regions over the last 3 frames and when starting a new frame look at the age of the buffer and combine the damage regions for the current frame with the damage regions of previous @age frames so you know everything that must be redrawn to update the old contents for the new frame. <note>If the system doesn't not support being able to track the age of back buffers then this function will always return 0 which implies that the contents are undefined.</note> <note>The %COGL_FEATURE_ID_BUFFER_AGE feature can optionally be explicitly checked to determine if Cogl is currently tracking the age of #CoglOnscreen back buffer contents. If this feature is missing then this function will always return 0.</note></doc> <source-position filename="cogl/cogl/cogl-onscreen.h" line="83"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="221">The age of the buffer contents or 0 when the buffer contents are undefined.</doc> <type name="gint" c:type="int"/> </return-value> <parameters> <instance-parameter name="onscreen" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="180">A #CoglOnscreen framebuffer</doc> <type name="Onscreen" c:type="CoglOnscreen*"/> </instance-parameter> </parameters> </virtual-method> <virtual-method name="swap_buffers_with_damage" invoker="swap_buffers_with_damage" version="1.16" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="230">Swaps the current back buffer being rendered too, to the front for display and provides information to any system compositor about what regions of the buffer have changed (damage) with respect to the last swapped buffer. This function has the same semantics as cogl_framebuffer_swap_buffers() except that it additionally allows applications to pass a list of damaged rectangles which may be passed on to a compositor so that it can minimize how much of the screen is redrawn in response to this applications newly swapped front buffer. For example if your application is only animating a small object in the corner of the screen and everything else is remaining static then it can help the compositor to know that only the bottom right corner of your newly swapped buffer has really changed with respect to your previously swapped front buffer. If @n_rectangles is 0 then the whole buffer will implicitly be reported as damaged as if cogl_onscreen_swap_buffers() had been called. This function also implicitly discards the contents of the color, depth and stencil buffers as if cogl_framebuffer_discard_buffers() were used. The significance of the discard is that you should not expect to be able to start a new frame that incrementally builds on the contents of the previous frame. If you want to perform incremental updates to older back buffers then please refer to the cogl_onscreen_get_buffer_age() api. Whenever possible it is recommended that applications use this function instead of cogl_onscreen_swap_buffers() to improve performance when running under a compositor. <note>It is highly recommended to use this API in conjunction with the cogl_onscreen_get_buffer_age() api so that your application can perform incremental rendering based on old back buffers.</note></doc> <source-position filename="cogl/cogl/cogl-onscreen.h" line="65"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="onscreen" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="232">A #CoglOnscreen framebuffer</doc> <type name="Onscreen" c:type="CoglOnscreen*"/> </instance-parameter> <parameter name="rectangles" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="233">An array of integer 4-tuples representing damaged rectangles as (x, y, width, height) tuples.</doc> <type name="gint" c:type="const int*"/> </parameter> <parameter name="n_rectangles" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="235">The number of 4-tuples to be read from @rectangles</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="info" transfer-ownership="none"> <type name="FrameInfo" c:type="CoglFrameInfo*"/> </parameter> <parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="3"> <type name="gpointer" c:type="gpointer"/> </parameter> </parameters> </virtual-method> <virtual-method name="swap_region" invoker="swap_region" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="302">Swaps a region of the back buffer being rendered too, to the front for display. @rectangles represents the region as array of @n_rectangles each defined by 4 sequential (x, y, width, height) integers. This function also implicitly discards the contents of the color, depth and stencil buffers as if cogl_framebuffer_discard_buffers() were used. The significance of the discard is that you should not expect to be able to start a new frame that incrementally builds on the contents of the previous frame.</doc> <source-position filename="cogl/cogl/cogl-onscreen.h" line="71"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="onscreen" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="304">A #CoglOnscreen framebuffer</doc> <type name="Onscreen" c:type="CoglOnscreen*"/> </instance-parameter> <parameter name="rectangles" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="305">An array of integer 4-tuples representing rectangles as (x, y, width, height) tuples.</doc> <type name="gint" c:type="const int*"/> </parameter> <parameter name="n_rectangles" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="307">The number of 4-tuples to be read from @rectangles</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="info" transfer-ownership="none"> <type name="FrameInfo" c:type="CoglFrameInfo*"/> </parameter> <parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="3"> <type name="gpointer" c:type="gpointer"/> </parameter> </parameters> </virtual-method> <method name="add_dirty_callback" c:identifier="cogl_onscreen_add_dirty_callback" version="1.16" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="538">Installs a @callback function that will be called whenever the window system has lost the contents of a region of the onscreen buffer and the application should redraw it to repair the buffer. For example this may happen in a window system without a compositor if a window that was previously covering up the onscreen window has been moved causing a region of the onscreen to be exposed. The @callback will be passed a #CoglOnscreenDirtyInfo struct which describes a rectangle containing the newly dirtied region. Note that this may be called multiple times to describe a non-rectangular region composed of multiple smaller rectangles. The dirty events are separate from %COGL_FRAME_EVENT_SYNC events so the application should also listen for this event before rendering the dirty region to ensure that the framebuffer is actually ready for rendering.</doc> <source-position filename="cogl/cogl/cogl-onscreen.h" line="569"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="563">a #CoglOnscreenDirtyClosure pointer that can be used to remove the callback and associated @user_data later.</doc> <type name="OnscreenDirtyClosure" c:type="CoglOnscreenDirtyClosure*"/> </return-value> <parameters> <instance-parameter name="onscreen" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="540">A #CoglOnscreen framebuffer</doc> <type name="Onscreen" c:type="CoglOnscreen*"/> </instance-parameter> <parameter name="callback" transfer-ownership="none" scope="notified" closure="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="541">A callback function to call for dirty events</doc> <type name="OnscreenDirtyCallback" c:type="CoglOnscreenDirtyCallback"/> </parameter> <parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="542">A private pointer to be passed to @callback</doc> <type name="gpointer" c:type="void*"/> </parameter> <parameter name="destroy" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="543">An optional callback to destroy @user_data when the @callback is removed or @onscreen is freed.</doc> <type name="UserDataDestroyCallback" c:type="CoglUserDataDestroyCallback"/> </parameter> </parameters> </method> <method name="add_frame_callback" c:identifier="cogl_onscreen_add_frame_callback" version="1.14" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="412">Installs a @callback function that will be called for significant events relating to the given @onscreen framebuffer. The @callback will be used to notify when the system compositor is ready for this application to render a new frame. In this case %COGL_FRAME_EVENT_SYNC will be passed as the event argument to the given @callback in addition to the #CoglFrameInfo corresponding to the frame being acknowledged by the compositor. The @callback will also be called to notify when the frame has ended. In this case %COGL_FRAME_EVENT_COMPLETE will be passed as the event argument to the given @callback in addition to the #CoglFrameInfo corresponding to the newly presented frame. The meaning of "ended" here simply means that no more timing information will be collected within the corresponding #CoglFrameInfo and so this is a good opportunity to analyse the given info. It does not necessarily mean that the GPU has finished rendering the corresponding frame. We highly recommend throttling your application according to %COGL_FRAME_EVENT_SYNC events so that your application can avoid wasting resources, drawing more frames than your system compositor can display.</doc> <source-position filename="cogl/cogl/cogl-onscreen.h" line="450"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="444">a #CoglFrameClosure pointer that can be used to remove the callback and associated @user_data later.</doc> <type name="FrameClosure" c:type="CoglFrameClosure*"/> </return-value> <parameters> <instance-parameter name="onscreen" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="414">A #CoglOnscreen framebuffer</doc> <type name="Onscreen" c:type="CoglOnscreen*"/> </instance-parameter> <parameter name="callback" transfer-ownership="none" scope="notified" closure="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="415">A callback function to call for frame events</doc> <type name="FrameCallback" c:type="CoglFrameCallback"/> </parameter> <parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="416">A private pointer to be passed to @callback</doc> <type name="gpointer" c:type="void*"/> </parameter> <parameter name="destroy" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="417">An optional callback to destroy @user_data when the @callback is removed or @onscreen is freed.</doc> <type name="UserDataDestroyCallback" c:type="CoglUserDataDestroyCallback"/> </parameter> </parameters> </method> <method name="add_frame_info" c:identifier="cogl_onscreen_add_frame_info" introspectable="0"> <source-position filename="cogl/cogl/cogl-onscreen.h" line="299"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="onscreen" transfer-ownership="none"> <type name="Onscreen" c:type="CoglOnscreen*"/> </instance-parameter> <parameter name="info" transfer-ownership="none"> <type name="FrameInfo" c:type="CoglFrameInfo*"/> </parameter> </parameters> </method> <method name="direct_scanout" c:identifier="cogl_onscreen_direct_scanout" introspectable="0" throws="1"> <source-position filename="cogl/cogl/cogl-onscreen.h" line="289"/> <return-value transfer-ownership="none"> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="onscreen" transfer-ownership="none"> <type name="Onscreen" c:type="CoglOnscreen*"/> </instance-parameter> <parameter name="scanout" transfer-ownership="none"> <type name="Scanout" c:type="CoglScanout*"/> </parameter> <parameter name="info" transfer-ownership="none"> <type name="FrameInfo" c:type="CoglFrameInfo*"/> </parameter> <parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1"> <type name="gpointer" c:type="gpointer"/> </parameter> </parameters> </method> <method name="get_buffer_age" c:identifier="cogl_onscreen_get_buffer_age" version="1.14" stability="Stable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="178">Gets the current age of the buffer contents. This function allows applications to query the age of the current back buffer contents for a #CoglOnscreen as the number of frames elapsed since the contents were most recently defined. These age values exposes enough information to applications about how Cogl internally manages back buffers to allow applications to re-use the contents of old frames and minimize how much must be redrawn for the next frame. The back buffer contents can either be reported as invalid (has an age of 0) or it may be reported to be the same contents as from n frames prior to the current frame. The queried value remains valid until the next buffer swap. <note>One caveat is that under X11 the buffer age does not reflect changes to buffer contents caused by the window systems. X11 applications must track Expose events to determine what buffer regions need to additionally be repaired each frame.</note> The recommended way to take advantage of this buffer age api is to build up a circular buffer of length 3 for tracking damage regions over the last 3 frames and when starting a new frame look at the age of the buffer and combine the damage regions for the current frame with the damage regions of previous @age frames so you know everything that must be redrawn to update the old contents for the new frame. <note>If the system doesn't not support being able to track the age of back buffers then this function will always return 0 which implies that the contents are undefined.</note> <note>The %COGL_FEATURE_ID_BUFFER_AGE feature can optionally be explicitly checked to determine if Cogl is currently tracking the age of #CoglOnscreen back buffer contents. If this feature is missing then this function will always return 0.</note></doc> <source-position filename="cogl/cogl/cogl-onscreen.h" line="228"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="221">The age of the buffer contents or 0 when the buffer contents are undefined.</doc> <type name="gint" c:type="int"/> </return-value> <parameters> <instance-parameter name="onscreen" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="180">A #CoglOnscreen framebuffer</doc> <type name="Onscreen" c:type="CoglOnscreen*"/> </instance-parameter> </parameters> </method> <method name="get_frame_counter" c:identifier="cogl_onscreen_get_frame_counter" version="1.14" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="594">Gets the value of the framebuffers frame counter. This is a counter that increases by one each time cogl_onscreen_swap_buffers() or cogl_onscreen_swap_region() is called.</doc> <source-position filename="cogl/cogl/cogl-onscreen.h" line="607"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="602">the current frame counter value</doc> <type name="gint64" c:type="int64_t"/> </return-value> <parameters> <instance-parameter name="onscreen" transfer-ownership="none"> <type name="Onscreen" c:type="CoglOnscreen*"/> </instance-parameter> </parameters> </method> <method name="hide" c:identifier="cogl_onscreen_hide" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="126">This requests to make @onscreen invisible to the user. Actually the precise semantics of this function depend on the window system currently in use, and if you don't have a multi-windowining system this function may in-fact do nothing. This function does not implicitly allocate the given @onscreen framebuffer before hiding it. <note>Since Cogl doesn't explicitly track the visibility status of onscreen framebuffers it won't try to avoid redundant window system requests e.g. to show an already visible window. This also means that it's acceptable to alternatively use native APIs to show and hide windows without confusing Cogl.</note></doc> <source-position filename="cogl/cogl/cogl-onscreen.h" line="149"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="onscreen" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="128">The onscreen framebuffer to make invisible</doc> <type name="Onscreen" c:type="CoglOnscreen*"/> </instance-parameter> </parameters> </method> <method name="remove_dirty_callback" c:identifier="cogl_onscreen_remove_dirty_callback" version="1.16" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="574">Removes a callback and associated user data that were previously registered using cogl_onscreen_add_dirty_callback(). If a destroy callback was passed to cogl_onscreen_add_dirty_callback() to destroy the user data then this will also get called.</doc> <source-position filename="cogl/cogl/cogl-onscreen.h" line="591"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="onscreen" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="576">A #CoglOnscreen</doc> <type name="Onscreen" c:type="CoglOnscreen*"/> </instance-parameter> <parameter name="closure" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="577">A #CoglOnscreenDirtyClosure returned from cogl_onscreen_add_dirty_callback()</doc> <type name="OnscreenDirtyClosure" c:type="CoglOnscreenDirtyClosure*"/> </parameter> </parameters> </method> <method name="remove_frame_callback" c:identifier="cogl_onscreen_remove_frame_callback" version="1.14" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="455">Removes a callback and associated user data that were previously registered using cogl_onscreen_add_frame_callback(). If a destroy callback was passed to cogl_onscreen_add_frame_callback() to destroy the user data then this will get called.</doc> <source-position filename="cogl/cogl/cogl-onscreen.h" line="472"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="onscreen" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="457">A #CoglOnscreen</doc> <type name="Onscreen" c:type="CoglOnscreen*"/> </instance-parameter> <parameter name="closure" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="458">A #CoglFrameClosure returned from cogl_onscreen_add_frame_callback()</doc> <type name="FrameClosure" c:type="CoglFrameClosure*"/> </parameter> </parameters> </method> <method name="show" c:identifier="cogl_onscreen_show" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="95">This requests to make @onscreen visible to the user. Actually the precise semantics of this function depend on the window system currently in use, and if you don't have a multi-windowining system this function may in-fact do nothing. This function will implicitly allocate the given @onscreen framebuffer before showing it if it hasn't already been allocated. When using the Wayland winsys calling this will set the surface to a toplevel type which will make it appear. If the application wants to set a different type for the surface, it can avoid calling cogl_onscreen_show() and set its own type directly with the Wayland client API via cogl_wayland_onscreen_get_surface(). <note>Since Cogl doesn't explicitly track the visibility status of onscreen framebuffers it won't try to avoid redundant window system requests e.g. to show an already visible window. This also means that it's acceptable to alternatively use native APIs to show and hide windows without confusing Cogl.</note></doc> <source-position filename="cogl/cogl/cogl-onscreen.h" line="124"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="onscreen" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="97">The onscreen framebuffer to make visible</doc> <type name="Onscreen" c:type="CoglOnscreen*"/> </instance-parameter> </parameters> </method> <method name="swap_buffers" c:identifier="cogl_onscreen_swap_buffers" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="151">Swaps the current back buffer being rendered too, to the front for display. This function also implicitly discards the contents of the color, depth and stencil buffers as if cogl_framebuffer_discard_buffers() were used. The significance of the discard is that you should not expect to be able to start a new frame that incrementally builds on the contents of the previous frame. <note>It is highly recommended that applications use cogl_onscreen_swap_buffers_with_damage() instead whenever possible and also use the cogl_onscreen_get_buffer_age() api so they can perform incremental updates to older buffers instead of having to render a full buffer for every frame.</note></doc> <source-position filename="cogl/cogl/cogl-onscreen.h" line="173"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="onscreen" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="153">A #CoglOnscreen framebuffer</doc> <type name="Onscreen" c:type="CoglOnscreen*"/> </instance-parameter> <parameter name="frame_info" transfer-ownership="none"> <type name="FrameInfo" c:type="CoglFrameInfo*"/> </parameter> <parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1"> <type name="gpointer" c:type="gpointer"/> </parameter> </parameters> </method> <method name="swap_buffers_with_damage" c:identifier="cogl_onscreen_swap_buffers_with_damage" version="1.16" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="230">Swaps the current back buffer being rendered too, to the front for display and provides information to any system compositor about what regions of the buffer have changed (damage) with respect to the last swapped buffer. This function has the same semantics as cogl_framebuffer_swap_buffers() except that it additionally allows applications to pass a list of damaged rectangles which may be passed on to a compositor so that it can minimize how much of the screen is redrawn in response to this applications newly swapped front buffer. For example if your application is only animating a small object in the corner of the screen and everything else is remaining static then it can help the compositor to know that only the bottom right corner of your newly swapped buffer has really changed with respect to your previously swapped front buffer. If @n_rectangles is 0 then the whole buffer will implicitly be reported as damaged as if cogl_onscreen_swap_buffers() had been called. This function also implicitly discards the contents of the color, depth and stencil buffers as if cogl_framebuffer_discard_buffers() were used. The significance of the discard is that you should not expect to be able to start a new frame that incrementally builds on the contents of the previous frame. If you want to perform incremental updates to older back buffers then please refer to the cogl_onscreen_get_buffer_age() api. Whenever possible it is recommended that applications use this function instead of cogl_onscreen_swap_buffers() to improve performance when running under a compositor. <note>It is highly recommended to use this API in conjunction with the cogl_onscreen_get_buffer_age() api so that your application can perform incremental rendering based on old back buffers.</note></doc> <source-position filename="cogl/cogl/cogl-onscreen.h" line="279"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="onscreen" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="232">A #CoglOnscreen framebuffer</doc> <type name="Onscreen" c:type="CoglOnscreen*"/> </instance-parameter> <parameter name="rectangles" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="233">An array of integer 4-tuples representing damaged rectangles as (x, y, width, height) tuples.</doc> <type name="gint" c:type="const int*"/> </parameter> <parameter name="n_rectangles" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="235">The number of 4-tuples to be read from @rectangles</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="info" transfer-ownership="none"> <type name="FrameInfo" c:type="CoglFrameInfo*"/> </parameter> <parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1"> <type name="gpointer" c:type="gpointer"/> </parameter> </parameters> </method> <method name="swap_region" c:identifier="cogl_onscreen_swap_region" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="302">Swaps a region of the back buffer being rendered too, to the front for display. @rectangles represents the region as array of @n_rectangles each defined by 4 sequential (x, y, width, height) integers. This function also implicitly discards the contents of the color, depth and stencil buffers as if cogl_framebuffer_discard_buffers() were used. The significance of the discard is that you should not expect to be able to start a new frame that incrementally builds on the contents of the previous frame.</doc> <source-position filename="cogl/cogl/cogl-onscreen.h" line="323"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="onscreen" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="304">A #CoglOnscreen framebuffer</doc> <type name="Onscreen" c:type="CoglOnscreen*"/> </instance-parameter> <parameter name="rectangles" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="305">An array of integer 4-tuples representing rectangles as (x, y, width, height) tuples.</doc> <type name="gint" c:type="const int*"/> </parameter> <parameter name="n_rectangles" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="307">The number of 4-tuples to be read from @rectangles</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="info" transfer-ownership="none"> <type name="FrameInfo" c:type="CoglFrameInfo*"/> </parameter> <parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1"> <type name="gpointer" c:type="gpointer"/> </parameter> </parameters> </method> <field name="parent_instance"> <type name="Framebuffer" c:type="CoglFramebuffer"/> </field> </class> <record name="OnscreenClass" c:type="CoglOnscreenClass" glib:is-gtype-struct-for="Onscreen"> <source-position filename="cogl/cogl/cogl-onscreen.h" line="84"/> <field name="parent_class" readable="0" private="1"> <type name="FramebufferClass" c:type="CoglFramebufferClass"/> </field> <field name="bind"> <callback name="bind"> <source-position filename="cogl/cogl/cogl-onscreen.h" line="63"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="onscreen" transfer-ownership="none"> <type name="Onscreen" c:type="CoglOnscreen*"/> </parameter> </parameters> </callback> </field> <field name="swap_buffers_with_damage"> <callback name="swap_buffers_with_damage"> <source-position filename="cogl/cogl/cogl-onscreen.h" line="65"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="onscreen" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="232">A #CoglOnscreen framebuffer</doc> <type name="Onscreen" c:type="CoglOnscreen*"/> </parameter> <parameter name="rectangles" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="233">An array of integer 4-tuples representing damaged rectangles as (x, y, width, height) tuples.</doc> <type name="gint" c:type="const int*"/> </parameter> <parameter name="n_rectangles" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="235">The number of 4-tuples to be read from @rectangles</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="info" transfer-ownership="none"> <type name="FrameInfo" c:type="CoglFrameInfo*"/> </parameter> <parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="4"> <type name="gpointer" c:type="gpointer"/> </parameter> </parameters> </callback> </field> <field name="swap_region"> <callback name="swap_region"> <source-position filename="cogl/cogl/cogl-onscreen.h" line="71"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="onscreen" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="304">A #CoglOnscreen framebuffer</doc> <type name="Onscreen" c:type="CoglOnscreen*"/> </parameter> <parameter name="rectangles" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="305">An array of integer 4-tuples representing rectangles as (x, y, width, height) tuples.</doc> <type name="gint" c:type="const int*"/> </parameter> <parameter name="n_rectangles" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="307">The number of 4-tuples to be read from @rectangles</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="info" transfer-ownership="none"> <type name="FrameInfo" c:type="CoglFrameInfo*"/> </parameter> <parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="4"> <type name="gpointer" c:type="gpointer"/> </parameter> </parameters> </callback> </field> <field name="direct_scanout"> <callback name="direct_scanout" throws="1"> <source-position filename="cogl/cogl/cogl-onscreen.h" line="77"/> <return-value transfer-ownership="none"> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="onscreen" transfer-ownership="none"> <type name="Onscreen" c:type="CoglOnscreen*"/> </parameter> <parameter name="scanout" transfer-ownership="none"> <type name="Scanout" c:type="CoglScanout*"/> </parameter> <parameter name="info" transfer-ownership="none"> <type name="FrameInfo" c:type="CoglFrameInfo*"/> </parameter> <parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="3"> <type name="gpointer" c:type="gpointer"/> </parameter> </parameters> </callback> </field> <field name="get_buffer_age"> <callback name="get_buffer_age"> <source-position filename="cogl/cogl/cogl-onscreen.h" line="83"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="221">The age of the buffer contents or 0 when the buffer contents are undefined.</doc> <type name="gint" c:type="int"/> </return-value> <parameters> <parameter name="onscreen" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="180">A #CoglOnscreen framebuffer</doc> <type name="Onscreen" c:type="CoglOnscreen*"/> </parameter> </parameters> </callback> </field> </record> <callback name="OnscreenDirtyCallback" c:type="CoglOnscreenDirtyCallback" version="1.16" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="497">Is a callback that can be registered via cogl_onscreen_add_dirty_callback() to be called when the windowing system determines that a region of the onscreen window has been lost and the application should redraw it.</doc> <source-position filename="cogl/cogl/cogl-onscreen.h" line="513"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="onscreen" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="499">The onscreen that the frame is associated with</doc> <type name="Onscreen" c:type="CoglOnscreen*"/> </parameter> <parameter name="info" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="500">A #CoglOnscreenDirtyInfo struct containing the details of the dirty area</doc> <type name="OnscreenDirtyInfo" c:type="const CoglOnscreenDirtyInfo*"/> </parameter> <parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="2"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="502">The user pointer passed to cogl_onscreen_add_frame_callback()</doc> <type name="gpointer" c:type="void*"/> </parameter> </parameters> </callback> <record name="OnscreenDirtyClosure" c:type="CoglOnscreenDirtyClosure" version="1.16" stability="Unstable" glib:type-name="CoglOnscreenDirtyClosure" glib:get-type="cogl_onscreen_dirty_closure_get_gtype" c:symbol-prefix="onscreen_dirty_closure"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="517">An opaque type that tracks a #CoglOnscreenDirtyCallback and associated user data. A #CoglOnscreenDirtyClosure pointer will be returned from cogl_onscreen_add_dirty_callback() and it allows you to remove a callback later using cogl_onscreen_remove_dirty_callback().</doc> <source-position filename="cogl/cogl/cogl-onscreen.h" line="528"/> </record> <record name="OnscreenDirtyInfo" c:type="CoglOnscreenDirtyInfo" version="1.16" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="475">A structure passed to callbacks registered using cogl_onscreen_add_dirty_callback(). The members describe a rectangle within the onscreen buffer that should be redrawn.</doc> <source-position filename="cogl/cogl/cogl-onscreen.h" line="495"/> <field name="x" writable="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="477">Left edge of the dirty rectangle</doc> <type name="gint" c:type="int"/> </field> <field name="y" writable="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="478">Top edge of the dirty rectangle, measured from the top of the window</doc> <type name="gint" c:type="int"/> </field> <field name="width" writable="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="479">Width of the dirty rectangle</doc> <type name="gint" c:type="int"/> </field> <field name="height" writable="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-onscreen.h" line="480">Height of the dirty rectangle</doc> <type name="gint" c:type="int"/> </field> </record> <function-macro name="PIPELINE" c:identifier="COGL_PIPELINE" introspectable="0"> <source-position filename="cogl/cogl/cogl-pipeline.h" line="65"/> <parameters> <parameter name="OBJECT"> </parameter> </parameters> </function-macro> <function-macro name="PIXEL_FORMAT_CAN_HAVE_PREMULT" c:identifier="COGL_PIXEL_FORMAT_CAN_HAVE_PREMULT" introspectable="0"> <source-position filename="cogl/cogl/cogl-pixel-format.h" line="313"/> <parameters> <parameter name="format"> </parameter> </parameters> </function-macro> <constant name="PIXEL_FORMAT_MAX_PLANES" value="4" c:type="COGL_PIXEL_FORMAT_MAX_PLANES"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="255">The maximum number of planes of a pixel format (see also cogl_pixel_format_get_planes()).</doc> <source-position filename="cogl/cogl/cogl-pixel-format.h" line="261"/> <type name="gint" c:type="gint"/> </constant> <constant name="PREMULT_BIT" value="128" c:type="COGL_PREMULT_BIT"> <source-position filename="cogl/cogl/cogl-pixel-format.h" line="67"/> <type name="gint" c:type="gint"/> </constant> <function-macro name="PRIMITIVE_TEXTURE" c:identifier="COGL_PRIMITIVE_TEXTURE" introspectable="0"> <source-position filename="cogl/cogl/deprecated/cogl-type-casts.h" line="51"/> <parameters> <parameter name="X"> </parameter> </parameters> </function-macro> <function-macro name="PRIVATE" c:identifier="COGL_PRIVATE" introspectable="0"> <source-position filename="cogl/cogl/cogl-types.h" line="62"/> <parameters> <parameter name="x"> </parameter> </parameters> </function-macro> <class name="Pipeline" c:symbol-prefix="pipeline" c:type="CoglPipeline" parent="Object" glib:type-name="CoglPipeline" glib:get-type="cogl_pipeline_get_gtype" glib:fundamental="1"> <constructor name="new" c:identifier="cogl_pipeline_new" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline.h" line="75">Allocates and initializes a default simple pipeline that will color a primitive white.</doc> <source-position filename="cogl/cogl/cogl-pipeline.h" line="88"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline.h" line="82">a pointer to a new #CoglPipeline</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </return-value> <parameters> <parameter name="context" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline.h" line="77">a #CoglContext</doc> <type name="Context" c:type="CoglContext*"/> </parameter> </parameters> </constructor> <method name="add_layer_snippet" c:identifier="cogl_pipeline_add_layer_snippet" version="1.10" introspectable="0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="550">Adds a shader snippet that will hook on to the given layer of the pipeline. The exact part of the pipeline that the snippet wraps around depends on the hook that is given to cogl_snippet_new(). Note that some hooks can't be used with a layer and need to be added with cogl_pipeline_add_snippet() instead.</doc> <source-position filename="cogl/cogl/cogl-pipeline-layer-state.h" line="566"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="552">A #CoglPipeline</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="layer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="553">The layer to hook the snippet to</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="snippet" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="554">A #CoglSnippet</doc> <type c:type="CoglSnippet*"/> </parameter> </parameters> </method> <method name="add_snippet" c:identifier="cogl_pipeline_add_snippet" version="1.10" introspectable="0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="733">Adds a shader snippet to @pipeline. The snippet will wrap around or replace some part of the pipeline as defined by the hook point in @snippet. Note that some hook points are specific to a layer and must be added with cogl_pipeline_add_layer_snippet() instead.</doc> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="747"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="735">A #CoglPipeline</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="snippet" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="736">The #CoglSnippet to add to the vertex processing hook</doc> <type c:type="CoglSnippet*"/> </parameter> </parameters> </method> <method name="copy" c:identifier="cogl_pipeline_copy" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline.h" line="90">Creates a new pipeline with the configuration copied from the source pipeline. We would strongly advise developers to always aim to use cogl_pipeline_copy() instead of cogl_pipeline_new() whenever there will be any similarity between two pipelines. Copying a pipeline helps Cogl keep track of a pipelines ancestry which we may use to help minimize GPU state changes.</doc> <source-position filename="cogl/cogl/cogl-pipeline.h" line="109"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline.h" line="103">a pointer to the newly allocated #CoglPipeline</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </return-value> <parameters> <instance-parameter name="source" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline.h" line="92">a #CoglPipeline object to copy</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> </parameters> </method> <method name="foreach_layer" c:identifier="cogl_pipeline_foreach_layer" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline.h" line="142">Iterates all the layer indices of the given @pipeline.</doc> <source-position filename="cogl/cogl/cogl-pipeline.h" line="156"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline.h" line="144">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="callback" transfer-ownership="none" scope="call" closure="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline.h" line="145">A #CoglPipelineLayerCallback to be called for each layer index</doc> <type name="PipelineLayerCallback" c:type="CoglPipelineLayerCallback"/> </parameter> <parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline.h" line="147">Private data that will be passed to the callback</doc> <type name="gpointer" c:type="void*"/> </parameter> </parameters> </method> <method name="get_alpha_test_function" c:identifier="cogl_pipeline_get_alpha_test_function" version="2.0" stability="Unstable"> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="191"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="185">The alpha test function of @pipeline.</doc> <type name="PipelineAlphaFunc" c:type="CoglPipelineAlphaFunc"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="183">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> </parameters> </method> <method name="get_alpha_test_reference" c:identifier="cogl_pipeline_get_alpha_test_reference" version="2.0" stability="Unstable"> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="203"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="197">The alpha test reference value of @pipeline.</doc> <type name="gfloat" c:type="float"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="195">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> </parameters> </method> <method name="get_color" c:identifier="cogl_pipeline_get_color" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="109">Retrieves the current pipeline color.</doc> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="120"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="111">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="color" direction="out" caller-allocates="1" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="112">The location to store the color</doc> <type name="Color" c:type="CoglColor*"/> </parameter> </parameters> </method> <method name="get_cull_face_mode" c:identifier="cogl_pipeline_get_cull_face_mode" version="2.0"> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="541"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="534">the cull face mode that was previously set with cogl_pipeline_set_cull_face_mode(). Status: Unstable</doc> <type name="PipelineCullFaceMode" c:type="CoglPipelineCullFaceMode"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> </parameters> </method> <method name="get_depth_state" c:identifier="cogl_pipeline_get_depth_state" version="2.0" introspectable="0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="472">Retrieves the current depth state configuration for the given @pipeline as previously set using cogl_pipeline_set_depth_state().</doc> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="484"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="474">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="state_out" direction="out" caller-allocates="0" transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="475">A destination #CoglDepthState struct</doc> <type c:type="CoglDepthState*"/> </parameter> </parameters> </method> <method name="get_front_face_winding" c:identifier="cogl_pipeline_get_front_face_winding" version="2.0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="563">The order of the vertices within a primitive specifies whether it is considered to be front or back facing. This function specifies which order is considered to be the front faces. %COGL_WINDING_COUNTER_CLOCKWISE sets the front faces to primitives with vertices in a counter-clockwise order and %COGL_WINDING_CLOCKWISE sets them to be clockwise. The default is %COGL_WINDING_COUNTER_CLOCKWISE.</doc> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="581"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="575">The @pipeline front face winding Status: Unstable</doc> <type name="Winding" c:type="CoglWinding"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="565">a #CoglPipeline</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> </parameters> </method> <method name="get_layer_mag_filter" c:identifier="cogl_pipeline_get_layer_mag_filter" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="399">Retrieves the currently set magnification #CoglPipelineFilter set on the specified layer. The magnification filter determines how the layer should be sampled when up-scaled. The default filter is %COGL_PIPELINE_FILTER_LINEAR but this can be changed using cogl_pipeline_set_layer_filters().</doc> <source-position filename="cogl/cogl/cogl-pipeline-layer-state.h" line="417"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="411">The magnification #CoglPipelineFilter for the specified layer.</doc> <type name="PipelineFilter" c:type="CoglPipelineFilter"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="401">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="layer_index" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="402">the layer number to change.</doc> <type name="gint" c:type="int"/> </parameter> </parameters> </method> <method name="get_layer_min_filter" c:identifier="cogl_pipeline_get_layer_min_filter" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="378">Retrieves the currently set minification #CoglPipelineFilter set on the specified layer. The miniifcation filter determines how the layer should be sampled when down-scaled. The default filter is %COGL_PIPELINE_FILTER_LINEAR but this can be changed using cogl_pipeline_set_layer_filters().</doc> <source-position filename="cogl/cogl/cogl-pipeline-layer-state.h" line="396"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="390">The minification #CoglPipelineFilter for the specified layer.</doc> <type name="PipelineFilter" c:type="CoglPipelineFilter"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="380">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="layer_index" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="381">the layer number to change.</doc> <type name="gint" c:type="int"/> </parameter> </parameters> </method> <method name="get_layer_point_sprite_coords_enabled" c:identifier="cogl_pipeline_get_layer_point_sprite_coords_enabled" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="444">Gets whether point sprite coordinate generation is enabled for this texture layer.</doc> <source-position filename="cogl/cogl/cogl-pipeline-layer-state.h" line="459"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="452">whether the texture coordinates will be replaced with point sprite coordinates.</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="446">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="layer_index" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="447">the layer number to check.</doc> <type name="gint" c:type="int"/> </parameter> </parameters> </method> <method name="get_layer_texture" c:identifier="cogl_pipeline_get_layer_texture" version="1.10" stability="Unstable"> <source-position filename="cogl/cogl/cogl-pipeline-layer-state.h" line="189"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="183">the texture that was set for the given layer of the pipeline or %NULL if no texture was set.</doc> <type name="Texture" c:type="CoglTexture*"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="180">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="layer_index" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="181">the index of the layer</doc> <type name="gint" c:type="int"/> </parameter> </parameters> </method> <method name="get_layer_wrap_mode_s" c:identifier="cogl_pipeline_get_layer_wrap_mode_s" version="1.6" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="462">Returns the wrap mode for the 's' coordinate of texture lookups on this layer.</doc> <source-position filename="cogl/cogl/cogl-pipeline-layer-state.h" line="477"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="470">the wrap mode for the 's' coordinate of texture lookups on this layer.</doc> <type name="PipelineWrapMode" c:type="CoglPipelineWrapMode"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="464">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="layer_index" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="465">the layer number to change.</doc> <type name="gint" c:type="int"/> </parameter> </parameters> </method> <method name="get_layer_wrap_mode_t" c:identifier="cogl_pipeline_get_layer_wrap_mode_t" version="1.6" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="496">Returns the wrap mode for the 't' coordinate of texture lookups on this layer.</doc> <source-position filename="cogl/cogl/cogl-pipeline-layer-state.h" line="511"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="504">the wrap mode for the 't' coordinate of texture lookups on this layer.</doc> <type name="PipelineWrapMode" c:type="CoglPipelineWrapMode"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="498">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="layer_index" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="499">the layer number to change.</doc> <type name="gint" c:type="int"/> </parameter> </parameters> </method> <method name="get_n_layers" c:identifier="cogl_pipeline_get_n_layers" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="340">Retrieves the number of layers defined for the given @pipeline</doc> <source-position filename="cogl/cogl/cogl-pipeline-layer-state.h" line="352"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="346">the number of layers</doc> <type name="gint" c:type="int"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="342">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> </parameters> </method> <method name="get_per_vertex_point_size" c:identifier="cogl_pipeline_get_per_vertex_point_size" version="2.0" stability="Unstable"> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="384"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="379">%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().</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="375">a #CoglPipeline pointer</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> </parameters> </method> <method name="get_point_size" c:identifier="cogl_pipeline_get_point_size" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="332">Get the size of points drawn when %COGL_VERTICES_MODE_POINTS is used with the vertex buffer API.</doc> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="345"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="339">the point size of the @pipeline.</doc> <type name="gfloat" c:type="float"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="334">a #CoglPipeline pointer</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> </parameters> </method> <method name="get_uniform_location" c:identifier="cogl_pipeline_get_uniform_location" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline.h" line="160">This is used to get an integer representing the uniform with the name @uniform_name. The integer can be passed to functions such as cogl_pipeline_set_uniform_1f() to set the value of a uniform. This function will always return a valid integer. Ie, unlike OpenGL, it does not return -1 if the uniform is not available in this pipeline so it can not be used to test whether uniforms are present. It is not necessary to set the program on the pipeline before calling this function.</doc> <source-position filename="cogl/cogl/cogl-pipeline.h" line="181"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline.h" line="175">A integer representing the location of the given uniform.</doc> <type name="gint" c:type="int"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline.h" line="162">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="uniform_name" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline.h" line="163">The name of a uniform</doc> <type name="utf8" c:type="const char*"/> </parameter> </parameters> </method> <method name="get_user_program" c:identifier="cogl_pipeline_get_user_program" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="386">Queries what user program has been associated with the given @pipeline using cogl_pipeline_set_user_program().</doc> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="399"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="393">The current user program or %NULL.</doc> <type name="Handle" c:type="CoglHandle"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="388">a #CoglPipeline object.</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> </parameters> </method> <method name="remove_layer" c:identifier="cogl_pipeline_remove_layer" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="192">This function removes a layer from your pipeline</doc> <source-position filename="cogl/cogl/cogl-pipeline-layer-state.h" line="202"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="194">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="layer_index" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="195">Specifies the layer you want to remove</doc> <type name="gint" c:type="int"/> </parameter> </parameters> </method> <method name="set_alpha_test_function" c:identifier="cogl_pipeline_set_alpha_test_function" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="158">Before a primitive is blended with the framebuffer, it goes through an alpha test stage which lets you discard fragments based on the current alpha value. This function lets you change the function used to evaluate the alpha channel, and thus determine which fragments are discarded and which continue on to the blending stage. The default is %COGL_PIPELINE_ALPHA_FUNC_ALWAYS</doc> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="177"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="160">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="alpha_func" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="161">A @CoglPipelineAlphaFunc constant</doc> <type name="PipelineAlphaFunc" c:type="CoglPipelineAlphaFunc"/> </parameter> <parameter name="alpha_reference" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="162">A reference point that the chosen alpha function uses to compare incoming fragments to.</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="set_blend" c:identifier="cogl_pipeline_set_blend" version="2.0" stability="Unstable" throws="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="205">If not already familiar; please refer <link linkend="cogl-Blend-Strings">here</link> for an overview of what blend strings are, and their syntax. Blending occurs after the alpha test function, and combines fragments with the framebuffer. Currently the only blend function Cogl exposes is ADD(). So any valid blend statements will be of the form: |[ &lt;channel-mask&gt;=ADD(SRC_COLOR*(&lt;factor&gt;), DST_COLOR*(&lt;factor&gt;)) ]| This is the list of source-names usable as blend factors: <itemizedlist> <listitem><para>SRC_COLOR: The color of the incoming fragment</para></listitem> <listitem><para>DST_COLOR: The color of the framebuffer</para></listitem> <listitem><para>CONSTANT: The constant set via cogl_pipeline_set_blend_constant()</para></listitem> </itemizedlist> The source names can be used according to the <link linkend="cogl-Blend-String-syntax">color-source and factor syntax</link>, so for example "(1-SRC_COLOR[A])" would be a valid factor, as would "(CONSTANT[RGB])" These can also be used as factors: <itemizedlist> <listitem>0: (0, 0, 0, 0)</listitem> <listitem>1: (1, 1, 1, 1)</listitem> <listitem>SRC_ALPHA_SATURATE_FACTOR: (f,f,f,1) where f = MIN(SRC_COLOR[A],1-DST_COLOR[A])</listitem> </itemizedlist> <note>Remember; all color components are normalized to the range [0, 1] before computing the result of blending.</note> <example id="cogl-Blend-Strings-blend-unpremul"> <title>Blend Strings/1</title> <para>Blend a non-premultiplied source over a destination with premultiplied alpha:</para> <programlisting> "RGB = ADD(SRC_COLOR*(SRC_COLOR[A]), DST_COLOR*(1-SRC_COLOR[A]))" "A = ADD(SRC_COLOR, DST_COLOR*(1-SRC_COLOR[A]))" </programlisting> </example> <example id="cogl-Blend-Strings-blend-premul"> <title>Blend Strings/2</title> <para>Blend a premultiplied source over a destination with premultiplied alpha</para> <programlisting> "RGBA = ADD(SRC_COLOR, DST_COLOR*(1-SRC_COLOR[A]))" </programlisting> </example> The default blend string is: |[ RGBA = ADD (SRC_COLOR, DST_COLOR*(1-SRC_COLOR[A])) ]| That gives normal alpha-blending when the calculated color for the pipeline is in premultiplied form.</doc> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="288"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="279">%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).</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="207">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="blend_string" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="208">A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired blend function.</doc> <type name="utf8" c:type="const char*"/> </parameter> </parameters> </method> <method name="set_blend_constant" c:identifier="cogl_pipeline_set_blend_constant" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="292">When blending is setup to reference a CONSTANT blend factor then blending will depend on the constant set with this function.</doc> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="304"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="294">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="constant_color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="295">The constant color you want</doc> <type name="Color" c:type="const CoglColor*"/> </parameter> </parameters> </method> <method name="set_color" c:identifier="cogl_pipeline_set_color" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="44">Sets the basic color of the pipeline, used when no lighting is enabled. Note that if you don't add any layers to the pipeline then the color will be blended unmodified with the destination; the default blend expects premultiplied colors: for example, use (0.5, 0.0, 0.0, 0.5) for semi-transparent red. See cogl_color_premultiply(). The default value is (1.0, 1.0, 1.0, 1.0)</doc> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="62"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="46">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="color" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="47">The components of the color</doc> <type name="Color" c:type="const CoglColor*"/> </parameter> </parameters> </method> <method name="set_color4f" c:identifier="cogl_pipeline_set_color4f" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="87">Sets the basic color of the pipeline, used when no lighting is enabled. The default value is (1.0, 1.0, 1.0, 1.0)</doc> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="103"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="89">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="red" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="90">The red component</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="green" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="91">The green component</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="blue" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="92">The blue component</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="alpha" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="93">The alpha component</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="set_color4ub" c:identifier="cogl_pipeline_set_color4ub" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="65">Sets the basic color of the pipeline, used when no lighting is enabled. The default value is (0xff, 0xff, 0xff, 0xff)</doc> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="81"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="67">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="red" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="68">The red component</doc> <type name="guint8" c:type="uint8_t"/> </parameter> <parameter name="green" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="69">The green component</doc> <type name="guint8" c:type="uint8_t"/> </parameter> <parameter name="blue" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="70">The blue component</doc> <type name="guint8" c:type="uint8_t"/> </parameter> <parameter name="alpha" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="71">The alpha component</doc> <type name="guint8" c:type="uint8_t"/> </parameter> </parameters> </method> <method name="set_cull_face_mode" c:identifier="cogl_pipeline_set_cull_face_mode" version="2.0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="506">Sets which faces will be culled when drawing. Face culling can be used to increase efficiency by avoiding drawing faces that would get overridden. For example, if a model has gaps so that it is impossible to see the inside then faces which are facing away from the screen will never be seen so there is no point in drawing them. This can be achieved by setting the cull face mode to %COGL_PIPELINE_CULL_FACE_MODE_BACK. Face culling relies on the primitives being drawn with a specific order to represent which faces are facing inside and outside the model. This order can be specified by calling cogl_pipeline_set_front_face_winding(). Status: Unstable</doc> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="528"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="508">A #CoglPipeline</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="cull_face_mode" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="509">The new mode to set</doc> <type name="PipelineCullFaceMode" c:type="CoglPipelineCullFaceMode"/> </parameter> </parameters> </method> <method name="set_depth_state" c:identifier="cogl_pipeline_set_depth_state" version="2.0" introspectable="0" stability="Unstable" throws="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="447">This commits all the depth state configured in @state struct to the given @pipeline. The configuration values are copied into the pipeline so there is no requirement to keep the #CoglDepthState struct around if you don't need it any more. Note: Since some platforms do not support the depth range feature it is possible for this function to fail and report an @error.</doc> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="468"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="461">TRUE if the GPU supports all the given @state else %FALSE and returns an @error.</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="449">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="state" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="450">A #CoglDepthState struct</doc> <type c:type="const CoglDepthState*"/> </parameter> </parameters> </method> <method name="set_front_face_winding" c:identifier="cogl_pipeline_set_front_face_winding" version="2.0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="543">The order of the vertices within a primitive specifies whether it is considered to be front or back facing. This function specifies which order is considered to be the front faces. %COGL_WINDING_COUNTER_CLOCKWISE sets the front faces to primitives with vertices in a counter-clockwise order and %COGL_WINDING_CLOCKWISE sets them to be clockwise. The default is %COGL_WINDING_COUNTER_CLOCKWISE. Status: Unstable</doc> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="560"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="545">a #CoglPipeline</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="front_winding" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="546">the winding order</doc> <type name="Winding" c:type="CoglWinding"/> </parameter> </parameters> </method> <method name="set_layer_combine" c:identifier="cogl_pipeline_set_layer_combine" version="2.0" stability="Unstable" throws="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="205">If not already familiar; you can refer <link linkend="cogl-Blend-Strings">here</link> for an overview of what blend strings are and there syntax. These are all the functions available for texture combining: <itemizedlist> <listitem>REPLACE(arg0) = arg0</listitem> <listitem>MODULATE(arg0, arg1) = arg0 x arg1</listitem> <listitem>ADD(arg0, arg1) = arg0 + arg1</listitem> <listitem>ADD_SIGNED(arg0, arg1) = arg0 + arg1 - 0.5</listitem> <listitem>INTERPOLATE(arg0, arg1, arg2) = arg0 x arg2 + arg1 x (1 - arg2)</listitem> <listitem>SUBTRACT(arg0, arg1) = arg0 - arg1</listitem> <listitem> <programlisting> DOT3_RGB(arg0, arg1) = 4 x ((arg0[R] - 0.5)) * (arg1[R] - 0.5) + (arg0[G] - 0.5)) * (arg1[G] - 0.5) + (arg0[B] - 0.5)) * (arg1[B] - 0.5)) </programlisting> </listitem> <listitem> <programlisting> DOT3_RGBA(arg0, arg1) = 4 x ((arg0[R] - 0.5)) * (arg1[R] - 0.5) + (arg0[G] - 0.5)) * (arg1[G] - 0.5) + (arg0[B] - 0.5)) * (arg1[B] - 0.5)) </programlisting> </listitem> </itemizedlist> Refer to the <link linkend="cogl-Blend-String-syntax">color-source syntax</link> for describing the arguments. The valid source names for texture combining are: <variablelist> <varlistentry> <term>TEXTURE</term> <listitem>Use the color from the current texture layer</listitem> </varlistentry> <varlistentry> <term>TEXTURE_0, TEXTURE_1, etc</term> <listitem>Use the color from the specified texture layer</listitem> </varlistentry> <varlistentry> <term>CONSTANT</term> <listitem>Use the color from the constant given with cogl_pipeline_set_layer_combine_constant()</listitem> </varlistentry> <varlistentry> <term>PRIMARY</term> <listitem>Use the color of the pipeline as set with cogl_pipeline_set_color()</listitem> </varlistentry> <varlistentry> <term>PREVIOUS</term> <listitem>Either use the texture color from the previous layer, or if this is layer 0, use the color of the pipeline as set with cogl_pipeline_set_color()</listitem> </varlistentry> </variablelist> <refsect2 id="cogl-Layer-Combine-Examples"> <title>Layer Combine Examples</title> <para>This is effectively what the default blending is:</para> <informalexample><programlisting> RGBA = MODULATE (PREVIOUS, TEXTURE) </programlisting></informalexample> <para>This could be used to cross-fade between two images, using the alpha component of a constant as the interpolator. The constant color is given by calling cogl_pipeline_set_layer_combine_constant().</para> <informalexample><programlisting> RGBA = INTERPOLATE (PREVIOUS, TEXTURE, CONSTANT[A]) </programlisting></informalexample> </refsect2> <note>You can't give a multiplication factor for arguments as you can with blending.</note></doc> <source-position filename="cogl/cogl/cogl-pipeline-layer-state.h" line="300"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="292">%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</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="207">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="layer_index" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="208">Specifies the layer you want define a combine function for</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="blend_string" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="209">A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired texture combine function.</doc> <type name="utf8" c:type="const char*"/> </parameter> </parameters> </method> <method name="set_layer_combine_constant" c:identifier="cogl_pipeline_set_layer_combine_constant" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="305">When you are using the 'CONSTANT' color source in a layer combine description then you can use this function to define its value.</doc> <source-position filename="cogl/cogl/cogl-pipeline-layer-state.h" line="319"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="307">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="layer_index" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="308">Specifies the layer you want to specify a constant used for texture combining</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="constant" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="310">The constant color you want</doc> <type name="Color" c:type="const CoglColor*"/> </parameter> </parameters> </method> <method name="set_layer_filters" c:identifier="cogl_pipeline_set_layer_filters" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="354">Changes the decimation and interpolation filters used when a texture is drawn at other scales than 100%. <note>It is an error to pass anything other than %COGL_PIPELINE_FILTER_NEAREST or %COGL_PIPELINE_FILTER_LINEAR as magnification filters since magnification doesn't ever need to reference values stored in the mipmap chain.</note></doc> <source-position filename="cogl/cogl/cogl-pipeline-layer-state.h" line="373"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="356">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="layer_index" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="357">the layer number to change.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="min_filter" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="358">the filter used when scaling a texture down.</doc> <type name="PipelineFilter" c:type="CoglPipelineFilter"/> </parameter> <parameter name="mag_filter" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="359">the filter used when magnifying a texture.</doc> <type name="PipelineFilter" c:type="CoglPipelineFilter"/> </parameter> </parameters> </method> <method name="set_layer_matrix" c:identifier="cogl_pipeline_set_layer_matrix" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="323">This function lets you set a matrix that can be used to e.g. translate and rotate a single layer of a pipeline used to fill your geometry.</doc> <source-position filename="cogl/cogl/cogl-pipeline-layer-state.h" line="336"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="325">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="layer_index" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="326">the index for the layer inside @pipeline</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="matrix" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="327">the transformation matrix for the layer</doc> <type name="Graphene.Matrix" c:type="const graphene_matrix_t*"/> </parameter> </parameters> </method> <method name="set_layer_max_mipmap_level" c:identifier="cogl_pipeline_set_layer_max_mipmap_level"> <source-position filename="cogl/cogl/cogl-pipeline-layer-state.h" line="571"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="layer" transfer-ownership="none"> <type name="gint" c:type="int"/> </parameter> <parameter name="max_level" transfer-ownership="none"> <type name="gint" c:type="int"/> </parameter> </parameters> </method> <method name="set_layer_null_texture" c:identifier="cogl_pipeline_set_layer_null_texture" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="157">Sets the texture for this layer to be the default texture for the given type. The default texture is a 1x1 pixel white texture. This function is mostly useful if you want to create a base pipeline that you want to create multiple copies from using cogl_pipeline_copy(). In that case this function can be used to specify the texture type so that any pipeline copies can share the internal texture type state for efficiency.</doc> <source-position filename="cogl/cogl/cogl-pipeline-layer-state.h" line="175"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="159">A #CoglPipeline</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="layer_index" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="160">The layer number to modify</doc> <type name="gint" c:type="int"/> </parameter> </parameters> </method> <method name="set_layer_point_sprite_coords_enabled" c:identifier="cogl_pipeline_set_layer_point_sprite_coords_enabled" version="2.0" stability="Unstable" throws="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="420">When rendering points, if @enable is %TRUE then the texture coordinates for this layer will be replaced with coordinates that vary from 0.0 to 1.0 across the primitive. The top left of the point will have the coordinates 0.0,0.0 and the bottom right will have 1.0,1.0. If @enable is %FALSE then the coordinates will be fixed for the entire point.</doc> <source-position filename="cogl/cogl/cogl-pipeline-layer-state.h" line="439"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="434">%TRUE if the function succeeds, %FALSE otherwise.</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="422">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="layer_index" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="423">the layer number to change.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="enable" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="424">whether to enable point sprite coord generation.</doc> <type name="gboolean" c:type="gboolean"/> </parameter> </parameters> </method> <method name="set_layer_texture" c:identifier="cogl_pipeline_set_layer_texture"> <source-position filename="cogl/cogl/cogl-pipeline-layer-state.h" line="153"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="layer_index" transfer-ownership="none"> <type name="gint" c:type="int"/> </parameter> <parameter name="texture" transfer-ownership="none"> <type name="Texture" c:type="CoglTexture*"/> </parameter> </parameters> </method> <method name="set_layer_wrap_mode" c:identifier="cogl_pipeline_set_layer_wrap_mode" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="531">Sets the wrap mode for all three coordinates of texture lookups on this layer. This is equivalent to calling cogl_pipeline_set_layer_wrap_mode_s() and cogl_pipeline_set_layer_wrap_mode_t() separately.</doc> <source-position filename="cogl/cogl/cogl-pipeline-layer-state.h" line="546"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="533">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="layer_index" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="534">the layer number to change.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="mode" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="535">the new wrap mode</doc> <type name="PipelineWrapMode" c:type="CoglPipelineWrapMode"/> </parameter> </parameters> </method> <method name="set_layer_wrap_mode_s" c:identifier="cogl_pipeline_set_layer_wrap_mode_s" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="480">Sets the wrap mode for the 's' coordinate of texture lookups on this layer.</doc> <source-position filename="cogl/cogl/cogl-pipeline-layer-state.h" line="492"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="482">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="layer_index" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="483">the layer number to change.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="mode" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="484">the new wrap mode</doc> <type name="PipelineWrapMode" c:type="CoglPipelineWrapMode"/> </parameter> </parameters> </method> <method name="set_layer_wrap_mode_t" c:identifier="cogl_pipeline_set_layer_wrap_mode_t" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="515">Sets the wrap mode for the 't' coordinate of texture lookups on this layer.</doc> <source-position filename="cogl/cogl/cogl-pipeline-layer-state.h" line="527"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="517">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="layer_index" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="518">the layer number to change.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="mode" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="519">the new wrap mode</doc> <type name="PipelineWrapMode" c:type="CoglPipelineWrapMode"/> </parameter> </parameters> </method> <method name="set_per_vertex_point_size" c:identifier="cogl_pipeline_set_per_vertex_point_size" version="2.0" stability="Unstable" throws="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="347">Sets whether to use a per-vertex point size or to use the value set by cogl_pipeline_set_point_size(). If per-vertex point size is enabled then the point size can be set for an individual point either by drawing with a #CoglAttribute with the name ‘cogl_point_size_in’ or by writing to the GLSL builtin ‘cogl_point_size_out’ from a vertex shader snippet. If per-vertex point size is enabled and this attribute is not used and cogl_point_size_out is not written to then the results are undefined.</doc> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="369"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="366">%TRUE if the change succeeded or %FALSE otherwise</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="349">a #CoglPipeline pointer</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="enable" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="350">whether to enable per-vertex point size</doc> <type name="gboolean" c:type="gboolean"/> </parameter> </parameters> </method> <method name="set_point_size" c:identifier="cogl_pipeline_set_point_size" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="307">Changes the size of points drawn when %COGL_VERTICES_MODE_POINTS is used with the attribute buffer API. Note that typically the GPU will only support a limited minimum and maximum range of point sizes. If the chosen point size is outside that range then the nearest value within that range will be used instead. The size of a point is in screen space so it will be the same regardless of any transformations. If the point size is set to 0.0 then drawing points with the pipeline will have undefined results. This is the default value so if an application wants to draw points it must make sure to use a pipeline that has an explicit point size set on it.</doc> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="329"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="309">a #CoglPipeline pointer</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="point_size" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="310">the new point size.</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="set_uniform_1f" c:identifier="cogl_pipeline_set_uniform_1f" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="583">Sets a new value for the uniform at @uniform_location. If this pipeline has a user program attached and is later used as a source for drawing, the given value will be assigned to the uniform which can be accessed from the shader's source. The value for @uniform_location should be retrieved from the string name of the uniform by calling cogl_pipeline_get_uniform_location(). This function should be used to set uniforms that are of type float. It can also be used to set a single member of a float array uniform.</doc> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="604"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="585">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="uniform_location" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="586">The uniform's location identifier</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="value" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="587">The new value for the uniform</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </method> <method name="set_uniform_1i" c:identifier="cogl_pipeline_set_uniform_1i" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="608">Sets a new value for the uniform at @uniform_location. If this pipeline has a user program attached and is later used as a source for drawing, the given value will be assigned to the uniform which can be accessed from the shader's source. The value for @uniform_location should be retrieved from the string name of the uniform by calling cogl_pipeline_get_uniform_location(). This function should be used to set uniforms that are of type int. It can also be used to set a single member of a int array uniform or a sampler uniform.</doc> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="629"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="610">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="uniform_location" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="611">The uniform's location identifier</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="value" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="612">The new value for the uniform</doc> <type name="gint" c:type="int"/> </parameter> </parameters> </method> <method name="set_uniform_float" c:identifier="cogl_pipeline_set_uniform_float" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="633">Sets new values for the uniform at @uniform_location. If this pipeline has a user program attached and is later used as a source for drawing, the given values will be assigned to the uniform which can be accessed from the shader's source. The value for @uniform_location should be retrieved from the string name of the uniform by calling cogl_pipeline_get_uniform_location(). This function can be used to set any floating point type uniform, including float arrays and float vectors. For example, to set a single vec4 uniform you would use 4 for @n_components and 1 for @count. To set an array of 8 float values, you could use 1 for @n_components and 8 for @count.</doc> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="658"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="635">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="uniform_location" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="636">The uniform's location identifier</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="n_components" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="637">The number of components in the corresponding uniform's type</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="count" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="638">The number of values to set</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="value" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="639">Pointer to the new values to set</doc> <type name="gfloat" c:type="const float*"/> </parameter> </parameters> </method> <method name="set_uniform_int" c:identifier="cogl_pipeline_set_uniform_int" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="664">Sets new values for the uniform at @uniform_location. If this pipeline has a user program attached and is later used as a source for drawing, the given values will be assigned to the uniform which can be accessed from the shader's source. The value for @uniform_location should be retrieved from the string name of the uniform by calling cogl_pipeline_get_uniform_location(). This function can be used to set any integer type uniform, including int arrays and int vectors. For example, to set a single ivec4 uniform you would use 4 for @n_components and 1 for @count. To set an array of 8 int values, you could use 1 for @n_components and 8 for @count.</doc> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="689"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="666">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="uniform_location" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="667">The uniform's location identifier</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="n_components" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="668">The number of components in the corresponding uniform's type</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="count" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="669">The number of values to set</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="value" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="670">Pointer to the new values to set</doc> <type name="gint" c:type="const int*"/> </parameter> </parameters> </method> <method name="set_uniform_matrix" c:identifier="cogl_pipeline_set_uniform_matrix" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="695">Sets new values for the uniform at @uniform_location. If this pipeline has a user program attached and is later used as a source for drawing, the given values will be assigned to the uniform which can be accessed from the shader's source. The value for @uniform_location should be retrieved from the string name of the uniform by calling cogl_pipeline_get_uniform_location(). This function can be used to set any matrix type uniform, including matrix arrays. For example, to set a single mat4 uniform you would use 4 for @dimensions and 1 for @count. To set an array of 8 mat3 values, you could use 3 for @dimensions and 8 for @count. If @transpose is %FALSE then the matrix is expected to be in column-major order or if it is %TRUE then the matrix is in row-major order. You can pass a #graphene_matrix_t by calling by passing the result of graphene_matrix_to_float() in @value and setting @transpose to %FALSE.</doc> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="726"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="697">A #CoglPipeline object</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="uniform_location" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="698">The uniform's location identifier</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="dimensions" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="699">The size of the matrix</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="count" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="700">The number of values to set</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="transpose" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="701">Whether to transpose the matrix</doc> <type name="gboolean" c:type="gboolean"/> </parameter> <parameter name="value" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="702">Pointer to the new values to set</doc> <type name="gfloat" c:type="const float*"/> </parameter> </parameters> </method> <method name="set_user_program" c:identifier="cogl_pipeline_set_user_program" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="401">Associates a linked CoglProgram with the given pipeline so that the program can take full control of vertex and/or fragment processing. This is an example of how it can be used to associate an ARBfp program with a #CoglPipeline: |[ CoglHandle shader; CoglHandle program; CoglPipeline *pipeline; shader = cogl_create_shader (COGL_SHADER_TYPE_FRAGMENT); cogl_shader_source (shader, "!!ARBfp1.0\n" "MOV result.color,fragment.color;\n" "END\n"); program = cogl_create_program (); cogl_program_attach_shader (program, shader); cogl_program_link (program); pipeline = cogl_pipeline_new (); cogl_pipeline_set_user_program (pipeline, program); cogl_set_source_color4ub (0xff, 0x00, 0x00, 0xff); cogl_rectangle (0, 0, 100, 100); ]| It is possibly worth keeping in mind that this API is not part of the long term design for how we want to expose shaders to Cogl developers (We are planning on deprecating the cogl_program and cogl_shader APIs in favour of a "snippet" framework) but in the meantime we hope this will handle most practical GLSL and ARBfp requirements.</doc> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="444"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="403">a #CoglPipeline object.</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </instance-parameter> <parameter name="program" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="404">A #CoglHandle to a linked CoglProgram</doc> <type name="Handle" c:type="CoglHandle"/> </parameter> </parameters> </method> </class> <enumeration name="PipelineAlphaFunc" c:type="CoglPipelineAlphaFunc"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="123">Alpha testing happens before blending primitives with the framebuffer and gives an opportunity to discard fragments based on a comparison with the incoming alpha value and a reference alpha value. The #CoglPipelineAlphaFunc determines how the comparison is done.</doc> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="155"/> <member name="never" value="512" c:identifier="COGL_PIPELINE_ALPHA_FUNC_NEVER"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="125">Never let the fragment through.</doc> </member> <member name="less" value="513" c:identifier="COGL_PIPELINE_ALPHA_FUNC_LESS"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="126">Let the fragment through if the incoming alpha value is less than the reference alpha value</doc> </member> <member name="equal" value="514" c:identifier="COGL_PIPELINE_ALPHA_FUNC_EQUAL"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="128">Let the fragment through if the incoming alpha value equals the reference alpha value</doc> </member> <member name="lequal" value="515" c:identifier="COGL_PIPELINE_ALPHA_FUNC_LEQUAL"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="130">Let the fragment through if the incoming alpha value is less than or equal to the reference alpha value</doc> </member> <member name="greater" value="516" c:identifier="COGL_PIPELINE_ALPHA_FUNC_GREATER"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="132">Let the fragment through if the incoming alpha value is greater than the reference alpha value</doc> </member> <member name="notequal" value="517" c:identifier="COGL_PIPELINE_ALPHA_FUNC_NOTEQUAL"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="134">Let the fragment through if the incoming alpha value does not equal the reference alpha value</doc> </member> <member name="gequal" value="518" c:identifier="COGL_PIPELINE_ALPHA_FUNC_GEQUAL"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="136">Let the fragment through if the incoming alpha value is greater than or equal to the reference alpha value.</doc> </member> <member name="always" value="519" c:identifier="COGL_PIPELINE_ALPHA_FUNC_ALWAYS"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="138">Always let the fragment through.</doc> </member> </enumeration> <enumeration name="PipelineCullFaceMode" c:type="CoglPipelineCullFaceMode"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="487">Specifies which faces should be culled. This can be set on a pipeline using cogl_pipeline_set_cull_face_mode().</doc> <source-position filename="cogl/cogl/cogl-pipeline-state.h" line="504"/> <member name="none" value="0" c:identifier="COGL_PIPELINE_CULL_FACE_MODE_NONE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="489">Neither face will be culled. This is the default.</doc> </member> <member name="front" value="1" c:identifier="COGL_PIPELINE_CULL_FACE_MODE_FRONT"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="491">Front faces will be culled.</doc> </member> <member name="back" value="2" c:identifier="COGL_PIPELINE_CULL_FACE_MODE_BACK"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="492">Back faces will be culled.</doc> </member> <member name="both" value="3" c:identifier="COGL_PIPELINE_CULL_FACE_MODE_BOTH"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-state.h" line="493">All faces will be culled.</doc> </member> </enumeration> <enumeration name="PipelineFilter" c:type="CoglPipelineFilter"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="44">Texture filtering is used whenever the current pixel maps either to more than one texture element (texel) or less than one. These filter enums correspond to different strategies used to come up with a pixel color, by possibly referring to multiple neighbouring texels and taking a weighted average or simply using the nearest texel.</doc> <source-position filename="cogl/cogl/cogl-pipeline-layer-state.h" line="79"/> <member name="nearest" value="9728" c:identifier="COGL_PIPELINE_FILTER_NEAREST"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="46">Measuring in manhatten distance from the, current pixel center, use the nearest texture texel</doc> </member> <member name="linear" value="9729" c:identifier="COGL_PIPELINE_FILTER_LINEAR"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="48">Use the weighted average of the 4 texels nearest the current pixel center</doc> </member> <member name="nearest_mipmap_nearest" value="9984" c:identifier="COGL_PIPELINE_FILTER_NEAREST_MIPMAP_NEAREST"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="50">Select the mimap level whose texel size most closely matches the current pixel, and use the %COGL_PIPELINE_FILTER_NEAREST criterion</doc> </member> <member name="linear_mipmap_nearest" value="9985" c:identifier="COGL_PIPELINE_FILTER_LINEAR_MIPMAP_NEAREST"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="53">Select the mimap level whose texel size most closely matches the current pixel, and use the %COGL_PIPELINE_FILTER_LINEAR criterion</doc> </member> <member name="nearest_mipmap_linear" value="9986" c:identifier="COGL_PIPELINE_FILTER_NEAREST_MIPMAP_LINEAR"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="56">Select the two mimap levels whose texel size most closely matches the current pixel, use the %COGL_PIPELINE_FILTER_NEAREST criterion on each one and take their weighted average</doc> </member> <member name="linear_mipmap_linear" value="9987" c:identifier="COGL_PIPELINE_FILTER_LINEAR_MIPMAP_LINEAR"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="60">Select the two mimap levels whose texel size most closely matches the current pixel, use the %COGL_PIPELINE_FILTER_LINEAR criterion on each one and take their weighted average</doc> </member> </enumeration> <callback name="PipelineLayerCallback" c:type="CoglPipelineLayerCallback" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline.h" line="126">The callback prototype used with cogl_pipeline_foreach_layer() for iterating all the layers of a @pipeline.</doc> <source-position filename="cogl/cogl/cogl-pipeline.h" line="138"/> <return-value transfer-ownership="none"> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="pipeline" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline.h" line="128">The #CoglPipeline whose layers are being iterated</doc> <type name="Pipeline" c:type="CoglPipeline*"/> </parameter> <parameter name="layer_index" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline.h" line="129">The current layer index</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="2"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline.h" line="130">The private data passed to cogl_pipeline_foreach_layer()</doc> <type name="gpointer" c:type="void*"/> </parameter> </parameters> </callback> <enumeration name="PipelineWrapMode" version="2.0" c:type="CoglPipelineWrapMode"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="82">The wrap mode specifies what happens when texture coordinates outside the range 0→1 are used. Note that if the filter mode is anything but %COGL_PIPELINE_FILTER_NEAREST then texels outside the range 0→1 might be used even when the coordinate is exactly 0 or 1 because OpenGL will try to sample neighbouring pixels. For example if you are trying to render the full texture then you may get artifacts around the edges when the pixels from the other side are merged in if the wrap mode is set to repeat.</doc> <source-position filename="cogl/cogl/cogl-pipeline-layer-state.h" line="122"/> <member name="repeat" value="10497" c:identifier="COGL_PIPELINE_WRAP_MODE_REPEAT"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="84">The texture will be repeated. This is useful for example to draw a tiled background.</doc> </member> <member name="mirrored_repeat" value="33648" c:identifier="COGL_PIPELINE_WRAP_MODE_MIRRORED_REPEAT"> </member> <member name="clamp_to_edge" value="33071" c:identifier="COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="86">The coordinates outside the range 0→1 will sample copies of the edge pixels of the texture. This is useful to avoid artifacts if only one copy of the texture is being rendered.</doc> </member> <member name="automatic" value="519" c:identifier="COGL_PIPELINE_WRAP_MODE_AUTOMATIC"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline-layer-state.h" line="90">Cogl will try to automatically decide which of the above two to use. For cogl_rectangle(), it will use repeat mode if any of the texture coordinates are outside the range 0→1, otherwise it will use clamp to edge. For cogl_polygon() it will always use repeat mode. For cogl_vertex_buffer_draw() it will use repeat mode except for layers that have point sprite coordinate generation enabled. This is the default value.</doc> </member> </enumeration> <bitfield name="PixelFormat" version="0.8" c:type="CoglPixelFormat"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="139">Pixel formats used by Cogl. For the formats with a byte per component, the order of the components specify the order in increasing memory addresses. So for example %COGL_PIXEL_FORMAT_RGB_888 would have the red component in the lowest address, green in the next address and blue after that regardless of the endianness of the system. For the formats with non byte aligned components the component order specifies the order within a 16-bit or 32-bit number from most significant bit to least significant. So for %COGL_PIXEL_FORMAT_RGB_565, the red component would be in bits 11-15, the green component would be in 6-11 and the blue component would be in 1-5. Therefore the order in memory depends on the endianness of the system. When uploading a texture %COGL_PIXEL_FORMAT_ANY can be used as the internal format. Cogl will try to pick the best format to use internally and convert the texture data if necessary.</doc> <source-position filename="cogl/cogl/cogl-pixel-format.h" line="253"/> <member name="any" value="0" c:identifier="COGL_PIXEL_FORMAT_ANY"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="141">Any format</doc> </member> <member name="a_8" value="17" c:identifier="COGL_PIXEL_FORMAT_A_8"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="142">8 bits alpha mask</doc> </member> <member name="rgb_565" value="4" c:identifier="COGL_PIXEL_FORMAT_RGB_565"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="146">RGB, 16 bits</doc> </member> <member name="rgba_4444" value="21" c:identifier="COGL_PIXEL_FORMAT_RGBA_4444"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="147">RGBA, 16 bits</doc> </member> <member name="rgba_5551" value="22" c:identifier="COGL_PIXEL_FORMAT_RGBA_5551"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="148">RGBA, 16 bits</doc> </member> <member name="yuv" value="7" c:identifier="COGL_PIXEL_FORMAT_YUV"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="149">Not currently supported</doc> </member> <member name="g_8" value="8" c:identifier="COGL_PIXEL_FORMAT_G_8"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="150">Single luminance component</doc> </member> <member name="rg_88" value="9" c:identifier="COGL_PIXEL_FORMAT_RG_88"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="143">RG, 16 bits. Note that red-green textures are only available if %COGL_FEATURE_ID_TEXTURE_RG is advertised. See cogl_texture_set_components() for details.</doc> </member> <member name="rgb_888" value="2" c:identifier="COGL_PIXEL_FORMAT_RGB_888"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="151">RGB, 24 bits</doc> </member> <member name="bgr_888" value="34" c:identifier="COGL_PIXEL_FORMAT_BGR_888"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="152">BGR, 24 bits</doc> </member> <member name="rgba_8888" value="19" c:identifier="COGL_PIXEL_FORMAT_RGBA_8888"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="153">RGBA, 32 bits</doc> </member> <member name="bgra_8888" value="51" c:identifier="COGL_PIXEL_FORMAT_BGRA_8888"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="154">BGRA, 32 bits</doc> </member> <member name="argb_8888" value="83" c:identifier="COGL_PIXEL_FORMAT_ARGB_8888"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="155">ARGB, 32 bits</doc> </member> <member name="abgr_8888" value="115" c:identifier="COGL_PIXEL_FORMAT_ABGR_8888"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="156">ABGR, 32 bits</doc> </member> <member name="rgba_1010102" value="29" c:identifier="COGL_PIXEL_FORMAT_RGBA_1010102"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="157">RGBA, 32 bits, 10 bpc</doc> </member> <member name="bgra_1010102" value="61" c:identifier="COGL_PIXEL_FORMAT_BGRA_1010102"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="158">BGRA, 32 bits, 10 bpc</doc> </member> <member name="argb_2101010" value="93" c:identifier="COGL_PIXEL_FORMAT_ARGB_2101010"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="159">ARGB, 32 bits, 10 bpc</doc> </member> <member name="abgr_2101010" value="125" c:identifier="COGL_PIXEL_FORMAT_ABGR_2101010"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="160">ABGR, 32 bits, 10 bpc</doc> </member> <member name="rgba_fp_16161616" value="27" c:identifier="COGL_PIXEL_FORMAT_RGBA_FP_16161616"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="171">RGBA half floating point, 64 bit</doc> </member> <member name="bgra_fp_16161616" value="59" c:identifier="COGL_PIXEL_FORMAT_BGRA_FP_16161616"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="172">BGRA half floating point, 64 bit</doc> </member> <member name="argb_fp_16161616" value="91" c:identifier="COGL_PIXEL_FORMAT_ARGB_FP_16161616"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="173">ARGB half floating point, 64 bit</doc> </member> <member name="abgr_fp_16161616" value="123" c:identifier="COGL_PIXEL_FORMAT_ABGR_FP_16161616"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="174">ABGR half floating point, 64 bit</doc> </member> <member name="rgba_8888_pre" value="147" c:identifier="COGL_PIXEL_FORMAT_RGBA_8888_PRE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="161">Premultiplied RGBA, 32 bits</doc> </member> <member name="bgra_8888_pre" value="179" c:identifier="COGL_PIXEL_FORMAT_BGRA_8888_PRE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="162">Premultiplied BGRA, 32 bits</doc> </member> <member name="argb_8888_pre" value="211" c:identifier="COGL_PIXEL_FORMAT_ARGB_8888_PRE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="163">Premultiplied ARGB, 32 bits</doc> </member> <member name="abgr_8888_pre" value="243" c:identifier="COGL_PIXEL_FORMAT_ABGR_8888_PRE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="164">Premultiplied ABGR, 32 bits</doc> </member> <member name="rgba_4444_pre" value="149" c:identifier="COGL_PIXEL_FORMAT_RGBA_4444_PRE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="165">Premultiplied RGBA, 16 bits</doc> </member> <member name="rgba_5551_pre" value="150" c:identifier="COGL_PIXEL_FORMAT_RGBA_5551_PRE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="166">Premultiplied RGBA, 16 bits</doc> </member> <member name="rgba_1010102_pre" value="157" c:identifier="COGL_PIXEL_FORMAT_RGBA_1010102_PRE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="167">Premultiplied RGBA, 32 bits, 10 bpc</doc> </member> <member name="bgra_1010102_pre" value="189" c:identifier="COGL_PIXEL_FORMAT_BGRA_1010102_PRE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="168">Premultiplied BGRA, 32 bits, 10 bpc</doc> </member> <member name="argb_2101010_pre" value="221" c:identifier="COGL_PIXEL_FORMAT_ARGB_2101010_PRE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="169">Premultiplied ARGB, 32 bits, 10 bpc</doc> </member> <member name="abgr_2101010_pre" value="253" c:identifier="COGL_PIXEL_FORMAT_ABGR_2101010_PRE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="170">Premultiplied ABGR, 32 bits, 10 bpc</doc> </member> <member name="rgba_fp_16161616_pre" value="155" c:identifier="COGL_PIXEL_FORMAT_RGBA_FP_16161616_PRE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="175">Premultiplied RGBA half floating point, 64 bit</doc> </member> <member name="bgra_fp_16161616_pre" value="187" c:identifier="COGL_PIXEL_FORMAT_BGRA_FP_16161616_PRE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="176">Premultiplied BGRA half floating point, 64 bit</doc> </member> <member name="argb_fp_16161616_pre" value="219" c:identifier="COGL_PIXEL_FORMAT_ARGB_FP_16161616_PRE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="177">Premultiplied ARGB half floating point, 64 bit</doc> </member> <member name="abgr_fp_16161616_pre" value="251" c:identifier="COGL_PIXEL_FORMAT_ABGR_FP_16161616_PRE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="178">Premultiplied ABGR half floating point, 64 bit</doc> </member> <member name="depth_16" value="265" c:identifier="COGL_PIXEL_FORMAT_DEPTH_16"> </member> <member name="depth_32" value="259" c:identifier="COGL_PIXEL_FORMAT_DEPTH_32"> </member> <member name="depth_24_stencil_8" value="771" c:identifier="COGL_PIXEL_FORMAT_DEPTH_24_STENCIL_8"> </member> </bitfield> <bitfield name="ReadPixelsFlags" version="1.0" c:type="CoglReadPixelsFlags"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="499">Flags for cogl_framebuffer_read_pixels_into_bitmap()</doc> <source-position filename="cogl/cogl/cogl-types.h" line="510"/> <member name="read_pixels_color_buffer" value="1" c:identifier="COGL_READ_PIXELS_COLOR_BUFFER"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="501">Read from the color buffer</doc> </member> </bitfield> <enumeration name="RendererError" c:type="CoglRendererError"> <source-position filename="cogl/cogl/cogl-types.h" line="407"/> <member name="xlib_display_open" value="0" c:identifier="COGL_RENDERER_ERROR_XLIB_DISPLAY_OPEN"> </member> <member name="bad_constraint" value="1" c:identifier="COGL_RENDERER_ERROR_BAD_CONSTRAINT"> </member> </enumeration> <constant name="STENCIL_BIT" value="512" c:type="COGL_STENCIL_BIT"> <source-position filename="cogl/cogl/cogl-pixel-format.h" line="69"/> <type name="gint" c:type="gint"/> </constant> <function-macro name="STRUCT_SIZE_ASSERT" c:identifier="COGL_STRUCT_SIZE_ASSERT" introspectable="0"> <source-position filename="cogl/cogl/cogl-types.h" line="71"/> <parameters> <parameter name="TYPE"> </parameter> <parameter name="SIZE"> </parameter> </parameters> </function-macro> <record name="Scanout" c:type="CoglScanout" disguised="1"> <source-position filename="cogl/cogl/cogl-onscreen.h" line="50"/> <function name="error_quark" c:identifier="cogl_scanout_error_quark"> <return-value transfer-ownership="none"> <type name="GLib.Quark" c:type="GQuark"/> </return-value> </function> </record> <enumeration name="ScanoutError" c:type="CoglScanoutError" glib:error-domain="cogl-scanout-error-quark"> <source-position filename="cogl/cogl/cogl-onscreen.h" line="93"/> <member name="scanout_error_inhibited" value="0" c:identifier="COGL_SCANOUT_ERROR_INHIBITED"> </member> </enumeration> <enumeration name="ShaderType" version="1.0" c:type="CoglShaderType"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="223">Types of shaders</doc> <source-position filename="cogl/cogl/deprecated/cogl-shader.h" line="236"/> <member name="vertex" value="0" c:identifier="COGL_SHADER_TYPE_VERTEX"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="225">A program for processing vertices</doc> </member> <member name="fragment" value="1" c:identifier="COGL_SHADER_TYPE_FRAGMENT"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="226">A program for processing fragments</doc> </member> </enumeration> <enumeration name="StereoMode" c:type="CoglStereoMode"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="512">Represents how draw should affect the two buffers of a stereo framebuffer. See cogl_framebuffer_set_stereo_mode().</doc> <source-position filename="cogl/cogl/cogl-types.h" line="526"/> <member name="both" value="0" c:identifier="COGL_STEREO_BOTH"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="514">draw to both stereo buffers</doc> </member> <member name="left" value="1" c:identifier="COGL_STEREO_LEFT"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="515">draw only to the left stereo buffer</doc> </member> <member name="right" value="2" c:identifier="COGL_STEREO_RIGHT"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="516">draw only to the left stereo buffer</doc> </member> </enumeration> <enumeration name="SystemError" version="1.4" stability="Unstable" c:type="CoglSystemError"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="245">Error enumeration for Cogl The @COGL_SYSTEM_ERROR_UNSUPPORTED error can be thrown for a variety of reasons. For example: <itemizedlist> <listitem><para>You've tried to use a feature that is not advertised by cogl_has_feature().</para></listitem> <listitem><para>The GPU can not handle the configuration you have requested. An example might be if you try to use too many texture layers in a single #CoglPipeline</para></listitem> <listitem><para>The driver does not support some configuration.</para></listiem> </itemizedlist> Currently this is only used by Cogl API marked as experimental so this enum should also be considered experimental.</doc> <source-position filename="cogl/cogl/cogl-types.h" line="277"/> <member name="unsupported" value="0" c:identifier="COGL_SYSTEM_ERROR_UNSUPPORTED"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="247">You tried to use a feature or configuration not currently available.</doc> </member> <member name="no_memory" value="1" c:identifier="COGL_SYSTEM_ERROR_NO_MEMORY"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="249">You tried to allocate a resource such as a texture and there wasn't enough memory.</doc> </member> </enumeration> <function-macro name="TEXTURE" c:identifier="COGL_TEXTURE" introspectable="0"> <source-position filename="cogl/cogl/cogl-texture.h" line="49"/> <parameters> <parameter name="X"> </parameter> </parameters> </function-macro> <function-macro name="TEXTURE_2D" c:identifier="COGL_TEXTURE_2D" introspectable="0"> <source-position filename="cogl/cogl/cogl-texture-2d.h" line="61"/> <parameters> <parameter name="X"> </parameter> </parameters> </function-macro> <function-macro name="TEXTURE_2D_SLICED" c:identifier="COGL_TEXTURE_2D_SLICED" introspectable="0"> <source-position filename="cogl/cogl/cogl-texture-2d-sliced.h" line="71"/> <parameters> <parameter name="X"> </parameter> </parameters> </function-macro> <constant name="TEXTURE_MAX_WASTE" value="127" c:type="COGL_TEXTURE_MAX_WASTE"> <source-position filename="cogl/cogl/cogl-texture.h" line="72"/> <type name="gint" c:type="gint"/> </constant> <function-macro name="TRACE_BEGIN" c:identifier="COGL_TRACE_BEGIN" introspectable="0"> <source-position filename="cogl/cogl/cogl-trace.h" line="86"/> <parameters> <parameter name="Name"> </parameter> <parameter name="description"> </parameter> </parameters> </function-macro> <function-macro name="TRACE_BEGIN_SCOPED" c:identifier="COGL_TRACE_BEGIN_SCOPED" introspectable="0"> <source-position filename="cogl/cogl/cogl-trace.h" line="95"/> <parameters> <parameter name="Name"> </parameter> <parameter name="description"> </parameter> </parameters> </function-macro> <function-macro name="TRACE_END" c:identifier="COGL_TRACE_END" introspectable="0"> <source-position filename="cogl/cogl/cogl-trace.h" line="91"/> <parameters> <parameter name="Name"> </parameter> </parameters> </function-macro> <interface name="Texture" c:symbol-prefix="texture" c:type="CoglTexture" glib:type-name="CoglTexture" glib:get-type="cogl_texture_get_gtype"> <prerequisite name="Object"/> <function name="error_quark" c:identifier="cogl_texture_error_quark"> <source-position filename="cogl/cogl/cogl-texture.h" line="113"/> <return-value transfer-ownership="none"> <type name="guint32" c:type="uint32_t"/> </return-value> </function> <function name="new_from_bitmap" c:identifier="cogl_texture_new_from_bitmap" version="1.0" deprecated="1" deprecated-version="1.18"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="128">Creates a #CoglTexture from a #CoglBitmap.</doc> <doc-deprecated xml:space="preserve">Use specific constructors such as cogl_texture_2d_new_from_bitmap()</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="146"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="137">A newly created #CoglTexture or %NULL on failure</doc> <type name="Texture" c:type="CoglTexture*"/> </return-value> <parameters> <parameter name="bitmap" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="130">A #CoglBitmap pointer</doc> <type name="Bitmap" c:type="CoglBitmap*"/> </parameter> <parameter name="flags" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="131">Optional flags for the texture, or %COGL_TEXTURE_NONE</doc> <type name="TextureFlags" c:type="CoglTextureFlags"/> </parameter> <parameter name="internal_format" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="132">the #CoglPixelFormat to use for the GPU storage of the texture</doc> <type name="PixelFormat" c:type="CoglPixelFormat"/> </parameter> </parameters> </function> <function name="new_from_data" c:identifier="cogl_texture_new_from_data" version="0.8" deprecated="1" deprecated-version="1.18"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="91">Creates a new #CoglTexture based on data residing in memory.</doc> <doc-deprecated xml:space="preserve">Use specific constructors such as cogl_texture_2d_new_from_data()</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="120"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="111">A newly created #CoglTexture or %NULL on failure</doc> <type name="Texture" c:type="CoglTexture*"/> </return-value> <parameters> <parameter name="width" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="93">width of texture in pixels</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="height" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="94">height of texture in pixels</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="flags" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="95">Optional flags for the texture, or %COGL_TEXTURE_NONE</doc> <type name="TextureFlags" c:type="CoglTextureFlags"/> </parameter> <parameter name="format" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="96">the #CoglPixelFormat the buffer is stored in in RAM</doc> <type name="PixelFormat" c:type="CoglPixelFormat"/> </parameter> <parameter name="internal_format" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="97">the #CoglPixelFormat that will be used for storing the buffer on the GPU. If COGL_PIXEL_FORMAT_ANY is given then a premultiplied format similar to the format of the source data will be used. The default blending equations of Cogl expect premultiplied color data; the main use of passing a non-premultiplied format here is if you have non-premultiplied source data and are going to adjust the blend mode (see cogl_material_set_blend()) or use the data for something other than straight blending.</doc> <type name="PixelFormat" c:type="CoglPixelFormat"/> </parameter> <parameter name="rowstride" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="105">the memory offset in bytes between the starts of scanlines in @data</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="data" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="107">pointer the memory region where the source buffer resides</doc> <array zero-terminated="0" c:type="const uint8_t*"> <type name="guint8" c:type="uint8_t"/> </array> </parameter> </parameters> </function> <function name="new_from_file" c:identifier="cogl_texture_new_from_file" version="0.8" deprecated="1" deprecated-version="1.18" throws="1"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="61">Creates a #CoglTexture from an image file.</doc> <doc-deprecated xml:space="preserve">Use specific constructors such as cogl_texture_2d_new_from_file()</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="86"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="77">A newly created #CoglTexture or %NULL on failure</doc> <type name="Texture" c:type="CoglTexture*"/> </return-value> <parameters> <parameter name="filename" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="63">the file to load</doc> <type name="utf8" c:type="const char*"/> </parameter> <parameter name="flags" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="64">Optional flags for the texture, or %COGL_TEXTURE_NONE</doc> <type name="TextureFlags" c:type="CoglTextureFlags"/> </parameter> <parameter name="internal_format" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="65">the #CoglPixelFormat to use for the GPU storage of the texture. If %COGL_PIXEL_FORMAT_ANY is given then a premultiplied format similar to the format of the source data will be used. The default blending equations of Cogl expect premultiplied color data; the main use of passing a non-premultiplied format here is if you have non-premultiplied source data and are going to adjust the blend mode (see cogl_material_set_blend()) or use the data for something other than straight blending.</doc> <type name="PixelFormat" c:type="CoglPixelFormat"/> </parameter> </parameters> </function> <function name="new_with_size" c:identifier="cogl_texture_new_with_size" version="0.8" deprecated="1" deprecated-version="1.18"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="38">Creates a new #CoglTexture with the specified dimensions and pixel format.</doc> <doc-deprecated xml:space="preserve">Use specific constructors such as cogl_texture_2d_new_with_size()</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="56"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="48">A newly created #CoglTexture or %NULL on failure</doc> <type name="Texture" c:type="CoglTexture*"/> </return-value> <parameters> <parameter name="width" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="40">width of texture in pixels.</doc> <type name="guint" c:type="unsigned int"/> </parameter> <parameter name="height" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="41">height of texture in pixels.</doc> <type name="guint" c:type="unsigned int"/> </parameter> <parameter name="flags" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="42">Optional flags for the texture, or %COGL_TEXTURE_NONE</doc> <type name="TextureFlags" c:type="CoglTextureFlags"/> </parameter> <parameter name="internal_format" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="43">the #CoglPixelFormat to use for the GPU storage of the texture.</doc> <type name="PixelFormat" c:type="CoglPixelFormat"/> </parameter> </parameters> </function> <method name="allocate" c:identifier="cogl_texture_allocate" throws="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="478">Explicitly allocates the storage for the given @texture which allows you to be sure that there is enough memory for the texture and if not then the error can be handled gracefully. <note>Normally applications don't need to use this api directly since the texture will be implicitly allocated when data is set on the texture, or if the texture is attached to a #CoglOffscreen framebuffer and rendered too.</note></doc> <source-position filename="cogl/cogl/cogl-texture.h" line="497"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="492">%TRUE if the texture was successfully allocated, otherwise %FALSE and @error will be updated if it wasn't %NULL.</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="texture" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="480">A #CoglTexture</doc> <type name="Texture" c:type="CoglTexture*"/> </instance-parameter> </parameters> </method> <method name="get_components" c:identifier="cogl_texture_get_components" version="1.18"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="180">Queries what components the given @texture stores internally as set via cogl_texture_set_components(). For textures created by the ‘_with_size’ constructors the default is %COGL_TEXTURE_COMPONENTS_RGBA. The other constructors which take a %CoglBitmap or a data pointer default to the same components as the pixel format of the data.</doc> <source-position filename="cogl/cogl/cogl-texture.h" line="195"/> <return-value transfer-ownership="none"> <type name="TextureComponents" c:type="CoglTextureComponents"/> </return-value> <parameters> <instance-parameter name="texture" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="182">a #CoglTexture pointer.</doc> <type name="Texture" c:type="CoglTexture*"/> </instance-parameter> </parameters> </method> <method name="get_data" c:identifier="cogl_texture_get_data"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="318">Copies the pixel data from a cogl texture to system memory. <note>Don't pass the value of cogl_texture_get_rowstride() as the @rowstride argument, the rowstride should be the rowstride you want for the destination @data buffer not the rowstride of the source texture</note></doc> <source-position filename="cogl/cogl/cogl-texture.h" line="338"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="335">the size of the texture data in bytes</doc> <type name="gint" c:type="int"/> </return-value> <parameters> <instance-parameter name="texture" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="320">a #CoglTexture pointer.</doc> <type name="Texture" c:type="CoglTexture*"/> </instance-parameter> <parameter name="format" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="321">the #CoglPixelFormat to store the texture as.</doc> <type name="PixelFormat" c:type="CoglPixelFormat"/> </parameter> <parameter name="rowstride" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="322">the rowstride of @data in bytes or pass 0 to calculate from the bytes-per-pixel of @format multiplied by the @texture width.</doc> <type name="guint" c:type="unsigned int"/> </parameter> <parameter name="data" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="325">memory location to write the @texture's contents, or %NULL to only query the data size through the return value.</doc> <array zero-terminated="0" c:type="uint8_t*"> <type name="guint8" c:type="uint8_t"/> </array> </parameter> </parameters> </method> <method name="get_gl_texture" c:identifier="cogl_texture_get_gl_texture"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="297">Queries the GL handles for a GPU side texture through its #CoglTexture. If the texture is spliced the data for the first sub texture will be queried.</doc> <source-position filename="cogl/cogl/cogl-texture.h" line="314"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="310">%TRUE if the handle was successfully retrieved, %FALSE if the handle was invalid</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="texture" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="299">a #CoglTexture pointer.</doc> <type name="Texture" c:type="CoglTexture*"/> </instance-parameter> <parameter name="out_gl_handle" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="300">pointer to return location for the textures GL handle, or %NULL.</doc> <type name="guint" c:type="unsigned int*"/> </parameter> <parameter name="out_gl_target" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="302">pointer to return location for the GL target type, or %NULL.</doc> <type name="guint" c:type="unsigned int*"/> </parameter> </parameters> </method> <method name="get_height" c:identifier="cogl_texture_get_height"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="261">Queries the height of a cogl texture.</doc> <source-position filename="cogl/cogl/cogl-texture.h" line="270"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="267">the height of the GPU side texture in pixels</doc> <type name="guint" c:type="unsigned int"/> </return-value> <parameters> <instance-parameter name="texture" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="263">a #CoglTexture pointer.</doc> <type name="Texture" c:type="CoglTexture*"/> </instance-parameter> </parameters> </method> <method name="get_max_waste" c:identifier="cogl_texture_get_max_waste"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="272">Queries the maximum wasted (unused) pixels in one dimension of a GPU side texture.</doc> <source-position filename="cogl/cogl/cogl-texture.h" line="282"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="279">the maximum waste</doc> <type name="gint" c:type="int"/> </return-value> <parameters> <instance-parameter name="texture" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="274">a #CoglTexture pointer.</doc> <type name="Texture" c:type="CoglTexture*"/> </instance-parameter> </parameters> </method> <method name="get_premultiplied" c:identifier="cogl_texture_get_premultiplied" version="1.18"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="232">Queries the pre-multiplied alpha status for internally stored red, green and blue components for the given @texture as set by cogl_texture_set_premultiplied(). By default the pre-multipled state is @TRUE.</doc> <source-position filename="cogl/cogl/cogl-texture.h" line="248"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="242">%TRUE if red, green and blue components are internally stored pre-multiplied by the alpha value or %FALSE if not.</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="texture" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="234">a #CoglTexture pointer.</doc> <type name="Texture" c:type="CoglTexture*"/> </instance-parameter> </parameters> </method> <method name="get_width" c:identifier="cogl_texture_get_width"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="250">Queries the width of a cogl texture.</doc> <source-position filename="cogl/cogl/cogl-texture.h" line="259"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="256">the width of the GPU side texture in pixels</doc> <type name="guint" c:type="unsigned int"/> </return-value> <parameters> <instance-parameter name="texture" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="252">a #CoglTexture pointer.</doc> <type name="Texture" c:type="CoglTexture*"/> </instance-parameter> </parameters> </method> <method name="is_get_data_supported" c:identifier="cogl_texture_is_get_data_supported" introspectable="0"> <source-position filename="cogl/cogl/cogl-texture.h" line="504"/> <return-value transfer-ownership="none"> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="texture" transfer-ownership="none"> <type name="Texture" c:type="CoglTexture*"/> </instance-parameter> </parameters> </method> <method name="is_sliced" c:identifier="cogl_texture_is_sliced"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="284">Queries if a texture is sliced (stored as multiple GPU side tecture objects).</doc> <source-position filename="cogl/cogl/cogl-texture.h" line="295"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="291">%TRUE if the texture is sliced, %FALSE if the texture is stored as a single GPU texture</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="texture" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="286">a #CoglTexture pointer.</doc> <type name="Texture" c:type="CoglTexture*"/> </instance-parameter> </parameters> </method> <method name="new_from_sub_texture" c:identifier="cogl_texture_new_from_sub_texture" version="1.2" deprecated="1" deprecated-version="1.18"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="150">Creates a new texture which represents a subregion of another texture. The GL resources will be shared so that no new texture data is actually allocated. Sub textures have undefined behaviour texture coordinates outside of the range [0,1] are used. The sub texture will keep a reference to the full texture so you do not need to keep one separately if you only want to use the sub texture.</doc> <doc-deprecated xml:space="preserve">Use cogl_sub_texture_new()</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="176"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="169">A newly created #CoglTexture or %NULL on failure</doc> <type name="Texture" c:type="CoglTexture*"/> </return-value> <parameters> <instance-parameter name="full_texture" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="152">a #CoglTexture pointer</doc> <type name="Texture" c:type="CoglTexture*"/> </instance-parameter> <parameter name="sub_x" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="153">X coordinate of the top-left of the subregion</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="sub_y" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="154">Y coordinate of the top-left of the subregion</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="sub_width" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="155">Width in pixels of the subregion</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="sub_height" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="156">Height in pixels of the subregion</doc> <type name="gint" c:type="int"/> </parameter> </parameters> </method> <method name="set_components" c:identifier="cogl_texture_set_components" version="1.18"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="150">Affects the internal storage format for this texture by specifying what components will be required for sampling later. This api affects how data is uploaded to the GPU since unused components can potentially be discarded from source data. For textures created by the ‘_with_size’ constructors the default is %COGL_TEXTURE_COMPONENTS_RGBA. The other constructors which take a %CoglBitmap or a data pointer default to the same components as the pixel format of the data. Note that the %COGL_TEXTURE_COMPONENTS_RG format is not available on all drivers. The availability can be determined by checking for the %COGL_FEATURE_ID_TEXTURE_RG feature. If this format is used on a driver where it is not available then %COGL_TEXTURE_ERROR_FORMAT will be raised when the texture is allocated. Even if the feature is not available then %COGL_PIXEL_FORMAT_RG_88 can still be used as an image format as long as %COGL_TEXTURE_COMPONENTS_RG isn't used as the texture's components.</doc> <source-position filename="cogl/cogl/cogl-texture.h" line="177"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="texture" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="152">a #CoglTexture pointer.</doc> <type name="Texture" c:type="CoglTexture*"/> </instance-parameter> <parameter name="components" transfer-ownership="none"> <type name="TextureComponents" c:type="CoglTextureComponents"/> </parameter> </parameters> </method> <method name="set_data" c:identifier="cogl_texture_set_data" throws="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="383">@texture a #CoglTexture. Sets all the pixels for a given mipmap @level by copying the pixel data pointed to by the @data argument into the given @texture. @data should point to the first pixel to copy corresponding to the top left of the mipmap @level being set. If @rowstride equals 0 then it will be automatically calculated from the width of the mipmap level and the bytes-per-pixel for the given @format. A mipmap @level of 0 corresponds to the largest, base image of a texture and @level 1 is half the width and height of level 0. If dividing any dimension of the previous level by two results in a fraction then round the number down (floor()), but clamp to 1 something like this: |[ next_width = MAX (1, floor (prev_width)); ]| You can determine the number of mipmap levels for a given texture like this: |[ n_levels = 1 + floor (log2 (max_dimension)); ]| Where %max_dimension is the larger of cogl_texture_get_width() and cogl_texture_get_height(). It is an error to pass a @level number >= the number of levels that @texture can have according to the above calculation. <note>Since the storage for a #CoglTexture is allocated lazily then if the given @texture has not previously been allocated then this api can return %FALSE and throw an exceptional @error if there is not enough memory to allocate storage for @texture.</note></doc> <source-position filename="cogl/cogl/cogl-texture.h" line="436"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="432">%TRUE if the data upload was successful, and %FALSE otherwise</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="texture" transfer-ownership="none"> <type name="Texture" c:type="CoglTexture*"/> </instance-parameter> <parameter name="format" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="386">the #CoglPixelFormat used in the source @data buffer.</doc> <type name="PixelFormat" c:type="CoglPixelFormat"/> </parameter> <parameter name="rowstride" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="387">rowstride of the source @data buffer (computed from the texture width and @format if it equals 0)</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="data" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="389">the source data, pointing to the first top-left pixel to set</doc> <array zero-terminated="0" c:type="const uint8_t*"> <type name="guint8" c:type="uint8_t"/> </array> </parameter> <parameter name="level" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="390">The mipmap level to update (Normally 0 for the largest, base texture)</doc> <type name="gint" c:type="int"/> </parameter> </parameters> </method> <method name="set_premultiplied" c:identifier="cogl_texture_set_premultiplied" version="1.18"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="197">Affects the internal storage format for this texture by specifying whether red, green and blue color components should be stored as pre-multiplied alpha values. This api affects how data is uploaded to the GPU since Cogl will convert source data to have premultiplied or unpremultiplied components according to this state. For example if you create a texture via cogl_texture_2d_new_with_size() and then upload data via cogl_texture_set_data() passing a source format of %COGL_PIXEL_FORMAT_RGBA_8888 then Cogl will internally multiply the red, green and blue components of the source data by the alpha component, for each pixel so that the internally stored data has pre-multiplied alpha components. If you instead upload data that already has pre-multiplied components by passing %COGL_PIXEL_FORMAT_RGBA_8888_PRE as the source format to cogl_texture_set_data() then the data can be uploaded without being converted. By default the @premultipled state is @TRUE.</doc> <source-position filename="cogl/cogl/cogl-texture.h" line="229"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="texture" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="199">a #CoglTexture pointer.</doc> <type name="Texture" c:type="CoglTexture*"/> </instance-parameter> <parameter name="premultiplied" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="200">Whether any internally stored red, green or blue components are pre-multiplied by an alpha component.</doc> <type name="gboolean" c:type="gboolean"/> </parameter> </parameters> </method> <method name="set_region" c:identifier="cogl_texture_set_region"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="343">Sets the pixels in a rectangular subregion of @texture from an in-memory buffer containing pixel data. <note>The region set can't be larger than the source @data</note></doc> <source-position filename="cogl/cogl/cogl-texture.h" line="370"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="366">%TRUE if the subregion upload was successful, and %FALSE otherwise</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="texture" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="345">a #CoglTexture.</doc> <type name="Texture" c:type="CoglTexture*"/> </instance-parameter> <parameter name="src_x" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="346">upper left coordinate to use from source data.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="src_y" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="347">upper left coordinate to use from source data.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="dst_x" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="348">upper left destination horizontal coordinate.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="dst_y" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="349">upper left destination vertical coordinate.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="dst_width" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="350">width of destination region to write. (Must be less than or equal to @width)</doc> <type name="guint" c:type="unsigned int"/> </parameter> <parameter name="dst_height" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="352">height of destination region to write. (Must be less than or equal to @height)</doc> <type name="guint" c:type="unsigned int"/> </parameter> <parameter name="width" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="354">width of source data buffer.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="height" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="355">height of source data buffer.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="format" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="356">the #CoglPixelFormat used in the source buffer.</doc> <type name="PixelFormat" c:type="CoglPixelFormat"/> </parameter> <parameter name="rowstride" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="357">rowstride of source buffer (computed from width if none specified)</doc> <type name="guint" c:type="unsigned int"/> </parameter> <parameter name="data" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="359">the actual pixel data.</doc> <array zero-terminated="0" c:type="const uint8_t*"> <type name="guint8" c:type="uint8_t"/> </array> </parameter> </parameters> </method> <method name="set_region_from_bitmap" c:identifier="cogl_texture_set_region_from_bitmap" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="443">Copies a specified source region from @bitmap to the position (@src_x, @src_y) of the given destination texture @handle. <note>The region updated can't be larger than the source bitmap</note></doc> <source-position filename="cogl/cogl/cogl-texture.h" line="469"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="462">%TRUE if the subregion upload was successful, and %FALSE otherwise</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <instance-parameter name="texture" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="445">a #CoglTexture pointer</doc> <type name="Texture" c:type="CoglTexture*"/> </instance-parameter> <parameter name="src_x" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="446">upper left coordinate to use from the source bitmap.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="src_y" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="447">upper left coordinate to use from the source bitmap</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="dst_x" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="448">upper left destination horizontal coordinate.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="dst_y" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="449">upper left destination vertical coordinate.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="dst_width" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="450">width of destination region to write. (Must be less than or equal to the bitmap width)</doc> <type name="guint" c:type="unsigned int"/> </parameter> <parameter name="dst_height" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="452">height of destination region to write. (Must be less than or equal to the bitmap height)</doc> <type name="guint" c:type="unsigned int"/> </parameter> <parameter name="bitmap" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="454">The source bitmap to read from</doc> <type name="Bitmap" c:type="CoglBitmap*"/> </parameter> </parameters> </method> </interface> <class name="Texture2D" c:symbol-prefix="texture_2d" c:type="CoglTexture2D" parent="Object" glib:type-name="CoglTexture2D" glib:get-type="cogl_texture_2d_get_gtype" glib:fundamental="1"> <implements name="Texture"/> <constructor name="new_from_bitmap" c:identifier="cogl_texture_2d_new_from_bitmap" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d.h" line="190">Creates a low-level #CoglTexture2D texture based on data residing in a #CoglBitmap. The storage for the texture is not allocated before this function returns. You can call cogl_texture_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 being 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_set_components() and cogl_texture_set_premultiplied().</doc> <source-position filename="cogl/cogl/cogl-texture-2d.h" line="214"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d.h" line="208">A newly allocated #CoglTexture2D</doc> <type name="Texture2D" c:type="CoglTexture2D*"/> </return-value> <parameters> <parameter name="bitmap" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d.h" line="192">A #CoglBitmap</doc> <type name="Bitmap" c:type="CoglBitmap*"/> </parameter> </parameters> </constructor> <constructor name="new_from_data" c:identifier="cogl_texture_2d_new_from_data" version="2.0" introspectable="0" throws="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d.h" line="148">Creates a low-level #CoglTexture2D texture based on data residing in memory. <note>This api will always immediately allocate GPU memory for the texture and upload the given data so that the @data pointer does not need to remain valid once this function returns. This means it is not possible to configure the texture before it is allocated. If you do need to configure the texture before allocation (to specify constraints on the internal format for example) then you can instead create a #CoglBitmap for your data and use cogl_texture_2d_new_from_bitmap() or use cogl_texture_2d_new_with_size() and then upload data using cogl_texture_set_data()</note></doc> <source-position filename="cogl/cogl/cogl-texture-2d.h" line="182"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d.h" line="174">A newly allocated #CoglTexture2D, or if the size is not supported (because it is too large or a non-power-of-two size that the hardware doesn't support) it will return %NULL and set @error.</doc> <type name="Texture2D" c:type="CoglTexture2D*"/> </return-value> <parameters> <parameter name="ctx" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d.h" line="150">A #CoglContext</doc> <type name="Context" c:type="CoglContext*"/> </parameter> <parameter name="width" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d.h" line="151">width of texture in pixels</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="height" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d.h" line="152">height of texture in pixels</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="format" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d.h" line="153">the #CoglPixelFormat the buffer is stored in in RAM</doc> <type name="PixelFormat" c:type="CoglPixelFormat"/> </parameter> <parameter name="rowstride" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d.h" line="154">the memory offset in bytes between the starts of scanlines in @data. A value of 0 will make Cogl automatically calculate @rowstride from @width and @format.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="data" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d.h" line="157">pointer the memory region where the source buffer resides</doc> <type name="guint8" c:type="const uint8_t*"/> </parameter> </parameters> </constructor> <constructor name="new_from_egl_image_external" c:identifier="cogl_texture_2d_new_from_egl_image_external" introspectable="0" throws="1"> <source-position filename="cogl/cogl/cogl-texture-2d.h" line="240"/> <return-value transfer-ownership="full"> <type name="Texture2D" c:type="CoglTexture2D*"/> </return-value> <parameters> <parameter name="ctx" transfer-ownership="none"> <type name="Context" c:type="CoglContext*"/> </parameter> <parameter name="width" transfer-ownership="none"> <type name="gint" c:type="int"/> </parameter> <parameter name="height" transfer-ownership="none"> <type name="gint" c:type="int"/> </parameter> <parameter name="alloc" transfer-ownership="none" scope="notified" closure="4" destroy="5"> <type name="Texture2DEGLImageExternalAlloc" c:type="CoglTexture2DEGLImageExternalAlloc"/> </parameter> <parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1"> <type name="gpointer" c:type="gpointer"/> </parameter> <parameter name="destroy" transfer-ownership="none" scope="async"> <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/> </parameter> </parameters> </constructor> <constructor name="new_from_file" c:identifier="cogl_texture_2d_new_from_file" version="1.16" introspectable="0" throws="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d.h" line="119">Creates a low-level #CoglTexture2D texture from an image file. The storage for the texture is not allocated before this function returns. You can call cogl_texture_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 being 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_set_components() and cogl_texture_set_premultiplied().</doc> <source-position filename="cogl/cogl/cogl-texture-2d.h" line="144"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d.h" line="138">A newly created #CoglTexture2D or %NULL on failure and @error will be updated.</doc> <type name="Texture2D" c:type="CoglTexture2D*"/> </return-value> <parameters> <parameter name="ctx" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d.h" line="121">A #CoglContext</doc> <type name="Context" c:type="CoglContext*"/> </parameter> <parameter name="filename" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d.h" line="122">the file to load</doc> <type name="utf8" c:type="const char*"/> </parameter> </parameters> </constructor> <constructor name="new_with_size" c:identifier="cogl_texture_2d_new_with_size" version="2.0" introspectable="0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d.h" line="90">Creates a low-level #CoglTexture2D texture with a given @width and @height that your GPU can texture from directly. The storage for the texture is not allocated before this function returns. You can call cogl_texture_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 being 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_set_components() and cogl_texture_set_premultiplied().</doc> <source-position filename="cogl/cogl/cogl-texture-2d.h" line="115"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d.h" line="110">A new #CoglTexture2D object with no storage yet allocated.</doc> <type name="Texture2D" c:type="CoglTexture2D*"/> </return-value> <parameters> <parameter name="ctx" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d.h" line="92">A #CoglContext</doc> <type name="Context" c:type="CoglContext*"/> </parameter> <parameter name="width" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d.h" line="93">Width of the texture to allocate</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="height" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d.h" line="94">Height of the texture to allocate</doc> <type name="gint" c:type="int"/> </parameter> </parameters> </constructor> <method name="egl_image_external_alloc_finish" c:identifier="cogl_texture_2d_egl_image_external_alloc_finish"> <source-position filename="cogl/cogl/cogl-texture-2d.h" line="252"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="tex_2d" transfer-ownership="none"> <type name="Texture2D" c:type="CoglTexture2D*"/> </instance-parameter> <parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1"> <type name="gpointer" c:type="void*"/> </parameter> <parameter name="destroy" transfer-ownership="none" scope="async"> <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/> </parameter> </parameters> </method> <method name="egl_image_external_bind" c:identifier="cogl_texture_2d_egl_image_external_bind"> <source-position filename="cogl/cogl/cogl-texture-2d.h" line="249"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <instance-parameter name="tex_2d" transfer-ownership="none"> <type name="Texture2D" c:type="CoglTexture2D*"/> </instance-parameter> </parameters> </method> </class> <callback name="Texture2DEGLImageExternalAlloc" c:type="CoglTexture2DEGLImageExternalAlloc" throws="1"> <source-position filename="cogl/cogl/cogl-texture-2d.h" line="232"/> <return-value transfer-ownership="none"> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="tex_2d" transfer-ownership="none"> <type name="Texture2D" c:type="CoglTexture2D*"/> </parameter> <parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="1"> <type name="gpointer" c:type="gpointer"/> </parameter> </parameters> </callback> <class name="Texture2DSliced" c:symbol-prefix="texture_2d_sliced" c:type="CoglTexture2DSliced" parent="Object" glib:type-name="CoglTexture2DSliced" glib:get-type="cogl_texture_2d_sliced_get_gtype" glib:fundamental="1"> <implements name="Texture"/> <constructor name="new_from_bitmap" c:identifier="cogl_texture_2d_sliced_new_from_bitmap" version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="241">Creates a new #CoglTexture2DSliced texture based on data residing in a bitmap. A #CoglTexture2DSliced may internally be comprised of 1 or more #CoglTexture2D textures depending on GPU limitations. For example if the GPU only supports power-of-two sized textures then a sliced texture will turn a non-power-of-two size into a combination of smaller power-of-two sized textures. If the requested texture size is larger than is supported by the hardware then the texture will be sliced into smaller textures that can be accessed by the hardware. @max_waste is used as a threshold for recursively slicing the right-most or bottom-most slices into smaller sizes until the wasted padding at the bottom and right of the textures is less than specified. A negative @max_waste will disable slicing. The storage for the texture is not allocated before this function returns. You can call cogl_texture_allocate() to explicitly allocate the underlying storage or let Cogl automatically allocate storage lazily. <note>It's possible for the allocation of a sliced texture to fail later due to impossible slicing constraints if a negative @max_waste value is given. If the given virtual texture size is larger than is supported by the hardware but slicing is disabled the texture size would be too large to handle.</note></doc> <source-position filename="cogl/cogl/cogl-texture-2d-sliced.h" line="283"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="277">A newly created #CoglTexture2DSliced or %NULL on failure and @error will be updated.</doc> <type name="Texture2DSliced" c:type="CoglTexture2DSliced*"/> </return-value> <parameters> <parameter name="bmp" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="243">A #CoglBitmap</doc> <type name="Bitmap" c:type="CoglBitmap*"/> </parameter> <parameter name="max_waste" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="244">The threshold of how wide a strip of wasted texels are allowed along the right and bottom textures before they must be sliced to reduce the amount of waste. A negative can be passed to disable slicing.</doc> <type name="gint" c:type="int"/> </parameter> </parameters> </constructor> <constructor name="new_from_data" c:identifier="cogl_texture_2d_sliced_new_from_data" version="1.16" introspectable="0" throws="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="176">Creates a new #CoglTexture2DSliced texture based on data residing in memory. A #CoglTexture2DSliced may internally be comprised of 1 or more #CoglTexture2D textures depending on GPU limitations. For example if the GPU only supports power-of-two sized textures then a sliced texture will turn a non-power-of-two size into a combination of smaller power-of-two sized textures. If the requested texture size is larger than is supported by the hardware then the texture will be sliced into smaller textures that can be accessed by the hardware. @max_waste is used as a threshold for recursively slicing the right-most or bottom-most slices into smaller sizes until the wasted padding at the bottom and right of the textures is less than specified. A negative @max_waste will disable slicing. <note>This api will always immediately allocate GPU memory for all the required texture slices and upload the given data so that the @data pointer does not need to remain valid once this function returns. This means it is not possible to configure the texture before it is allocated. If you do need to configure the texture before allocation (to specify constraints on the internal format for example) then you can instead create a #CoglBitmap for your data and use cogl_texture_2d_sliced_new_from_bitmap() or use cogl_texture_2d_sliced_new_with_size() and then upload data using cogl_texture_set_data()</note> <note>It's possible for the allocation of a sliced texture to fail due to impossible slicing constraints if a negative @max_waste value is given. If the given virtual texture size is larger than is supported by the hardware but slicing is disabled the texture size would be too large to handle.</note></doc> <source-position filename="cogl/cogl/cogl-texture-2d-sliced.h" line="232"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="226">A newly created #CoglTexture2DSliced or %NULL on failure and @error will be updated.</doc> <type name="Texture2DSliced" c:type="CoglTexture2DSliced*"/> </return-value> <parameters> <parameter name="ctx" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="178">A #CoglContext</doc> <type name="Context" c:type="CoglContext*"/> </parameter> <parameter name="width" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="179">width of texture in pixels</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="height" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="180">height of texture in pixels</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="max_waste" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="182">The threshold of how wide a strip of wasted texels are allowed along the right and bottom textures before they must be sliced to reduce the amount of waste. A negative can be passed to disable slicing.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="format" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="181">the #CoglPixelFormat the buffer is stored in in RAM</doc> <type name="PixelFormat" c:type="CoglPixelFormat"/> </parameter> <parameter name="rowstride" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="186">the memory offset in bytes between the start of each row in @data. A value of 0 will make Cogl automatically calculate @rowstride from @width and @format.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="data" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="189">pointer the memory region where the source buffer resides</doc> <type name="guint8" c:type="const uint8_t*"/> </parameter> </parameters> </constructor> <constructor name="new_from_file" c:identifier="cogl_texture_2d_sliced_new_from_file" version="1.16" introspectable="0" throws="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="128">Creates a #CoglTexture2DSliced from an image file. A #CoglTexture2DSliced may internally be comprised of 1 or more #CoglTexture2D textures depending on GPU limitations. For example if the GPU only supports power-of-two sized textures then a sliced texture will turn a non-power-of-two size into a combination of smaller power-of-two sized textures. If the requested texture size is larger than is supported by the hardware then the texture will be sliced into smaller textures that can be accessed by the hardware. @max_waste is used as a threshold for recursively slicing the right-most or bottom-most slices into smaller sizes until the wasted padding at the bottom and right of the textures is less than specified. A negative @max_waste will disable slicing. The storage for the texture is not allocated before this function returns. You can call cogl_texture_allocate() to explicitly allocate the underlying storage or let Cogl automatically allocate storage lazily. <note>It's possible for the allocation of a sliced texture to fail later due to impossible slicing constraints if a negative @max_waste value is given. If the given virtual texture size is larger than is supported by the hardware but slicing is disabled the texture size would be too large to handle.</note></doc> <source-position filename="cogl/cogl/cogl-texture-2d-sliced.h" line="171"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="165">A newly created #CoglTexture2DSliced or %NULL on failure and @error will be updated.</doc> <type name="Texture2DSliced" c:type="CoglTexture2DSliced*"/> </return-value> <parameters> <parameter name="ctx" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="130">A #CoglContext</doc> <type name="Context" c:type="CoglContext*"/> </parameter> <parameter name="filename" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="131">the file to load</doc> <type name="utf8" c:type="const char*"/> </parameter> <parameter name="max_waste" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="132">The threshold of how wide a strip of wasted texels are allowed along the right and bottom textures before they must be sliced to reduce the amount of waste. A negative can be passed to disable slicing.</doc> <type name="gint" c:type="int"/> </parameter> </parameters> </constructor> <constructor name="new_with_size" c:identifier="cogl_texture_2d_sliced_new_with_size" version="1.10" introspectable="0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="81">Creates a #CoglTexture2DSliced that may internally be comprised of 1 or more #CoglTexture2D textures depending on GPU limitations. For example if the GPU only supports power-of-two sized textures then a sliced texture will turn a non-power-of-two size into a combination of smaller power-of-two sized textures. If the requested texture size is larger than is supported by the hardware then the texture will be sliced into smaller textures that can be accessed by the hardware. @max_waste is used as a threshold for recursively slicing the right-most or bottom-most slices into smaller sizes until the wasted padding at the bottom and right of the textures is less than specified. A negative @max_waste will disable slicing. The storage for the texture is not allocated before this function returns. You can call cogl_texture_allocate() to explicitly allocate the underlying storage or let Cogl automatically allocate storage lazily. <note>It's possible for the allocation of a sliced texture to fail later due to impossible slicing constraints if a negative @max_waste value is given. If the given virtual texture size size is larger than is supported by the hardware but slicing is disabled the texture size would be too large to handle.</note></doc> <source-position filename="cogl/cogl/cogl-texture-2d-sliced.h" line="123"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="116">A new #CoglTexture2DSliced object with no storage allocated yet.</doc> <type name="Texture2DSliced" c:type="CoglTexture2DSliced*"/> </return-value> <parameters> <parameter name="ctx" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="83">A #CoglContext</doc> <type name="Context" c:type="CoglContext*"/> </parameter> <parameter name="width" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="84">The virtual width of your sliced texture.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="height" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="85">The virtual height of your sliced texture.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="max_waste" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="86">The threshold of how wide a strip of wasted texels are allowed along the right and bottom textures before they must be sliced to reduce the amount of waste. A negative can be passed to disable slicing.</doc> <type name="gint" c:type="int"/> </parameter> </parameters> </constructor> </class> <enumeration name="TextureComponents" version="1.18" c:type="CoglTextureComponents"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="127">See cogl_texture_set_components().</doc> <source-position filename="cogl/cogl/cogl-texture.h" line="148"/> <member name="a" value="1" c:identifier="COGL_TEXTURE_COMPONENTS_A"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="129">Only the alpha component</doc> </member> <member name="rg" value="2" c:identifier="COGL_TEXTURE_COMPONENTS_RG"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="130">Red and green components. Note that this can only be used if the %COGL_FEATURE_ID_TEXTURE_RG feature is advertised.</doc> </member> <member name="rgb" value="3" c:identifier="COGL_TEXTURE_COMPONENTS_RGB"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="133">Red, green and blue components</doc> </member> <member name="rgba" value="4" c:identifier="COGL_TEXTURE_COMPONENTS_RGBA"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="134">Red, green, blue and alpha components</doc> </member> <member name="depth" value="5" c:identifier="COGL_TEXTURE_COMPONENTS_DEPTH"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="135">Only a depth component</doc> </member> </enumeration> <enumeration name="TextureError" version="1.8" stability="Unstable" c:type="CoglTextureError"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="92">Error codes that can be thrown when allocating textures.</doc> <source-position filename="cogl/cogl/cogl-texture.h" line="110"/> <member name="size" value="0" c:identifier="COGL_TEXTURE_ERROR_SIZE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="94">Unsupported size</doc> </member> <member name="format" value="1" c:identifier="COGL_TEXTURE_ERROR_FORMAT"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="95">Unsupported format</doc> </member> <member name="bad_parameter" value="2" c:identifier="COGL_TEXTURE_ERROR_BAD_PARAMETER"> </member> <member name="type" value="3" c:identifier="COGL_TEXTURE_ERROR_TYPE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="96">A primitive texture type that is unsupported by the driver was used</doc> </member> </enumeration> <bitfield name="TextureFlags" version="1.0" c:type="CoglTextureFlags"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="187">Flags to pass to the cogl_texture_new_* family of functions.</doc> <source-position filename="cogl/cogl/cogl-types.h" line="209"/> <member name="none" value="0" c:identifier="COGL_TEXTURE_NONE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="189">No flags specified</doc> </member> <member name="no_auto_mipmap" value="1" c:identifier="COGL_TEXTURE_NO_AUTO_MIPMAP"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="190">Disables the automatic generation of the mipmap pyramid from the base level image whenever it is updated. The mipmaps are only generated when the texture is rendered with a mipmap filter so it should be free to leave out this flag when using other filtering modes</doc> </member> <member name="no_slicing" value="2" c:identifier="COGL_TEXTURE_NO_SLICING"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="195">Disables the slicing of the texture</doc> </member> <member name="no_atlas" value="4" c:identifier="COGL_TEXTURE_NO_ATLAS"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="196">Disables the insertion of the texture inside the texture atlas used by Cogl</doc> </member> </bitfield> <record name="TextureVertex" c:type="CoglTextureVertex"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="166">Used to specify vertex information when calling cogl_polygon()</doc> <source-position filename="cogl/cogl/cogl-types.h" line="184"/> <field name="x" writable="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="168">Model x-coordinate</doc> <type name="gfloat" c:type="float"/> </field> <field name="y" writable="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="169">Model y-coordinate</doc> <type name="gfloat" c:type="float"/> </field> <field name="z" writable="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="170">Model z-coordinate</doc> <type name="gfloat" c:type="float"/> </field> <field name="tx" writable="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="171">Texture x-coordinate</doc> <type name="gfloat" c:type="float"/> </field> <field name="ty" writable="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="172">Texture y-coordinate</doc> <type name="gfloat" c:type="float"/> </field> <field name="color" writable="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="173">The color to use at this vertex. This is ignored if use_color is %FALSE when calling cogl_polygon()</doc> <type name="Color" c:type="CoglColor"/> </field> </record> <record name="TraceContext" c:type="CoglTraceContext" disguised="1"> <source-position filename="cogl/cogl/cogl-trace.h" line="40"/> </record> <record name="TraceHead" c:type="CoglTraceHead"> <source-position filename="cogl/cogl/cogl-trace.h" line="46"/> <field name="begin_time" writable="1"> <type name="guint64" c:type="uint64_t"/> </field> <field name="name" writable="1"> <type name="utf8" c:type="const char*"/> </field> </record> <record name="UserDataKey" c:type="CoglUserDataKey" version="1.4"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="93">A #CoglUserDataKey is used to declare a key for attaching data to a #CoglObject using cogl_object_set_user_data. The typedef only exists as a formality to make code self documenting since only the unique address of a #CoglUserDataKey is used. Typically you would declare a static #CoglUserDataKey and set private data on an object something like this: |[ static CoglUserDataKey path_private_key; static void destroy_path_private_cb (void *data) { g_free (data); } static void my_path_set_data (CoglPipeline *pipeline, void *data) { cogl_object_set_user_data (COGL_OBJECT (pipeline), &private_key, data, destroy_pipeline_private_cb); } ]|</doc> <source-position filename="cogl/cogl/cogl-object.h" line="128"/> <field name="unused" writable="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="95">ignored.</doc> <type name="gint" c:type="int"/> </field> </record> <enumeration name="VerticesMode" version="1.0" c:type="CoglVerticesMode"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="328">Different ways of interpreting vertices when drawing.</doc> <source-position filename="cogl/cogl/cogl-types.h" line="356"/> <member name="points" value="0" c:identifier="COGL_VERTICES_MODE_POINTS"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="330">FIXME, equivalent to <constant>GL_POINTS</constant></doc> </member> <member name="lines" value="1" c:identifier="COGL_VERTICES_MODE_LINES"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="332">FIXME, equivalent to <constant>GL_LINES</constant></doc> </member> <member name="line_loop" value="2" c:identifier="COGL_VERTICES_MODE_LINE_LOOP"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="333">FIXME, equivalent to <constant>GL_LINE_LOOP</constant></doc> </member> <member name="line_strip" value="3" c:identifier="COGL_VERTICES_MODE_LINE_STRIP"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="335">FIXME, equivalent to <constant>GL_LINE_STRIP</constant></doc> </member> <member name="triangles" value="4" c:identifier="COGL_VERTICES_MODE_TRIANGLES"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="337">FIXME, equivalent to <constant>GL_TRIANGLES</constant></doc> </member> <member name="triangle_strip" value="5" c:identifier="COGL_VERTICES_MODE_TRIANGLE_STRIP"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="339">FIXME, equivalent to <constant>GL_TRIANGLE_STRIP</constant></doc> </member> <member name="triangle_fan" value="6" c:identifier="COGL_VERTICES_MODE_TRIANGLE_FAN"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="341">FIXME, equivalent to <constant>GL_TRIANGLE_FAN</constant></doc> </member> </enumeration> <enumeration name="Winding" c:type="CoglWinding"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="467">Enum used to represent the two directions of rotation. This can be used to set the front face for culling by calling cogl_pipeline_set_front_face_winding().</doc> <source-position filename="cogl/cogl/cogl-types.h" line="480"/> <member name="clockwise" value="0" c:identifier="COGL_WINDING_CLOCKWISE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="469">Vertices are in a clockwise order</doc> </member> <member name="counter_clockwise" value="1" c:identifier="COGL_WINDING_COUNTER_CLOCKWISE"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="470">Vertices are in a counter-clockwise order</doc> </member> </enumeration> <enumeration name="WinsysFeature" c:type="CoglWinsysFeature"> <source-position filename="cogl/cogl/cogl-types.h" line="465"/> <member name="multiple_onscreen" value="0" c:identifier="COGL_WINSYS_FEATURE_MULTIPLE_ONSCREEN"> </member> <member name="vblank_counter" value="1" c:identifier="COGL_WINSYS_FEATURE_VBLANK_COUNTER"> </member> <member name="vblank_wait" value="2" c:identifier="COGL_WINSYS_FEATURE_VBLANK_WAIT"> </member> <member name="texture_from_pixmap" value="3" c:identifier="COGL_WINSYS_FEATURE_TEXTURE_FROM_PIXMAP"> </member> <member name="swap_buffers_event" value="4" c:identifier="COGL_WINSYS_FEATURE_SWAP_BUFFERS_EVENT"> </member> <member name="swap_region" value="5" c:identifier="COGL_WINSYS_FEATURE_SWAP_REGION"> </member> <member name="swap_region_throttle" value="6" c:identifier="COGL_WINSYS_FEATURE_SWAP_REGION_THROTTLE"> </member> <member name="swap_region_synchronized" value="7" c:identifier="COGL_WINSYS_FEATURE_SWAP_REGION_SYNCHRONIZED"> </member> <member name="buffer_age" value="8" c:identifier="COGL_WINSYS_FEATURE_BUFFER_AGE"> </member> <member name="sync_and_complete_event" value="9" c:identifier="COGL_WINSYS_FEATURE_SYNC_AND_COMPLETE_EVENT"> </member> <member name="n_features" value="10" c:identifier="COGL_WINSYS_FEATURE_N_FEATURES"> </member> </enumeration> <callback name="XlibFilterFunc" c:type="CoglXlibFilterFunc" introspectable="0"> <source-position filename="cogl/cogl/cogl-xlib-renderer.h" line="89"/> <return-value transfer-ownership="none"> <type name="FilterReturn" c:type="CoglFilterReturn"/> </return-value> <parameters> <parameter name="event" transfer-ownership="none"> <type c:type="XEvent*"/> </parameter> <parameter name="data" transfer-ownership="none" nullable="1" allow-none="1"> <type name="gpointer" c:type="void*"/> </parameter> </parameters> </callback> <record name="_ColorSizeCheck" c:type="_CoglColorSizeCheck"> <source-position filename="cogl/cogl/cogl-types.h" line="164"/> <field name="compile_time_assert_CoglColor_size" writable="1"> <array zero-terminated="0" fixed-size="-1"> <type name="gchar" c:type="char"/> </array> </field> </record> <record name="_TextureVertexSizeCheck" c:type="_CoglTextureVertexSizeCheck"> <source-position filename="cogl/cogl/cogl-types.h" line="185"/> <field name="compile_time_assert_CoglTextureVertex_size" writable="1"> <array zero-terminated="0" fixed-size="-1"> <type name="gchar" c:type="char"/> </array> </field> </record> <function name="blend_string_error_quark" c:identifier="cogl_blend_string_error_quark"> <source-position filename="cogl/cogl/cogl-types.h" line="241"/> <return-value transfer-ownership="none"> <type name="guint32" c:type="uint32_t"/> </return-value> </function> <function name="blit_framebuffer" c:identifier="cogl_blit_framebuffer" throws="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1492">@return FALSE for an immediately detected error, TRUE otherwise. This blits a region of the color buffer of the source buffer to the destination buffer. This function should only be called if the COGL_FEATURE_ID_BLIT_FRAMEBUFFER feature is advertised. The source and destination rectangles are defined in offscreen framebuffer orientation. When copying between an offscreen and onscreen framebuffers, the image is y-flipped accordingly. The two buffers must have the same value types (e.g. floating-point, unsigned int, signed int, or fixed-point), but color formats do not need to match. This limitation comes from OpenGL ES 3.0 definition of glBlitFramebuffer. Note that this function differs a lot from the glBlitFramebuffer function provided by the GL_EXT_framebuffer_blit extension. Notably it doesn't support having different sizes for the source and destination rectangle. This doesn't seem like a particularly useful feature. If the application wanted to scale the results it may make more sense to draw a primitive instead. The GL function is documented to be affected by the scissor. This function therefore ensure that an empty clip stack is flushed before performing the blit which means the scissor is effectively ignored. The function also doesn't support specifying the buffers to copy and instead only the color buffer is copied. When copying the depth or stencil buffers the extension on GLES2.0 only supports copying the full buffer which would be awkward to document with this API. If we wanted to support that feature it may be better to have a separate function to copy the entire buffer for a given mask. The @c error argument is optional, it can be NULL. If it is not NULL and this function returns FALSE, an error object with a code from COGL_SYSTEM_ERROR will be created.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="1545"/> <return-value transfer-ownership="none"> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="framebuffer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1494">The source #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </parameter> <parameter name="dst" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1495">The destination #CoglFramebuffer</doc> <type name="Framebuffer" c:type="CoglFramebuffer*"/> </parameter> <parameter name="src_x" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1496">Source x position</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="src_y" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1497">Source y position</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="dst_x" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1498">Destination x position</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="dst_y" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1499">Destination y position</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="width" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1500">Width of region to copy</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="height" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1501">Height of region to copy</doc> <type name="gint" c:type="int"/> </parameter> </parameters> </function> <function-macro name="clear_object" c:identifier="cogl_clear_object" introspectable="0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="79">Clears a reference to a #CoglObject. @object_ptr must not be %NULL. If the reference is %NULL then this function does nothing. Otherwise, the reference count of the object is decreased using cogl_object_unref() and the pointer is set to %NULL.</doc> <source-position filename="cogl/cogl/cogl-object.h" line="91"/> <parameters> <parameter name="object_ptr"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="81">a pointer to a #CoglObject reference</doc> </parameter> </parameters> </function-macro> <function name="clutter_winsys_has_feature_CLUTTER" c:identifier="cogl_clutter_winsys_has_feature_CLUTTER"> <source-position filename="cogl/cogl/deprecated/cogl-clutter.h" line="41"/> <return-value transfer-ownership="none"> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="feature" transfer-ownership="none"> <type name="WinsysFeature" c:type="CoglWinsysFeature"/> </parameter> </parameters> </function> <docsection name="cogl"> <doc xml:space="preserve" filename="cogl/cogl/cogl.h" line="130">General utility functions for COGL.</doc> </docsection> <docsection name="cogl-bitmap"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="60">Cogl allows loading image data into memory as CoglBitmaps without loading them immediately into GPU textures. #CoglBitmap is available since Cogl 1.0</doc> </docsection> <docsection name="cogl-color"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="38">#CoglColor is a simple structure holding the definition of a color such that it can be efficiently used by GL</doc> </docsection> <docsection name="cogl-context"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="54">A #CoglContext is the top most sandbox of Cogl state for an application or toolkit. Its main purpose is to act as a sandbox for the memory management of state objects. Normally an application will only create a single context since there is no way to share resources between contexts. For those familiar with OpenGL or perhaps Cairo it should be understood that unlike these APIs a Cogl context isn't a rendering context as such. In other words Cogl doesn't aim to provide a state machine style model for configuring rendering parameters. Most rendering state in Cogl is directly associated with user managed objects called pipelines and geometry is drawn with a specific pipeline object to a framebuffer object and those 3 things fully define the state for drawing. This is an important part of Cogl's design since it helps you write orthogonal rendering components that can all access the same GPU without having to worry about what state other components have left you with. <note><para>Cogl does not maintain internal references to the context for resources that depend on the context so applications. This is to help applications control the lifetime a context without us needing to introduce special api to handle the breakup of internal circular references due to internal resources and caches associated with the context. One a context has been destroyed then all directly or indirectly dependent resources will be in an inconsistent state and should not be manipulated or queried in any way. For applications that rely on the operating system to clean up resources this policy shouldn't affect them, but for applications that need to carefully destroy and re-create Cogl contexts multiple times throughout their lifetime (such as Android applications) they should be careful to destroy all context dependent resources, such as framebuffers or textures etc before unrefing and destroying the context.</para></note></doc> </docsection> <docsection name="cogl-framebuffer"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="50">Framebuffers are a collection of buffers that can be rendered too. A framebuffer may be comprised of one or more color buffers, an optional depth buffer and an optional stencil buffer. Other configuration parameters are associated with framebuffers too such as whether the framebuffer supports multi-sampling (an anti-aliasing technique) or dithering. There are two kinds of framebuffer in Cogl, #CoglOnscreen framebuffers and #CoglOffscreen framebuffers. As the names imply offscreen framebuffers are for rendering something offscreen (perhaps to a texture which is bound as one of the color buffers). The exact semantics of onscreen framebuffers depends on the window system backend that you are using, but typically you can expect rendering to a #CoglOnscreen framebuffer will be immediately visible to the user. If you want to create a new framebuffer then you should start by looking at the #CoglOnscreen and #CoglOffscreen constructor functions, such as cogl_offscreen_new_with_texture() or cogl_onscreen_new(). The #CoglFramebuffer interface deals with all aspects that are common between those two types of framebuffer. Setup of a new CoglFramebuffer happens in two stages. There is a configuration stage where you specify all the options and ancillary buffers you want associated with your framebuffer and then when you are happy with the configuration you can "allocate" the framebuffer using cogl_framebuffer_allocate(). Technically explicitly calling cogl_framebuffer_allocate() is optional for convenience and the framebuffer will automatically be allocated when you first try to draw to it, but if you do the allocation manually then you can also catch any possible errors that may arise from your configuration.</doc> </docsection> <docsection name="cogl-material"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-material-compat.h" line="45">COGL allows creating and manipulating materials used to fill in geometry. Materials may simply be lighting attributes (such as an ambient and diffuse colour) or might represent one or more textures blended together.</doc> </docsection> <docsection name="cogl-offscreen"> <doc xml:space="preserve" filename="cogl/cogl/cogl-offscreen.h" line="45">Cogl allows creating and operating on offscreen framebuffers.</doc> </docsection> <docsection name="cogl-pipeline"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline.h" line="51">Cogl allows creating and manipulating objects representing the full configuration of the GPU pipeline. In simplified terms the GPU pipeline takes primitive geometry as the input, it first performs vertex processing, allowing you to deform your geometry, then rasterizes that (turning it from pure geometry into fragments) then performs fragment processing including depth testing and texture mapping. Finally it blends the result with the framebuffer.</doc> </docsection> <docsection name="cogl-pixel-format"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="49">The pixel format of an image descrbes how the bits of each pixel are represented in memory. For example: an image can be laid out as one long sequence of pixels, where each pixel is a sequence of 8 bits of Red, Green and Blue. The amount of bits that are used can be different for each pixel format, as well as the components (for example an Alpha layer to include transparency, or non_RGBA). Other examples of factors that can influence the layout in memory are the system's endianness.</doc> </docsection> <docsection name="cogl-shaders"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="44">Cogl allows accessing the GL programmable pipeline in order to create vertex and fragment shaders. When using GLSL Cogl provides replacement names for most of the builtin varyings and uniforms. It is recommended to use these names wherever possible to increase portability between OpenGL 2.0 and GLES 2.0. GLES 2.0 does not have most of the builtins under their original names so they will only work with the Cogl names. For use in all GLSL shaders, the Cogl builtins are as follows: <tip> <glosslist> <glossentry> <glossterm>uniform mat4 <emphasis>cogl_modelview_matrix</emphasis></glossterm> <glossdef><para> The current modelview matrix. This is equivalent to #gl_ModelViewMatrix. </para></glossdef> </glossentry> <glossentry> <glossterm>uniform mat4 <emphasis>cogl_projection_matrix</emphasis></glossterm> <glossdef><para> The current projection matrix. This is equivalent to #gl_ProjectionMatrix. </para></glossdef> </glossentry> <glossentry> <glossterm>uniform mat4 <emphasis>cogl_modelview_projection_matrix</emphasis></glossterm> <glossdef><para> The combined modelview and projection matrix. A vertex shader would typically use this to transform the incoming vertex position. The separate modelview and projection matrices are usually only needed for lighting calculations. This is equivalent to #gl_ModelViewProjectionMatrix. </para></glossdef> </glossentry> <glossentry> <glossterm>uniform mat4 <emphasis>cogl_texture_matrix</emphasis>[]</glossterm> <glossdef><para> An array of matrices for transforming the texture coordinates. This is equivalent to #gl_TextureMatrix. </para></glossdef> </glossentry> </glosslist> </tip> In a vertex shader, the following are also available: <tip> <glosslist> <glossentry> <glossterm>attribute vec4 <emphasis>cogl_position_in</emphasis></glossterm> <glossdef><para> The incoming vertex position. This is equivalent to #gl_Vertex. </para></glossdef> </glossentry> <glossentry> <glossterm>attribute vec4 <emphasis>cogl_color_in</emphasis></glossterm> <glossdef><para> The incoming vertex color. This is equivalent to #gl_Color. </para></glossdef> </glossentry> <glossentry> <glossterm>attribute vec4 <emphasis>cogl_tex_coord_in</emphasis></glossterm> <glossdef><para> The texture coordinate for the first texture unit. This is equivalent to #gl_MultiTexCoord0. </para></glossdef> </glossentry> <glossentry> <glossterm>attribute vec4 <emphasis>cogl_tex_coord0_in</emphasis></glossterm> <glossdef><para> The texture coordinate for the first texture unit. This is equivalent to #gl_MultiTexCoord0. There is also #cogl_tex_coord1_in and so on. </para></glossdef> </glossentry> <glossentry> <glossterm>attribute vec3 <emphasis>cogl_normal_in</emphasis></glossterm> <glossdef><para> The normal of the vertex. This is equivalent to #gl_Normal. </para></glossdef> </glossentry> <glossentry> <glossterm>vec4 <emphasis>cogl_position_out</emphasis></glossterm> <glossdef><para> The calculated position of the vertex. This must be written to in all vertex shaders. This is equivalent to #gl_Position. </para></glossdef> </glossentry> <glossentry> <glossterm>float <emphasis>cogl_point_size_out</emphasis></glossterm> <glossdef><para> The calculated size of a point. This is equivalent to #gl_PointSize. </para></glossdef> </glossentry> <glossentry> <glossterm>varying vec4 <emphasis>cogl_color_out</emphasis></glossterm> <glossdef><para> The calculated color of a vertex. This is equivalent to #gl_FrontColor. </para></glossdef> </glossentry> <glossentry> <glossterm>varying vec4 <emphasis>cogl_tex_coord_out</emphasis>[]</glossterm> <glossdef><para> An array of calculated texture coordinates for a vertex. This is equivalent to #gl_TexCoord. </para></glossdef> </glossentry> </glosslist> </tip> In a fragment shader, the following are also available: <tip> <glosslist> <glossentry> <glossterm>varying vec4 <emphasis>cogl_color_in</emphasis></glossterm> <glossdef><para> The calculated color of a vertex. This is equivalent to #gl_FrontColor. </para></glossdef> </glossentry> <glossentry> <glossterm>varying vec4 <emphasis>cogl_tex_coord_in</emphasis>[]</glossterm> <glossdef><para> An array of calculated texture coordinates for a vertex. This is equivalent to #gl_TexCoord. </para></glossdef> </glossentry> <glossentry> <glossterm>vec4 <emphasis>cogl_color_out</emphasis></glossterm> <glossdef><para> The final calculated color of the fragment. All fragment shaders must write to this variable. This is equivalent to #gl_FrontColor. </para></glossdef> </glossentry> <glossentry> <glossterm>float <emphasis>cogl_depth_out</emphasis></glossterm> <glossdef><para> An optional output variable specifying the depth value to use for this fragment. This is equivalent to #gl_FragDepth. </para></glossdef> </glossentry> <glossentry> <glossterm>bool <emphasis>cogl_front_facing</emphasis></glossterm> <glossdef><para> A readonly variable that will be true if the current primitive is front facing. This can be used to implement two-sided coloring algorithms. This is equivalent to #gl_FrontFacing. </para></glossdef> </glossentry> </glosslist> </tip> It's worth nothing that this API isn't what Cogl would like to have in the long term and it may be removed in Cogl 2.0. The experimental #CoglShader API is the proposed replacement.</doc> </docsection> <docsection name="cogl-texture"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="63">Cogl allows creating and manipulating textures using a uniform API that tries to hide all the various complexities of creating, loading and manipulating textures.</doc> </docsection> <docsection name="cogl-texture-2d"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d.h" line="49">These functions allow low-level 2D textures to be allocated. These differ from sliced textures for example which may internally be made up of multiple 2D textures, or atlas textures where Cogl must internally modify user texture coordinates before they can be used by the GPU.</doc> </docsection> <docsection name="cogl-texture-2d-sliced"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="39">These functions allow high-level meta textures (See the #CoglMetaTexture interface) to be allocated that may internally be comprised of multiple 2D texture "slices" with power-of-two sizes. This API can be useful when working with GPUs that don't have native support for non-power-of-two textures or if you want to load a texture that is larger than the GPUs maximum texture size limits. The algorithm for slicing works by first trying to map a virtual size to the next larger power-of-two size and then seeing how many wasted pixels that would result in. For example if you have a virtual texture that's 259 texels wide, the next pot size = 512 and the amount of waste would be 253 texels. If the amount of waste is above a max-waste threshold then we would next slice that texture into one that's 256 texels and then looking at how many more texels remain unallocated after that we choose the next power-of-two size. For the example of a 259 texel image that would mean having a 256 texel wide texture, leaving 3 texels unallocated so we'd then create a 4 texel wide texture - now there is only one texel of waste. The algorithm continues to slice the right most textures until the amount of waste is less than or equal to a specified max-waste threshold. The same logic for slicing from left to right is also applied from top to bottom.</doc> </docsection> <docsection name="cogl-types"> <doc xml:space="preserve" filename="cogl/cogl/cogl-types.h" line="50">General types used by various Cogl functions.</doc> </docsection> <function name="color_equal" c:identifier="cogl_color_equal" moved-to="Color.equal" version="1.0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="502">Compares two #CoglColor<!-- -->s and checks if they are the same. This function can be passed to g_hash_table_new() as the @key_equal_func parameter, when using #CoglColor<!-- -->s as keys in a #GHashTable.</doc> <source-position filename="cogl/cogl/cogl-color.h" line="517"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="512">%TRUE if the two colors are the same.</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="v1" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="504">a #CoglColor</doc> <type name="gpointer" c:type="void*"/> </parameter> <parameter name="v2" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="505">a #CoglColor</doc> <type name="gpointer" c:type="void*"/> </parameter> </parameters> </function> <function name="color_init_from_hsl" c:identifier="cogl_color_init_from_hsl" moved-to="Color.init_from_hsl" version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="539">Converts a color expressed in HLS (hue, luminance and saturation) values into a #CoglColor.</doc> <source-position filename="cogl/cogl/cogl-color.h" line="552"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="color" direction="out" caller-allocates="1" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="541">return location for a #CoglColor</doc> <type name="Color" c:type="CoglColor*"/> </parameter> <parameter name="hue" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="542">hue value, in the 0 .. 360 range</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="saturation" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="543">saturation value, in the 0 .. 1 range</doc> <type name="gfloat" c:type="float"/> </parameter> <parameter name="luminance" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-color.h" line="544">luminance value, in the 0 .. 1 range</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </function> <function name="create_program" c:identifier="cogl_create_program" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="298">Create a new cogl program object that can be used to replace parts of the GL rendering pipeline with custom code.</doc> <doc-deprecated xml:space="preserve">Use #CoglSnippet api</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-shader.h" line="309"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="304">a new cogl program.</doc> <type name="Handle" c:type="CoglHandle"/> </return-value> </function> <function name="create_shader" c:identifier="cogl_create_shader" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="238">Create a new shader handle, use cogl_shader_source() to set the source code to be used on it.</doc> <doc-deprecated xml:space="preserve">Use #CoglSnippet api</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-shader.h" line="250"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="245">a new shader handle.</doc> <type name="Handle" c:type="CoglHandle"/> </return-value> <parameters> <parameter name="shader_type" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="240">COGL_SHADER_TYPE_VERTEX or COGL_SHADER_TYPE_FRAGMENT.</doc> <type name="ShaderType" c:type="CoglShaderType"/> </parameter> </parameters> </function> <function name="debug_object_foreach_type" c:identifier="cogl_debug_object_foreach_type" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="217">Invokes @func once for each type of object that Cogl uses and passes a count of the number of objects for that type. This is intended to be used solely for debugging purposes to track down issues with objects leaking.</doc> <source-position filename="cogl/cogl/cogl-object.h" line="231"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="func" transfer-ownership="none" scope="call" closure="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="219">A callback function for each type</doc> <type name="DebugObjectForeachTypeCallback" c:type="CoglDebugObjectForeachTypeCallback"/> </parameter> <parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="220">A pointer to pass to @func</doc> <type name="gpointer" c:type="void*"/> </parameter> </parameters> </function> <function name="debug_object_print_instances" c:identifier="cogl_debug_object_print_instances" version="1.8" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-object.h" line="234">Prints a list of all the object types that Cogl uses along with the number of objects of that type that are currently in use. This is intended to be used solely for debugging purposes to track down issues with objects leaking.</doc> <source-position filename="cogl/cogl/cogl-object.h" line="246"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> </function> <function name="egl_texture_2d_new_from_image" c:identifier="cogl_egl_texture_2d_new_from_image" introspectable="0" throws="1"> <source-position filename="cogl/cogl/cogl-texture-2d.h" line="224"/> <return-value> <type name="Texture2D" c:type="CoglTexture2D*"/> </return-value> <parameters> <parameter name="ctx" transfer-ownership="none"> <type name="Context" c:type="CoglContext*"/> </parameter> <parameter name="width" transfer-ownership="none"> <type name="gint" c:type="int"/> </parameter> <parameter name="height" transfer-ownership="none"> <type name="gint" c:type="int"/> </parameter> <parameter name="format" transfer-ownership="none"> <type name="PixelFormat" c:type="CoglPixelFormat"/> </parameter> <parameter name="image" transfer-ownership="none"> <type c:type="EGLImageKHR"/> </parameter> <parameter name="flags" transfer-ownership="none"> <type name="EglImageFlags" c:type="CoglEglImageFlags"/> </parameter> </parameters> </function> <function name="flush" c:identifier="cogl_flush" version="1.0"> <doc xml:space="preserve" filename="cogl/cogl/cogl1-context.h" line="141">This function should only need to be called in exceptional circumstances. As an optimization Cogl drawing functions may batch up primitives internally, so if you are trying to use raw GL outside of Cogl you stand a better chance of being successful if you ask Cogl to flush any batched geometry before making your state changes. It only ensure that the underlying driver is issued all the commands necessary to draw the batched primitives. It provides no guarantees about when the driver will complete the rendering. This provides no guarantees about the GL state upon returning and to avoid confusing Cogl you should aim to restore any changes you make before resuming use of Cogl. If you are making state changes with the intention of affecting Cogl drawing primitives you are 100% on your own since you stand a good chance of conflicting with Cogl internals. For example clutter-gst which currently uses direct GL calls to bind ARBfp programs will very likely break when Cogl starts to use ARBfb programs itself for the material API.</doc> <source-position filename="cogl/cogl/cogl1-context.h" line="168"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> </function> <function name="foreach_feature" c:identifier="cogl_foreach_feature" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="271">Iterates through all the context level features currently supported for a given @context and for each feature @callback is called.</doc> <source-position filename="cogl/cogl/cogl-context.h" line="285"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="context" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="273">A #CoglContext pointer</doc> <type name="Context" c:type="CoglContext*"/> </parameter> <parameter name="callback" transfer-ownership="none" scope="call" closure="2"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="274">A #CoglFeatureCallback called for each supported feature</doc> <type name="FeatureCallback" c:type="CoglFeatureCallback"/> </parameter> <parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="276">Private data to pass to the callback</doc> <type name="gpointer" c:type="void*"/> </parameter> </parameters> </function> <function name="get_backface_culling_enabled" c:identifier="cogl_get_backface_culling_enabled" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/cogl1-context.h" line="127">Queries if backface culling has been enabled via cogl_set_backface_culling_enabled()</doc> <doc-deprecated xml:space="preserve">Use cogl_pipeline_get_cull_face_mode() instead</doc-deprecated> <source-position filename="cogl/cogl/cogl1-context.h" line="139"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl1-context.h" line="133">%TRUE if backface culling is enabled, and %FALSE otherwise</doc> <type name="gboolean" c:type="gboolean"/> </return-value> </function> <function name="get_depth_test_enabled" c:identifier="cogl_get_depth_test_enabled" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/cogl1-context.h" line="98">Queries if depth testing has been enabled via cogl_set_depth_test_enable()</doc> <doc-deprecated xml:space="preserve">Use cogl_pipeline_set_depth_state() instead</doc-deprecated> <source-position filename="cogl/cogl/cogl1-context.h" line="109"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl1-context.h" line="103">%TRUE if depth testing is enabled, and %FALSE otherwise</doc> <type name="gboolean" c:type="gboolean"/> </return-value> </function> <function name="get_graphics_reset_status" c:identifier="cogl_get_graphics_reset_status"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="311">Returns the graphics reset status as reported by GetGraphicsResetStatusARB defined in the ARB_robustness extension. Note that Cogl doesn't normally enable the ARB_robustness extension in which case this will only ever return #COGL_GRAPHICS_RESET_STATUS_NO_ERROR. Applications must explicitly use a backend specific method to request that errors get reported such as X11's cogl_xlib_renderer_request_reset_on_video_memory_purge().</doc> <source-position filename="cogl/cogl/cogl-context.h" line="329"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="326">a #CoglGraphicsResetStatus</doc> <type name="GraphicsResetStatus" c:type="CoglGraphicsResetStatus"/> </return-value> <parameters> <parameter name="context" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="313">a #CoglContext pointer</doc> <type name="Context" c:type="CoglContext*"/> </parameter> </parameters> </function> <function name="get_option_group" c:identifier="cogl_get_option_group" version="1.0" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/cogl1-context.h" line="47">Retrieves the #GOptionGroup used by Cogl to parse the command line options. Clutter uses this to handle the Cogl command line options during its initialization process.</doc> <doc-deprecated xml:space="preserve">Not replaced</doc-deprecated> <source-position filename="cogl/cogl/cogl1-context.h" line="61"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/cogl1-context.h" line="54">a #GOptionGroup</doc> <type name="GLib.OptionGroup" c:type="GOptionGroup*"/> </return-value> </function> <function name="get_proc_address" c:identifier="cogl_get_proc_address" introspectable="0"> <doc xml:space="preserve" filename="cogl/cogl/cogl1-context.h" line="64">Gets a pointer to a given GL or GL ES extension function. This acts as a wrapper around glXGetProcAddress() or whatever is the appropriate function for the current backend. <note>This function should not be used to query core opengl API symbols since eglGetProcAddress for example doesn't allow this and and may return a junk pointer if you do.</note></doc> <source-position filename="cogl/cogl/cogl1-context.h" line="80"/> <return-value> <doc xml:space="preserve" filename="cogl/cogl/cogl1-context.h" line="76">a pointer to the requested function or %NULL if the function is not available.</doc> <type name="GObject.Callback" c:type="GCallback"/> </return-value> <parameters> <parameter name="name" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl1-context.h" line="66">the name of the function.</doc> <type name="utf8" c:type="const char*"/> </parameter> </parameters> </function> <function name="handle_get_type" c:identifier="cogl_handle_get_type"> <source-position filename="cogl/cogl/cogl-types.h" line="87"/> <return-value transfer-ownership="none"> <type name="GType" c:type="GType"/> </return-value> </function> <function name="has_feature" c:identifier="cogl_has_feature" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="217">Checks if a given @feature is currently available Cogl does not aim to be a lowest common denominator API, it aims to expose all the interesting features of GPUs to application which means applications have some responsibility to explicitly check that certain features are available before depending on them.</doc> <source-position filename="cogl/cogl/cogl-context.h" line="236"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="229">%TRUE if the @feature is currently supported or %FALSE if not.</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="context" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="219">A #CoglContext pointer</doc> <type name="Context" c:type="CoglContext*"/> </parameter> <parameter name="feature" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="220">A #CoglFeatureID</doc> <type name="FeatureID" c:type="CoglFeatureID"/> </parameter> </parameters> </function> <function name="has_features" c:identifier="cogl_has_features" version="1.10" introspectable="0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="238">Checks if a list of features are all currently available. This checks all of the listed features using cogl_has_feature() and returns %TRUE if all the features are available or %FALSE otherwise.</doc> <source-position filename="cogl/cogl/cogl-context.h" line="256"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="249">%TRUE if all the features are available, %FALSE otherwise.</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="context" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="240">A #CoglContext pointer</doc> <type name="Context" c:type="CoglContext*"/> </parameter> <parameter name="..." transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="241">A 0 terminated list of CoglFeatureID<!-- -->s</doc> <varargs/> </parameter> </parameters> </function> <function name="is_bitmap" c:identifier="cogl_is_bitmap" version="1.0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="256">Checks whether @object is a #CoglBitmap</doc> <source-position filename="cogl/cogl/cogl-bitmap.h" line="268"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="262">%TRUE if the passed @object represents a bitmap, and %FALSE otherwise</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="object" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-bitmap.h" line="258">a #CoglObject pointer</doc> <type name="gpointer" c:type="void*"/> </parameter> </parameters> </function> <function name="is_context" c:identifier="cogl_is_context" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="159">Gets whether the given object references an existing context object.</doc> <source-position filename="cogl/cogl/cogl-context.h" line="172"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="165">%TRUE if the @object references a #CoglContext, %FALSE otherwise</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="object" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-context.h" line="161">An object or %NULL</doc> <type name="gpointer" c:type="void*"/> </parameter> </parameters> </function> <function name="is_frame_info" c:identifier="cogl_is_frame_info" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-frame-info.h" line="64">Gets whether the given object references a #CoglFrameInfo.</doc> <source-position filename="cogl/cogl/cogl-frame-info.h" line="76"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-frame-info.h" line="70">%TRUE if the object references a #CoglFrameInfo and %FALSE otherwise.</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="object" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-frame-info.h" line="66">A #CoglObject pointer</doc> <type name="gpointer" c:type="void*"/> </parameter> </parameters> </function> <function name="is_framebuffer" c:identifier="cogl_is_framebuffer" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1478">Gets whether the given object references a #CoglFramebuffer.</doc> <source-position filename="cogl/cogl/cogl-framebuffer.h" line="1490"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1484">%TRUE if the object references a #CoglFramebuffer and %FALSE otherwise.</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="object" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-framebuffer.h" line="1480">A #CoglObject pointer</doc> <type name="gpointer" c:type="void*"/> </parameter> </parameters> </function> <function name="is_pipeline" c:identifier="cogl_is_pipeline" version="2.0" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline.h" line="111">Gets whether the given @object references an existing pipeline object.</doc> <source-position filename="cogl/cogl/cogl-pipeline.h" line="124"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline.h" line="117">%TRUE if the @object references a #CoglPipeline, %FALSE otherwise</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="object" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pipeline.h" line="113">A #CoglObject</doc> <type name="gpointer" c:type="void*"/> </parameter> </parameters> </function> <function name="is_program" c:identifier="cogl_is_program" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="311">Gets whether the given handle references an existing program object.</doc> <doc-deprecated xml:space="preserve">Use #CoglSnippet api</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-shader.h" line="324"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="317">%TRUE if the handle references a program, %FALSE otherwise</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="handle" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="313">A CoglHandle</doc> <type name="Handle" c:type="CoglHandle"/> </parameter> </parameters> </function> <function name="is_shader" c:identifier="cogl_is_shader" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="252">Gets whether the given handle references an existing shader object.</doc> <doc-deprecated xml:space="preserve">Use #CoglSnippet api</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-shader.h" line="264"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="258">%TRUE if the handle references a shader, %FALSE otherwise</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="handle" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="254">A CoglHandle</doc> <type name="Handle" c:type="CoglHandle"/> </parameter> </parameters> </function> <function name="is_texture" c:identifier="cogl_is_texture"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="115">Gets whether the given object references a texture object.</doc> <source-position filename="cogl/cogl/cogl-texture.h" line="125"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="121">%TRUE if the @object references a texture, and %FALSE otherwise</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="object" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture.h" line="117">A #CoglObject pointer</doc> <type name="gpointer" c:type="void*"/> </parameter> </parameters> </function> <function name="is_texture_2d" c:identifier="cogl_is_texture_2d"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d.h" line="77">Gets whether the given object references an existing #CoglTexture2D object.</doc> <source-position filename="cogl/cogl/cogl-texture-2d.h" line="88"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d.h" line="84">%TRUE if the object references a #CoglTexture2D, %FALSE otherwise</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="object" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d.h" line="79">A #CoglObject</doc> <type name="gpointer" c:type="void*"/> </parameter> </parameters> </function> <function name="is_texture_2d_sliced" c:identifier="cogl_is_texture_2d_sliced" version="1.10" stability="Unstable"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="286">Gets whether the given object references a #CoglTexture2DSliced.</doc> <source-position filename="cogl/cogl/cogl-texture-2d-sliced.h" line="298"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="292">%TRUE if the object references a #CoglTexture2DSliced and %FALSE otherwise.</doc> <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="object" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-texture-2d-sliced.h" line="288">A #CoglObject pointer</doc> <type name="gpointer" c:type="void*"/> </parameter> </parameters> </function> <function name="pixel_format_get_bytes_per_pixel" c:identifier="cogl_pixel_format_get_bytes_per_pixel"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="263">Queries the number of bytes per pixel for a given format in the given plane.</doc> <source-position filename="cogl/cogl/cogl-pixel-format.h" line="274"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="271">The number of bytes per pixel in the given format's given plane.</doc> <type name="gint" c:type="int"/> </return-value> <parameters> <parameter name="format" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="265">The pixel format</doc> <type name="PixelFormat" c:type="CoglPixelFormat"/> </parameter> <parameter name="plane" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="266">The index of the plane (should not be more than the number of planes in the given format).</doc> <type name="gint" c:type="int"/> </parameter> </parameters> </function> <function name="pixel_format_get_n_planes" c:identifier="cogl_pixel_format_get_n_planes"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="316">Returns the number of planes the given CoglPixelFormat specifies.</doc> <source-position filename="cogl/cogl/cogl-pixel-format.h" line="325"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="322">The no. of planes of @format (at most %COGL_PIXEL_FORMAT_MAX_PLANES)</doc> <type name="gint" c:type="int"/> </return-value> <parameters> <parameter name="format" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="318">The format for which to get the number of planes</doc> <type name="PixelFormat" c:type="CoglPixelFormat"/> </parameter> </parameters> </function> <function name="pixel_format_to_string" c:identifier="cogl_pixel_format_to_string"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="327">Returns a string representation of @format, useful for debugging purposes.</doc> <source-position filename="cogl/cogl/cogl-pixel-format.h" line="336"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="333">A string representation of @format.</doc> <type name="utf8" c:type="const char*"/> </return-value> <parameters> <parameter name="format" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-pixel-format.h" line="329">a #CoglPixelFormat</doc> <type name="PixelFormat" c:type="CoglPixelFormat"/> </parameter> </parameters> </function> <function name="program_attach_shader" c:identifier="cogl_program_attach_shader" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="326">Attaches a shader to a program object. A program can have multiple vertex or fragment shaders but only one of them may provide a main() function. It is allowed to use a program with only a vertex shader or only a fragment shader.</doc> <doc-deprecated xml:space="preserve">Use #CoglSnippet api</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-shader.h" line="340"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="program_handle" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="328">a #CoglHandle for a shdaer program.</doc> <type name="Handle" c:type="CoglHandle"/> </parameter> <parameter name="shader_handle" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="329">a #CoglHandle for a vertex of fragment shader.</doc> <type name="Handle" c:type="CoglHandle"/> </parameter> </parameters> </function> <function name="program_get_uniform_location" c:identifier="cogl_program_get_uniform_location" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="357">Retrieve the location (offset) of a uniform variable in a shader program, a uniform is a variable that is constant for all vertices/fragments for a shader object and is possible to modify as an external parameter.</doc> <doc-deprecated xml:space="preserve">Use #CoglSnippet api instead</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-shader.h" line="371"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="366">the offset of a uniform in a specified program.</doc> <type name="gint" c:type="int"/> </return-value> <parameters> <parameter name="handle" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="359">a #CoglHandle for a shader program.</doc> <type name="Handle" c:type="CoglHandle"/> </parameter> <parameter name="uniform_name" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="360">the name of a uniform.</doc> <type name="utf8" c:type="const char*"/> </parameter> </parameters> </function> <function name="program_link" c:identifier="cogl_program_link" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="343">Links a program making it ready for use. Note that calling this function is optional. If it is not called the program will automatically be linked the first time it is used.</doc> <doc-deprecated xml:space="preserve">Use #CoglSnippet api</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-shader.h" line="355"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="handle" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="345">a #CoglHandle for a shader program.</doc> <type name="Handle" c:type="CoglHandle"/> </parameter> </parameters> </function> <function name="program_set_uniform_1f" c:identifier="cogl_program_set_uniform_1f" version="1.4" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="374">Changes the value of a floating point uniform for the given linked @program.</doc> <doc-deprecated xml:space="preserve">Use #CoglSnippet api instead</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-shader.h" line="389"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="program" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="376">A #CoglHandle for a linked program</doc> <type name="Handle" c:type="CoglHandle"/> </parameter> <parameter name="uniform_location" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="377">the uniform location retrieved from cogl_program_get_uniform_location().</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="value" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="379">the new value of the uniform.</doc> <type name="gfloat" c:type="float"/> </parameter> </parameters> </function> <function name="program_set_uniform_1i" c:identifier="cogl_program_set_uniform_1i" version="1.4" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="393">Changes the value of an integer uniform for the given linked @program.</doc> <doc-deprecated xml:space="preserve">Use #CoglSnippet api instead</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-shader.h" line="408"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="program" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="395">A #CoglHandle for a linked program</doc> <type name="Handle" c:type="CoglHandle"/> </parameter> <parameter name="uniform_location" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="396">the uniform location retrieved from cogl_program_get_uniform_location().</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="value" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="398">the new value of the uniform.</doc> <type name="gint" c:type="int"/> </parameter> </parameters> </function> <function name="program_set_uniform_float" c:identifier="cogl_program_set_uniform_float" version="1.4" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="412">Changes the value of a float vector uniform, or uniform array for the given linked @program.</doc> <doc-deprecated xml:space="preserve">Use #CoglSnippet api instead</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-shader.h" line="431"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="program" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="414">A #CoglHandle for a linked program</doc> <type name="Handle" c:type="CoglHandle"/> </parameter> <parameter name="uniform_location" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="415">the uniform location retrieved from cogl_program_get_uniform_location().</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="n_components" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="417">The number of components for the uniform. For example with glsl you'd use 3 for a vec3 or 4 for a vec4.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="count" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="419">For uniform arrays this is the array length otherwise just pass 1</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="value" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="421">the new value of the uniform[s].</doc> <array length="3" zero-terminated="0" c:type="const float*"> <type name="gfloat" c:type="float"/> </array> </parameter> </parameters> </function> <function name="program_set_uniform_int" c:identifier="cogl_program_set_uniform_int" version="1.4" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="437">Changes the value of a int vector uniform, or uniform array for the given linked @program.</doc> <doc-deprecated xml:space="preserve">Use #CoglSnippet api instead</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-shader.h" line="456"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="program" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="439">A #CoglHandle for a linked program</doc> <type name="Handle" c:type="CoglHandle"/> </parameter> <parameter name="uniform_location" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="440">the uniform location retrieved from cogl_program_get_uniform_location().</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="n_components" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="442">The number of components for the uniform. For example with glsl you'd use 3 for a vec3 or 4 for a vec4.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="count" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="444">For uniform arrays this is the array length otherwise just pass 1</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="value" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="446">the new value of the uniform[s].</doc> <array length="3" zero-terminated="0" c:type="const int*"> <type name="gint" c:type="int"/> </array> </parameter> </parameters> </function> <function name="program_set_uniform_matrix" c:identifier="cogl_program_set_uniform_matrix" version="1.4" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="462">Changes the value of a matrix uniform, or uniform array in the given linked @program.</doc> <doc-deprecated xml:space="preserve">Use #CoglSnippet api instead</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-shader.h" line="482"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="program" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="464">A #CoglHandle for a linked program</doc> <type name="Handle" c:type="CoglHandle"/> </parameter> <parameter name="uniform_location" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="465">the uniform location retrieved from cogl_program_get_uniform_location().</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="dimensions" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="467">The dimensions of the matrix. So for for example pass 2 for a 2x2 matrix or 3 for 3x3.</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="count" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="469">For uniform arrays this is the array length otherwise just pass 1</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="transpose" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="471">Whether to transpose the matrix when setting the uniform.</doc> <type name="gboolean" c:type="gboolean"/> </parameter> <parameter name="value" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="472">the new value of the uniform.</doc> <array length="3" zero-terminated="0" c:type="const float*"> <type name="gfloat" c:type="float"/> </array> </parameter> </parameters> </function> <function name="scanout_error_quark" c:identifier="cogl_scanout_error_quark" moved-to="Scanout.error_quark"> <return-value transfer-ownership="none"> <type name="GLib.Quark" c:type="GQuark"/> </return-value> </function> <function name="set_backface_culling_enabled" c:identifier="cogl_set_backface_culling_enabled" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/cogl1-context.h" line="111">Sets whether textures positioned so that their backface is showing should be hidden. This can be used to efficiently draw two-sided textures or fully closed cubes without enabling depth testing. This only affects calls to the cogl_rectangle* family of functions and cogl_vertex_buffer_draw*. Backface culling is disabled by default.</doc> <doc-deprecated xml:space="preserve">Use cogl_pipeline_set_cull_face_mode() instead</doc-deprecated> <source-position filename="cogl/cogl/cogl1-context.h" line="125"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="setting" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl1-context.h" line="113">%TRUE to enable backface culling or %FALSE to disable.</doc> <type name="gboolean" c:type="gboolean"/> </parameter> </parameters> </function> <function name="set_depth_test_enabled" c:identifier="cogl_set_depth_test_enabled" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/cogl1-context.h" line="82">Sets whether depth testing is enabled. If it is disabled then the order that actors are layered on the screen depends solely on the order specified using clutter_actor_raise() and clutter_actor_lower(), otherwise it will also take into account the actor's depth. Depth testing is disabled by default.</doc> <doc-deprecated xml:space="preserve">Use cogl_pipeline_set_depth_state() instead</doc-deprecated> <source-position filename="cogl/cogl/cogl1-context.h" line="96"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="setting" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl1-context.h" line="84">%TRUE to enable depth testing or %FALSE to disable.</doc> <type name="gboolean" c:type="gboolean"/> </parameter> </parameters> </function> <function name="set_tracing_disabled_on_thread" c:identifier="cogl_set_tracing_disabled_on_thread"> <source-position filename="cogl/cogl/cogl-trace.h" line="66"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="main_context" transfer-ownership="none"> <type name="GLib.MainContext" c:type="GMainContext*"/> </parameter> </parameters> </function> <function name="set_tracing_enabled_on_thread" c:identifier="cogl_set_tracing_enabled_on_thread"> <source-position filename="cogl/cogl/cogl-trace.h" line="61"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="main_context" transfer-ownership="none"> <type name="GLib.MainContext" c:type="GMainContext*"/> </parameter> <parameter name="group" transfer-ownership="none"> <type name="utf8" c:type="const char*"/> </parameter> <parameter name="filename" transfer-ownership="none"> <type name="utf8" c:type="const char*"/> </parameter> </parameters> </function> <function name="set_tracing_enabled_on_thread_with_fd" c:identifier="cogl_set_tracing_enabled_on_thread_with_fd"> <source-position filename="cogl/cogl/cogl-trace.h" line="56"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="main_context" transfer-ownership="none"> <type name="GLib.MainContext" c:type="GMainContext*"/> </parameter> <parameter name="group" transfer-ownership="none"> <type name="utf8" c:type="const char*"/> </parameter> <parameter name="fd" transfer-ownership="none"> <type name="gint" c:type="int"/> </parameter> </parameters> </function> <function name="shader_get_type" c:identifier="cogl_shader_get_type" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="284">Retrieves the type of a shader #CoglHandle</doc> <doc-deprecated xml:space="preserve">Use #CoglSnippet api</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-shader.h" line="296"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="290">%COGL_SHADER_TYPE_VERTEX if the shader is a vertex processor or %COGL_SHADER_TYPE_FRAGMENT if the shader is a frament processor</doc> <type name="ShaderType" c:type="CoglShaderType"/> </return-value> <parameters> <parameter name="handle" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="286">#CoglHandle for a shader.</doc> <type name="Handle" c:type="CoglHandle"/> </parameter> </parameters> </function> <function name="shader_source" c:identifier="cogl_shader_source" deprecated="1" deprecated-version="1.16"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="266">Replaces the current source associated with a shader with a new one. Please see <link linkend="cogl-Shaders-and-Programmable-Pipeline.description">above</link> for a description of the recommended format for the shader code.</doc> <doc-deprecated xml:space="preserve">Use #CoglSnippet api</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-shader.h" line="281"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="shader" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="268">#CoglHandle for a shader.</doc> <type name="Handle" c:type="CoglHandle"/> </parameter> <parameter name="source" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-shader.h" line="269">Shader source.</doc> <type name="utf8" c:type="const char*"/> </parameter> </parameters> </function> <function name="texture_error_quark" c:identifier="cogl_texture_error_quark" moved-to="Texture.error_quark"> <source-position filename="cogl/cogl/cogl-texture.h" line="113"/> <return-value transfer-ownership="none"> <type name="guint32" c:type="uint32_t"/> </return-value> </function> <function name="texture_new_from_bitmap" c:identifier="cogl_texture_new_from_bitmap" moved-to="Texture.new_from_bitmap" version="1.0" deprecated="1" deprecated-version="1.18"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="128">Creates a #CoglTexture from a #CoglBitmap.</doc> <doc-deprecated xml:space="preserve">Use specific constructors such as cogl_texture_2d_new_from_bitmap()</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="146"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="137">A newly created #CoglTexture or %NULL on failure</doc> <type name="Texture" c:type="CoglTexture*"/> </return-value> <parameters> <parameter name="bitmap" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="130">A #CoglBitmap pointer</doc> <type name="Bitmap" c:type="CoglBitmap*"/> </parameter> <parameter name="flags" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="131">Optional flags for the texture, or %COGL_TEXTURE_NONE</doc> <type name="TextureFlags" c:type="CoglTextureFlags"/> </parameter> <parameter name="internal_format" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="132">the #CoglPixelFormat to use for the GPU storage of the texture</doc> <type name="PixelFormat" c:type="CoglPixelFormat"/> </parameter> </parameters> </function> <function name="texture_new_from_data" c:identifier="cogl_texture_new_from_data" moved-to="Texture.new_from_data" version="0.8" deprecated="1" deprecated-version="1.18"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="91">Creates a new #CoglTexture based on data residing in memory.</doc> <doc-deprecated xml:space="preserve">Use specific constructors such as cogl_texture_2d_new_from_data()</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="120"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="111">A newly created #CoglTexture or %NULL on failure</doc> <type name="Texture" c:type="CoglTexture*"/> </return-value> <parameters> <parameter name="width" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="93">width of texture in pixels</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="height" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="94">height of texture in pixels</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="flags" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="95">Optional flags for the texture, or %COGL_TEXTURE_NONE</doc> <type name="TextureFlags" c:type="CoglTextureFlags"/> </parameter> <parameter name="format" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="96">the #CoglPixelFormat the buffer is stored in in RAM</doc> <type name="PixelFormat" c:type="CoglPixelFormat"/> </parameter> <parameter name="internal_format" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="97">the #CoglPixelFormat that will be used for storing the buffer on the GPU. If COGL_PIXEL_FORMAT_ANY is given then a premultiplied format similar to the format of the source data will be used. The default blending equations of Cogl expect premultiplied color data; the main use of passing a non-premultiplied format here is if you have non-premultiplied source data and are going to adjust the blend mode (see cogl_material_set_blend()) or use the data for something other than straight blending.</doc> <type name="PixelFormat" c:type="CoglPixelFormat"/> </parameter> <parameter name="rowstride" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="105">the memory offset in bytes between the starts of scanlines in @data</doc> <type name="gint" c:type="int"/> </parameter> <parameter name="data" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="107">pointer the memory region where the source buffer resides</doc> <array zero-terminated="0" c:type="const uint8_t*"> <type name="guint8" c:type="uint8_t"/> </array> </parameter> </parameters> </function> <function name="texture_new_from_file" c:identifier="cogl_texture_new_from_file" moved-to="Texture.new_from_file" version="0.8" deprecated="1" deprecated-version="1.18" throws="1"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="61">Creates a #CoglTexture from an image file.</doc> <doc-deprecated xml:space="preserve">Use specific constructors such as cogl_texture_2d_new_from_file()</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="86"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="77">A newly created #CoglTexture or %NULL on failure</doc> <type name="Texture" c:type="CoglTexture*"/> </return-value> <parameters> <parameter name="filename" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="63">the file to load</doc> <type name="utf8" c:type="const char*"/> </parameter> <parameter name="flags" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="64">Optional flags for the texture, or %COGL_TEXTURE_NONE</doc> <type name="TextureFlags" c:type="CoglTextureFlags"/> </parameter> <parameter name="internal_format" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="65">the #CoglPixelFormat to use for the GPU storage of the texture. If %COGL_PIXEL_FORMAT_ANY is given then a premultiplied format similar to the format of the source data will be used. The default blending equations of Cogl expect premultiplied color data; the main use of passing a non-premultiplied format here is if you have non-premultiplied source data and are going to adjust the blend mode (see cogl_material_set_blend()) or use the data for something other than straight blending.</doc> <type name="PixelFormat" c:type="CoglPixelFormat"/> </parameter> </parameters> </function> <function name="texture_new_with_size" c:identifier="cogl_texture_new_with_size" moved-to="Texture.new_with_size" version="0.8" deprecated="1" deprecated-version="1.18"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="38">Creates a new #CoglTexture with the specified dimensions and pixel format.</doc> <doc-deprecated xml:space="preserve">Use specific constructors such as cogl_texture_2d_new_with_size()</doc-deprecated> <source-position filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="56"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="48">A newly created #CoglTexture or %NULL on failure</doc> <type name="Texture" c:type="CoglTexture*"/> </return-value> <parameters> <parameter name="width" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="40">width of texture in pixels.</doc> <type name="guint" c:type="unsigned int"/> </parameter> <parameter name="height" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="41">height of texture in pixels.</doc> <type name="guint" c:type="unsigned int"/> </parameter> <parameter name="flags" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="42">Optional flags for the texture, or %COGL_TEXTURE_NONE</doc> <type name="TextureFlags" c:type="CoglTextureFlags"/> </parameter> <parameter name="internal_format" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/deprecated/cogl-auto-texture.h" line="43">the #CoglPixelFormat to use for the GPU storage of the texture.</doc> <type name="PixelFormat" c:type="CoglPixelFormat"/> </parameter> </parameters> </function> <function name="trace_end" c:identifier="cogl_trace_end"> <source-position filename="cogl/cogl/cogl-trace.h" line="77"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="head" transfer-ownership="none"> <type name="TraceHead" c:type="CoglTraceHead*"/> </parameter> </parameters> </function> <function name="xlib_renderer_add_filter" c:identifier="cogl_xlib_renderer_add_filter" introspectable="0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-xlib-renderer.h" line="92">Adds a callback function that will receive all native events. The function can stop further processing of the event by return %COGL_FILTER_REMOVE.</doc> <source-position filename="cogl/cogl/cogl-xlib-renderer.h" line="103"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="renderer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-xlib-renderer.h" line="94">a #CoglRenderer</doc> <type c:type="CoglRenderer*"/> </parameter> <parameter name="func" transfer-ownership="none" closure="2"> <doc xml:space="preserve" filename="cogl/cogl/cogl-xlib-renderer.h" line="95">the callback function</doc> <type name="XlibFilterFunc" c:type="CoglXlibFilterFunc"/> </parameter> <parameter name="data" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-xlib-renderer.h" line="96">user data passed to @func when called</doc> <type name="gpointer" c:type="void*"/> </parameter> </parameters> </function> <function name="xlib_renderer_get_display" c:identifier="cogl_xlib_renderer_get_display" introspectable="0"> <source-position filename="cogl/cogl/cogl-xlib-renderer.h" line="152"/> <return-value> <type c:type="Display*"/> </return-value> <parameters> <parameter name="renderer" transfer-ownership="none"> <type c:type="CoglRenderer*"/> </parameter> </parameters> </function> <function name="xlib_renderer_get_foreign_display" c:identifier="cogl_xlib_renderer_get_foreign_display" introspectable="0"> <source-position filename="cogl/cogl/cogl-xlib-renderer.h" line="130"/> <return-value> <doc xml:space="preserve" filename="cogl/cogl/cogl-xlib-renderer.h" line="125">the foreign Xlib display that will be used by any Xlib based winsys backend. The display needs to be set with cogl_xlib_renderer_set_foreign_display() before this function is called.</doc> <type c:type="Display*"/> </return-value> <parameters> <parameter name="renderer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-xlib-renderer.h" line="123">a #CoglRenderer</doc> <type c:type="CoglRenderer*"/> </parameter> </parameters> </function> <function name="xlib_renderer_handle_event" c:identifier="cogl_xlib_renderer_handle_event" introspectable="0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-xlib-renderer.h" line="60">This function processes a single event; it can be used to hook into external event retrieval (for example that done by Clutter or GDK).</doc> <source-position filename="cogl/cogl/cogl-xlib-renderer.h" line="76"/> <return-value transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-xlib-renderer.h" line="69">#CoglFilterReturn. %COGL_FILTER_REMOVE indicates that Cogl has internally handled the event and the caller should do no further processing. %COGL_FILTER_CONTINUE indicates that Cogl is either not interested in the event, or has used the event to update internal state without taking any exclusive action.</doc> <type name="FilterReturn" c:type="CoglFilterReturn"/> </return-value> <parameters> <parameter name="renderer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-xlib-renderer.h" line="62">a #CoglRenderer</doc> <type c:type="CoglRenderer*"/> </parameter> <parameter name="event" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-xlib-renderer.h" line="63">pointer to an XEvent structure</doc> <type c:type="XEvent*"/> </parameter> </parameters> </function> <function name="xlib_renderer_remove_filter" c:identifier="cogl_xlib_renderer_remove_filter" introspectable="0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-xlib-renderer.h" line="107">Removes a callback that was previously added with cogl_xlib_renderer_add_filter().</doc> <source-position filename="cogl/cogl/cogl-xlib-renderer.h" line="117"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="renderer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-xlib-renderer.h" line="109">a #CoglRenderer</doc> <type c:type="CoglRenderer*"/> </parameter> <parameter name="func" transfer-ownership="none" closure="2"> <doc xml:space="preserve" filename="cogl/cogl/cogl-xlib-renderer.h" line="110">the callback function</doc> <type name="XlibFilterFunc" c:type="CoglXlibFilterFunc"/> </parameter> <parameter name="data" transfer-ownership="none" nullable="1" allow-none="1"> <doc xml:space="preserve" filename="cogl/cogl/cogl-xlib-renderer.h" line="111">user data given when the callback was installed</doc> <type name="gpointer" c:type="void*"/> </parameter> </parameters> </function> <function name="xlib_renderer_request_reset_on_video_memory_purge" c:identifier="cogl_xlib_renderer_request_reset_on_video_memory_purge" introspectable="0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-xlib-renderer.h" line="154">Sets whether Cogl should make use of the NV_robustness_video_memory_purge extension, if exposed by the driver, by initializing the GLX context appropriately. The extension is only useful when running on certain versions of the NVIDIA driver. Quoting from the spec: "The NVIDIA OpenGL driver architecture on Linux has a limitation: resources located in video memory are not persistent across certain events. VT switches, suspend/resume events, and mode switching events may erase the contents of video memory. Any resource that is located exclusively in video memory, such as framebuffer objects (FBOs), will be lost." "This extension provides a way for applications to discover when video memory content has been lost, so that the application can re-populate the video memory content as necessary." "Any driver that exposes this extension is a driver that considers video memory to be volatile. Once the driver stack has been improved, the extension will no longer be exposed." cogl_get_graphics_reset_status() needs to be called at least once every frame to find out if video memory was purged. Note that this doesn't cause Cogl to enable robust buffer access but other context reset errors may still happen and be reported via cogl_get_graphics_reset_status() if external factors cause the driver to trigger them. This defaults to %FALSE and is effective only if called before cogl_display_setup() .</doc> <source-position filename="cogl/cogl/cogl-xlib-renderer.h" line="193"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="renderer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-xlib-renderer.h" line="156">a #CoglRenderer</doc> <type c:type="CoglRenderer*"/> </parameter> <parameter name="enable" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-xlib-renderer.h" line="157">The new value</doc> <type name="gboolean" c:type="gboolean"/> </parameter> </parameters> </function> <function name="xlib_renderer_set_foreign_display" c:identifier="cogl_xlib_renderer_set_foreign_display" introspectable="0"> <doc xml:space="preserve" filename="cogl/cogl/cogl-xlib-renderer.h" line="132">Sets a foreign Xlib display that Cogl will use for and Xlib based winsys backend. Note that calling this function will automatically disable Cogl's event retrieval. Cogl still needs to see all of the X events so the application should also use cogl_xlib_renderer_handle_event() if it uses this function.</doc> <source-position filename="cogl/cogl/cogl-xlib-renderer.h" line="145"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> <parameter name="renderer" transfer-ownership="none"> <doc xml:space="preserve" filename="cogl/cogl/cogl-xlib-renderer.h" line="134">a #CoglRenderer</doc> <type c:type="CoglRenderer*"/> </parameter> <parameter name="display" transfer-ownership="none"> <type c:type="Display*"/> </parameter> </parameters> </function> </namespace> </repository>