Cogl.Framebuffer.prototype.draw_attributes
function draw_attributes(pipeline: Cogl.Pipeline, mode: Cogl.VerticesMode, first_vertex: Number(gint), n_vertices: Number(gint), attributes: Cogl.Attribute, n_attributes: Number(gint)): void { // Gjs wrapper for cogl_framebuffer_draw_attributes() }
First defines a geometry primitive by grouping a set of vertex attributes; specifying a first_vertex; a number of vertices (n_vertices) and specifying what kind of topology the vertices have via mode.
Then the function draws the given @primitive geometry to the specified destination framebuffer using the graphics processing pipeline described by pipeline.
The list of Cogl.Attribute<!-- -->s define the attributes of the vertices to be drawn, such as positions, colors and normals and the number of attributes is given as n_attributes.
This drawing api doesn't support high-level meta texture types such as Cogl.Texture2DSliced so it is the user's responsibility to ensure that only low-level textures that can be directly sampled by a GPU such as Cogl.Texture2D, Cogl.TextureRectangle or Cogl.Texture3D 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(), cogl_set_backface_culling_enabled() or cogl_program_use()</note>
Since 1.10
- pipeline
A Cogl.Pipeline state object
- mode
The Cogl.VerticesMode defining the topology of vertices
- first_vertex
The vertex offset within the given attributes to draw from
- n_vertices
The number of vertices to draw from the given attributes
- attributes
An array of pointers to Cogl.Attribute<-- -->s defining vertex geometry
- n_attributes
The number of attributes in the attributes array.