*/
typedef enum
{
- COGL_PIXEL_FORMAT_ANY = 0,
- COGL_PIXEL_FORMAT_A_8 = 1 | COGL_A_BIT,
+ COGL_PIXEL_FORMAT_ANY = 0,
+ COGL_PIXEL_FORMAT_A_8 = 1 | COGL_A_BIT,
+
+ COGL_PIXEL_FORMAT_RGB_565 = 4,
+ COGL_PIXEL_FORMAT_RGBA_4444 = 5 | COGL_A_BIT,
+ COGL_PIXEL_FORMAT_RGBA_5551 = 6 | COGL_A_BIT,
+ COGL_PIXEL_FORMAT_YUV = 7,
+ COGL_PIXEL_FORMAT_G_8 = 8
- COGL_PIXEL_FORMAT_RGB_888 = COGL_PIXEL_FORMAT_24,
- COGL_PIXEL_FORMAT_BGR_888 = (COGL_PIXEL_FORMAT_24 | COGL_BGR_BIT),
+ COGL_PIXEL_FORMAT_RGB_888 = COGL_PIXEL_FORMAT_24,
+
+ COGL_PIXEL_FORMAT_BGR_888 = (COGL_PIXEL_FORMAT_24 |
+ COGL_BGR_BIT),
+
+ COGL_PIXEL_FORMAT_RGBA_8888 = COGL_PIXEL_FORMAT_32 |
+ COGL_A_BIT,
+
+ COGL_PIXEL_FORMAT_BGRA_8888 = (COGL_PIXEL_FORMAT_32 |
+ COGL_A_BIT |
+ COGL_BGR_BIT),
+
+ COGL_PIXEL_FORMAT_ARGB_8888 = (COGL_PIXEL_FORMAT_32 |
+ COGL_A_BIT |
+ COGL_AFIRST_BIT),
+
+ COGL_PIXEL_FORMAT_ABGR_8888 = (COGL_PIXEL_FORMAT_32 |
+ COGL_A_BIT |
+ COGL_BGR_BIT |
+ COGL_AFIRST_BIT),
+
+ COGL_PIXEL_FORMAT_RGBA_8888_PRE = (COGL_PIXEL_FORMAT_32 |
+ COGL_A_BIT |
+ COGL_PREMULT_BIT),
+
+ COGL_PIXEL_FORMAT_BGRA_8888_PRE = (COGL_PIXEL_FORMAT_32 |
+ COGL_A_BIT |
+ COGL_PREMULT_BIT |
+ COGL_BGR_BIT),
+
+ COGL_PIXEL_FORMAT_ARGB_8888_PRE = (COGL_PIXEL_FORMAT_32 |
+ COGL_A_BIT |
+ COGL_PREMULT_BIT |
+ COGL_AFIRST_BIT),
+
+ COGL_PIXEL_FORMAT_ABGR_8888_PRE = (COGL_PIXEL_FORMAT_32 |
+ COGL_A_BIT |
+ COGL_PREMULT_BIT |
+ COGL_BGR_BIT |
+ COGL_AFIRST_BIT),
- COGL_PIXEL_FORMAT_RGBA_8888 = COGL_PIXEL_FORMAT_32 | COGL_A_BIT,
- COGL_PIXEL_FORMAT_BGRA_8888 = (COGL_PIXEL_FORMAT_32 | COGL_A_BIT | COGL_BGR_BIT),
- COGL_PIXEL_FORMAT_ARGB_8888 = (COGL_PIXEL_FORMAT_32 | COGL_A_BIT | COGL_AFIRST_BIT),
- COGL_PIXEL_FORMAT_ABGR_8888 = (COGL_PIXEL_FORMAT_32 | COGL_A_BIT | COGL_BGR_BIT | COGL_AFIRST_BIT),
-
- COGL_PIXEL_FORMAT_RGBA_8888_PRE = (COGL_PIXEL_FORMAT_32 | COGL_A_BIT | COGL_PREMULT_BIT),
- COGL_PIXEL_FORMAT_BGRA_8888_PRE = (COGL_PIXEL_FORMAT_32 | COGL_A_BIT | COGL_PREMULT_BIT | COGL_BGR_BIT),
- COGL_PIXEL_FORMAT_ARGB_8888_PRE = (COGL_PIXEL_FORMAT_32 | COGL_A_BIT | COGL_PREMULT_BIT | COGL_AFIRST_BIT),
- COGL_PIXEL_FORMAT_ABGR_8888_PRE = (COGL_PIXEL_FORMAT_32 | COGL_A_BIT | COGL_PREMULT_BIT | COGL_BGR_BIT | COGL_AFIRST_BIT),
-
- COGL_PIXEL_FORMAT_RGB_565 = 4,
- COGL_PIXEL_FORMAT_RGBA_4444 = 5 | COGL_A_BIT,
- COGL_PIXEL_FORMAT_RGBA_5551 = 6 | COGL_A_BIT,
-
- COGL_PIXEL_FORMAT_RGBA_4444_PRE = (COGL_PIXEL_FORMAT_RGBA_4444 | COGL_A_BIT | COGL_PREMULT_BIT),
- COGL_PIXEL_FORMAT_RGBA_5551_PRE = (COGL_PIXEL_FORMAT_RGBA_5551 | COGL_A_BIT | COGL_PREMULT_BIT),
-
- COGL_PIXEL_FORMAT_YUV = 7,
+ COGL_PIXEL_FORMAT_RGBA_4444_PRE = (COGL_PIXEL_FORMAT_RGBA_4444 |
+ COGL_A_BIT |
+ COGL_PREMULT_BIT),
+
+ COGL_PIXEL_FORMAT_RGBA_5551_PRE = (COGL_PIXEL_FORMAT_RGBA_5551 |
+ COGL_A_BIT |
+ COGL_PREMULT_BIT),
- COGL_PIXEL_FORMAT_G_8 = 8
} CoglPixelFormat;
* cogl_create_context:
*
*/
-gboolean
-cogl_create_context (void);
+gboolean cogl_create_context (void);
/**
* cogl_destroy_context:
*
*/
-void
-cogl_destroy_context (void);
+void cogl_destroy_context (void);
/* Misc */
/**
* COGL_INVALID_HANDLE:
*
- * A cogl handle that is not valid, used for unitialized handles as well as error conditions.
+ * A cogl handle that is not valid, used for unitialized handles as well as
+ * error conditions.
*/
#define COGL_INVALID_HANDLE NULL
*
* Since: 0.8
*/
-ClutterFeatureFlags
-cogl_get_features (void);
+ClutterFeatureFlags cogl_get_features (void);
/**
* cogl_features_available:
*
* Return value: %TRUE if the features are available, %FALSE otherwise.
*/
-gboolean
-cogl_features_available (CoglFeatureFlags features);
+gboolean cogl_features_available (CoglFeatureFlags features);
/**
* cogl_get_proc_address:
* Return value: a pointer to the requested function or %NULL if the
* function is not available.
*/
-CoglFuncPtr
-cogl_get_proc_address (const gchar* name);
+CoglFuncPtr cogl_get_proc_address (const gchar *name);
/**
* cogl_check_extension:
*
* Returns: %TRUE if the extension occurs in the list, %FALSE otherwize.
*/
-gboolean
-cogl_check_extension (const gchar *name,
- const gchar *ext);
+gboolean cogl_check_extension (const gchar *name,
+ const gchar *ext);
/**
* cogl_get_bitmasks:
* in the color buffer. Pass %NULL for any of the arguments if the
* value is not required.
*/
-void
-cogl_get_bitmasks (gint *red,
- gint *green,
- gint *blue,
- gint *alpha);
-
-/* XXX: should this be internal? */
+void cogl_get_bitmasks (gint *red,
+ gint *green,
+ gint *blue,
+ gint *alpha);
/**
* cogl_perspective:
* @fovy: Vertical of view angle in degrees.
* @aspect: Aspect ratio of diesplay
- * @zNear: Nearest visible point
- * @zFar: Furthest visible point along the z-axis
+ * @z_near: Nearest visible point
+ * @z_far: Furthest visible point along the z-axis
*
* Multiplies the current set matrix with a projection matrix based
* on the provided values.
*/
-void
-cogl_perspective (ClutterFixed fovy,
- ClutterFixed aspect,
- ClutterFixed zNear,
- ClutterFixed zFar);
+void cogl_perspective (ClutterFixed fovy,
+ ClutterFixed aspect,
+ ClutterFixed z_near,
+ ClutterFixed z_far);
/**
* cogl_setup_viewport:
* view scaled according to @aspect along the x-axis. The view is
* clipped according to @z_near and @z_far on the z-axis.
*/
-void
-cogl_setup_viewport (guint width,
- guint height,
- ClutterFixed fovy,
- ClutterFixed aspect,
- ClutterFixed z_near,
- ClutterFixed z_far);
+void cogl_setup_viewport (guint width,
+ guint height,
+ ClutterFixed fovy,
+ ClutterFixed aspect,
+ ClutterFixed z_near,
+ ClutterFixed z_far);
/**
* cogl_push_matrix:
* Store the current model-view matrix on the matrix stack. The matrix
* can later be restored with cogl_pop_matrix().
*/
-void
-cogl_push_matrix (void);
+void cogl_push_matrix (void);
/**
* cogl_pop_matrix:
*
* Restore the current model-view matrix from the matrix stack.
*/
-void
-cogl_pop_matrix (void);
+void cogl_pop_matrix (void);
/**
* cogl_scale:
* Multiplies the current model-view matrix by one that scales the x
* and y axes by the given values.
*/
-void
-cogl_scale (ClutterFixed x,
- ClutterFixed y);
+void cogl_scale (ClutterFixed x,
+ ClutterFixed y);
/**
* cogl_translatex:
* Multiplies the current model-view matrix by one that translates the
* model along all three axes according to the given values.
*/
-void
-cogl_translatex (ClutterFixed x,
- ClutterFixed y,
- ClutterFixed z);
+void cogl_translatex (ClutterFixed x,
+ ClutterFixed y,
+ ClutterFixed z);
/**
* cogl_translate:
* model-view matrix by one that translates the model along all three
* axes according to the given values.
*/
-void
-cogl_translate (gint x,
- gint y,
- gint z);
+void cogl_translate (gint x,
+ gint y,
+ gint z);
/**
* cogl_rotatex:
* degrees about the vertex (0, 0, 1) causes a small counter-clockwise
* rotation.
*/
-void
-cogl_rotatex (ClutterFixed angle,
- gint x,
- gint y,
- gint z);
+void cogl_rotatex (ClutterFixed angle,
+ gint x,
+ gint y,
+ gint z);
/**
* cogl_rotate:
* model-view matrix by one that rotates the model around the vertex
* specified by @x, @y and @z.
*/
-void
-cogl_rotate (gint angle,
- gint x,
- gint y,
- gint z);
+void cogl_rotate (gint angle,
+ gint x,
+ gint y,
+ gint z);
/**
* cogl_get_modelview_matrix:
* Stores the current model-view matrix in @m. The matrix is in
* column-major order.
*/
-void
-cogl_get_modelview_matrix (ClutterFixed m[16]);
+void cogl_get_modelview_matrix (ClutterFixed m[16]);
/**
* cogl_get_projection_matrix:
* Stores the current projection matrix in @m. The matrix is in
* column-major order.
*/
-void
-cogl_get_projection_matrix (ClutterFixed m[16]);
+void cogl_get_projection_matrix (ClutterFixed m[16]);
/**
* cogl_get_viewport:
* position of the viewport and @v[2] and @v[3] get the width and
* height.
*/
-void
-cogl_get_viewport (ClutterFixed v[4]);
+void cogl_get_viewport (ClutterFixed v[4]);
/**
* cogl_clip_set:
* be displayed. The rectangle dimensions are transformed by the
* current model-view matrix.
*/
-void
-cogl_clip_set (ClutterFixed x_offset,
- ClutterFixed y_offset,
- ClutterFixed width,
- ClutterFixed height);
+void cogl_clip_set (ClutterFixed x_offset,
+ ClutterFixed y_offset,
+ ClutterFixed width,
+ ClutterFixed height);
/**
* cogl_clip_unset:
* Removes the current clipping rectangle so that all drawing
* operations extend to full size of the viewport again.
*/
-void
-cogl_clip_unset (void);
+void cogl_clip_unset (void);
/**
* cogl_enable_depth_test:
* clutter_actor_lower(), otherwise it will also take into account the
* actor's depth. Depth testing is disabled by default.
*/
-void
-cogl_enable_depth_test (gboolean setting);
+void cogl_enable_depth_test (gboolean setting);
/**
* cogl_alpha_func:
* comparing with the value in @ref. The default function is CGL_ALWAYS the
* initial reference value is 1.0.
*/
-void
-cogl_alpha_func (COGLenum func,
- ClutterFixed ref);
+void cogl_alpha_func (COGLenum func,
+ ClutterFixed ref);
/**
* cogl_fog_set:
* with @fog_color. Fogging will remain enabled until the next call to
* cogl_paint_init().
*/
-void
-cogl_fog_set (const ClutterColor *fog_color,
- ClutterFixed density,
- ClutterFixed z_near,
- ClutterFixed z_far);
+void cogl_fog_set (const ClutterColor *fog_color,
+ ClutterFixed density,
+ ClutterFixed z_near,
+ ClutterFixed z_far);
/**
* cogl_paint_init:
* Clears the color buffer to @color. The depth buffer and stencil
* buffers are also cleared and fogging and lighting are disabled.
*/
-void
-cogl_paint_init (const ClutterColor *color);
+void cogl_paint_init (const ClutterColor *color);
/* Textures api */
* @height: height of texture in pixels.
* @max_waste: maximum extra horizontal and|or vertical margin pixels to make
* texture fit GPU limitations.
- * @internal_format: the #CoglPixelFormat to use for the GPU storage of the texture.
+ * @internal_format: the #CoglPixelFormat to use for the GPU storage of the
+ * texture.
*
* Create a new texture with specified dimensions and pixel format.
*
* Returns: a #CoglHandle to the newly created texture or COGL_INVALID_HANDLE
* if texture creation failed.
*/
-CoglHandle
-cogl_texture_new_with_size (guint width,
- guint height,
- gint max_waste,
- CoglPixelFormat internal_format);
+CoglHandle cogl_texture_new_with_size (guint width,
+ guint height,
+ gint max_waste,
+ CoglPixelFormat internal_format);
/**
* cogl_texture_new_from_file:
* Returns: a #CoglHandle to the newly created texture or COGL_INVALID_HANDLE
* if creating the texture failed.
*/
-CoglHandle
-cogl_texture_new_from_file (const gchar *filename,
- gint max_waste,
- CoglPixelFormat internal_format,
- GError **error);
+CoglHandle cogl_texture_new_from_file (const gchar *filename,
+ gint max_waste,
+ CoglPixelFormat internal_format,
+ GError **error);
/**
* cogl_texture_new_from_data:
* Returns: a #CoglHandle to the newly created texture or COGL_INVALID_HANDLE
* if creating the texture failed.
*/
-CoglHandle
-cogl_texture_new_from_data (guint width,
- guint height,
- gint max_waste,
- CoglPixelFormat format,
- CoglPixelFormat internal_format,
- guint rowstride,
- const guchar *data);
+CoglHandle cogl_texture_new_from_data (guint width,
+ guint height,
+ gint max_waste,
+ CoglPixelFormat format,
+ CoglPixelFormat internal_format,
+ guint rowstride,
+ const guchar *data);
/**
* cogl_texture_new_from_foreign:
* Returns: a #CoglHandle to the newly created texture or COGL_INVALID_HANDLE
* if creating the texture failed.
*/
-CoglHandle
-cogl_texture_new_from_foreign (GLuint gl_handle,
- GLenum gl_target,
- GLuint width,
- GLuint height,
- GLuint x_pot_waste,
- GLuint y_pot_waste,
- CoglPixelFormat format);
+CoglHandle cogl_texture_new_from_foreign (GLuint gl_handle,
+ GLenum gl_target,
+ GLuint width,
+ GLuint height,
+ GLuint x_pot_waste,
+ GLuint y_pot_waste,
+ CoglPixelFormat format);
/**
* cogl_is_texture:
* Returns: %TRUE if the handle references a texture,
* %FALSE otherwise
*/
-gboolean
-cogl_is_texture (CoglHandle handle);
+gboolean cogl_is_texture (CoglHandle handle);
/**
* cogl_texture_get_width:
*
* Returns: the width of the GPU side texture in pixels:
*/
-guint
-cogl_texture_get_width (CoglHandle handle);
+guint cogl_texture_get_width (CoglHandle handle);
/**
* cogl_texture_get_height:
*
* Returns: the height of the GPU side texture in pixels:
*/
-guint
-cogl_texture_get_height (CoglHandle handle);
+guint cogl_texture_get_height (CoglHandle handle);
/**
* cogl_texture_get_format:
*
* Returns: the #CoglPixelFormat of the GPU side texture.
*/
-CoglPixelFormat
-cogl_texture_get_format (CoglHandle handle);
+CoglPixelFormat cogl_texture_get_format (CoglHandle handle);
/**
*
* Returns: the offset in bytes between each consequetive row of pixels.
*/
-guint
-cogl_texture_get_rowstride (CoglHandle handle);
+guint cogl_texture_get_rowstride (CoglHandle handle);
/**
* cogl_texture_get_max_waste:
* @handle: a #CoglHandle for a texture.
*
- * Query the maximum wasted (unused) pixels in one dimension of a GPU side texture.
+ * Query the maximum wasted (unused) pixels in one dimension of a GPU side
+ * texture.
*
* Returns: the maximum waste.
*/
-gint
-cogl_texture_get_max_waste (CoglHandle handle);
+gint cogl_texture_get_max_waste (CoglHandle handle);
/**
* cogl_texture_get_min_filter:
*
* Returns: the current downscaling filter for a cogl texture.
*/
-COGLenum
-cogl_texture_get_min_filter (CoglHandle handle);
+COGLenum cogl_texture_get_min_filter (CoglHandle handle);
/**
* cogl_texture_get_mag_filter:
*
* Returns: the current downscaling filter for a cogl texture.
*/
-COGLenum
-cogl_texture_get_mag_filter (CoglHandle handle);
+COGLenum cogl_texture_get_mag_filter (CoglHandle handle);
/**
* cogl_texture_is_sliced:
* Returns: %TRUE if the texture is sliced, %FALSE if the texture
* is stored as a single GPU texture.
*/
-gboolean
-cogl_texture_is_sliced (CoglHandle handle);
+gboolean cogl_texture_is_sliced (CoglHandle handle);
/**
* cogl_texture_get_gl_texture:
* Returns: %TRUE if the handle was successfully retrieved %FALSE
* if the handle was invalid.
*/
-gboolean
-cogl_texture_get_gl_texture (CoglHandle handle,
- GLuint *out_gl_handle,
- GLenum *out_gl_target);
+gboolean cogl_texture_get_gl_texture (CoglHandle handle,
+ GLuint *out_gl_handle,
+ GLenum *out_gl_target);
/**
* cogl_texture_get_data:
* Returns: the size of the texture data in bytes (or 0 if the texture
* is not valid.)
*/
-gint
-cogl_texture_get_data (CoglHandle handle,
- CoglPixelFormat format,
- guint rowstride,
- guchar *data);
+gint cogl_texture_get_data (CoglHandle handle,
+ CoglPixelFormat format,
+ guint rowstride,
+ guchar *data);
/**
* cogl_texture_set_filters:
* Changes the decimation and interpolation filters used when the texture is
* drawn at other scales than 100%.
*/
-void
-cogl_texture_set_filters (CoglHandle handle,
- COGLenum min_filter,
- COGLenum mag_filter);
+void cogl_texture_set_filters (CoglHandle handle,
+ COGLenum min_filter,
+ COGLenum mag_filter);
/**
* @width: width of source data buffer.
* @height: height of source data buffer.
* @format: the #CoglPixelFormat used in the source buffer.
- * @rowstride: rowstride of source buffer (computed from width if none specified)
+ * @rowstride: rowstride of source buffer (computed from width if none
+ * specified)
* @data: the actual pixel data.
*
- * Sets the pixels in a rectangular subregion of @handle from an in-memory buffer
- * containing pixel data.
+ * Sets the pixels in a rectangular subregion of @handle from an in-memory
+ * buffer containing pixel data.
*
* Returns: %TRUE if the subregion upload was successful, otherwise %FALSE.
*/
-gboolean
-cogl_texture_set_region (CoglHandle handle,
- gint src_x,
- gint src_y,
- gint dst_x,
- gint dst_y,
- guint dst_width,
- guint dst_height,
- gint width,
- gint height,
- CoglPixelFormat format,
- guint rowstride,
- const guchar *data);
+gboolean cogl_texture_set_region (CoglHandle handle,
+ gint src_x,
+ gint src_y,
+ gint dst_x,
+ gint dst_y,
+ guint dst_width,
+ guint dst_height,
+ gint width,
+ gint height,
+ CoglPixelFormat format,
+ guint rowstride,
+ const guchar *data);
/**
* cogl_texture_ref:
*
* Returns: the @handle.
*/
-CoglHandle
-cogl_texture_ref (CoglHandle handle);
+CoglHandle cogl_texture_ref (CoglHandle handle);
/**
* cogl_texture_unref:
*
* Deccrement the reference count for a cogl texture.
*/
-void
-cogl_texture_unref (CoglHandle handle);
+void cogl_texture_unref (CoglHandle handle);
/**
* cogl_texture_rectangle:
* Draw a rectangle from a texture to the display, to draw the entire
* texture pass in @tx1=0.0 @ty1=0.0 @tx2=1.0 @ty2=1.0.
*/
-void
-cogl_texture_rectangle (CoglHandle handle,
- ClutterFixed x1,
- ClutterFixed y1,
- ClutterFixed x2,
- ClutterFixed y2,
- ClutterFixed tx1,
- ClutterFixed ty1,
- ClutterFixed tx2,
- ClutterFixed ty2);
+void cogl_texture_rectangle (CoglHandle handle,
+ ClutterFixed x1,
+ ClutterFixed y1,
+ ClutterFixed x2,
+ ClutterFixed y2,
+ ClutterFixed tx1,
+ ClutterFixed ty1,
+ ClutterFixed tx2,
+ ClutterFixed ty2);
/**
* cogl_texture_polygon:
* OpenGL ES and the minifying and magnifying functions are both set
* to CGL_NEAREST.
*/
-void
-cogl_texture_polygon (CoglHandle handle,
- guint n_vertices,
- CoglTextureVertex *vertices,
- gboolean use_color);
+void cogl_texture_polygon (CoglHandle handle,
+ guint n_vertices,
+ CoglTextureVertex *vertices,
+ gboolean use_color);
/* Primitives API */
* Changes the color of cogl's current paint, which is used for filling and stroking
* primitives.
*/
-void
-cogl_color (const ClutterColor *color);
+void cogl_color (const ClutterColor *color);
/**
* Fills a rectangle at the given coordinates with the current
* drawing color in a highly optimizied fashion.
**/
-void
-cogl_fast_fill_rectangle (gint x,
- gint y,
- guint width,
- guint height);
+void cogl_fast_fill_rectangle (gint x,
+ gint y,
+ guint width,
+ guint height);
/**
* cogl_fast_fill_rectanglex:
*
* A fixed-point version of cogl_fast_fill_rectangle.
**/
-void
-cogl_fast_fill_rectanglex (ClutterFixed x,
- ClutterFixed y,
- ClutterFixed width,
- ClutterFixed height);
+void cogl_fast_fill_rectanglex (ClutterFixed x,
+ ClutterFixed y,
+ ClutterFixed width,
+ ClutterFixed height);
/**
* cogl_fast_fill_trapezoid:
* Fills a trapezoid at the given coordinates with the current
* drawing color in a highly optimized fashion.
**/
-void
-cogl_fast_fill_trapezoid (gint y1,
- gint x11,
- gint x21,
- gint y2,
- gint x12,
- gint x22);
+void cogl_fast_fill_trapezoid (gint y1,
+ gint x11,
+ gint x21,
+ gint y2,
+ gint x12,
+ gint x22);
/**
* cogl_fast_fill_trapezoidx:
*
* A fixed-point version of cogl_fast_fill_trapezoid.
**/
-void
-cogl_fast_fill_trapezoidx (ClutterFixed y1,
- ClutterFixed x11,
- ClutterFixed x21,
- ClutterFixed y2,
- ClutterFixed x12,
- ClutterFixed x22);
+void cogl_fast_fill_trapezoidx (ClutterFixed y1,
+ ClutterFixed x11,
+ ClutterFixed x21,
+ ClutterFixed y2,
+ ClutterFixed x12,
+ ClutterFixed x22);
/**
* cogl_fill:
*
* Fills the constructed shape using the current drawing color.
**/
-void
-cogl_fill (void);
+void cogl_fill (void);
/**
* cogl_stroke:
* and a width of 1 pixel (regardless of the current transformation
* matrix).
**/
-void
-cogl_stroke (void);
+void cogl_stroke (void);
/**
* Clears the previously constructed shape and begins a new path
* contour by moving the pen to the given coordinates.
**/
-void
-cogl_path_move_to (ClutterFixed x,
- ClutterFixed y);
+void cogl_path_move_to (ClutterFixed x,
+ ClutterFixed y);
/**
* contour by moving the pen to the given coordinates relative
* to the current pen location.
**/
-void
-cogl_path_move_to_rel (ClutterFixed x,
- ClutterFixed y);
+void cogl_path_move_to_rel (ClutterFixed x,
+ ClutterFixed y);
/**
* cogl_path_line_to:
* Adds a straight line segment to the current path that ends at the
* given coordinates.
**/
-void
-cogl_path_line_to (ClutterFixed x,
- ClutterFixed y);
+void cogl_path_line_to (ClutterFixed x,
+ ClutterFixed y);
/**
* cogl_path_line_to_rel:
* Adds a straight line segment to the current path that ends at the
* given coordinates relative to the current pen location.
**/
-void
-cogl_path_line_to_rel (ClutterFixed x,
- ClutterFixed y);
+void cogl_path_line_to_rel (ClutterFixed x,
+ ClutterFixed y);
/**
* cogl_path_h_line_to:
* Adds a straight horizontal line segment to the current path that
* ends at the given X coordinate and current pen Y coordinate.
**/
-void
-cogl_path_h_line_to (ClutterFixed x);
+void cogl_path_h_line_to (ClutterFixed x);
/**
* cogl_path_v_line_to:
* Adds a stright vertical line segment to the current path that ends
* at the current pen X coordinate and the given Y coordinate.
**/
-void
-cogl_path_v_line_to (ClutterFixed y);
+void cogl_path_v_line_to (ClutterFixed y);
/**
* cogl_path_h_line_to_rel:
* ends at the given X coordinate relative to the current pen location
* and current pen Y coordinate.
**/
-void
-cogl_path_h_line_to_rel (ClutterFixed x);
+void cogl_path_h_line_to_rel (ClutterFixed x);
/**
* cogl_path_v_line_to_rel:
* at the current pen X coordinate and the given Y coordinate relative
* to the current pen location.
**/
-void
-cogl_path_v_line_to_rel (ClutterFixed y);
+void cogl_path_v_line_to_rel (ClutterFixed y);
/**
* segment will link the current pen location with the first vertex
* of the arc.
**/
-void
-cogl_path_arc (ClutterFixed center_x,
- ClutterFixed center_y,
- ClutterFixed radius_x,
- ClutterFixed radius_y,
- ClutterAngle angle_1,
- ClutterAngle angle_2,
- ClutterAngle angle_step);
+void cogl_path_arc (ClutterFixed center_x,
+ ClutterFixed center_y,
+ ClutterFixed radius_x,
+ ClutterFixed radius_y,
+ ClutterAngle angle_1,
+ ClutterAngle angle_2,
+ ClutterAngle angle_step);
/**
* cogl_path_arc_rel:
* segment will link the current pen location with the first vertex
* of the arc.
**/
-void
-cogl_path_arc_rel (ClutterFixed center_x,
- ClutterFixed center_y,
- ClutterFixed radius_x,
- ClutterFixed radius_y,
- ClutterAngle angle_1,
- ClutterAngle angle_2,
- ClutterAngle angle_step);
+void cogl_path_arc_rel (ClutterFixed center_x,
+ ClutterFixed center_y,
+ ClutterFixed radius_x,
+ ClutterFixed radius_y,
+ ClutterAngle angle_1,
+ ClutterAngle angle_2,
+ ClutterAngle angle_step);
/**
* cogl_path_bezier2_to:
* second and third control points and using current pen location as the
* first control point.
**/
-void
-cogl_path_bezier2_to (ClutterFixed x1,
- ClutterFixed y1,
- ClutterFixed x2,
- ClutterFixed y2);
+void cogl_path_bezier2_to (ClutterFixed x1,
+ ClutterFixed y1,
+ ClutterFixed x2,
+ ClutterFixed y2);
/**
* first control point. The given coordinates are relative to the current
* pen location.
**/
-void
-cogl_path_bezier2_to_rel (ClutterFixed x1,
- ClutterFixed y1,
- ClutterFixed x2,
- ClutterFixed y2);
+void cogl_path_bezier2_to_rel (ClutterFixed x1,
+ ClutterFixed y1,
+ ClutterFixed x2,
+ ClutterFixed y2);
/**
* cogl_path_bezier3_to:
* second, third and fourth control points and using current pen location
* as the first control point.
**/
-void
-cogl_path_bezier3_to (ClutterFixed x1,
- ClutterFixed y1,
- ClutterFixed x2,
- ClutterFixed y2,
- ClutterFixed x3,
- ClutterFixed y3);
+void cogl_path_bezier3_to (ClutterFixed x1,
+ ClutterFixed y1,
+ ClutterFixed x2,
+ ClutterFixed y2,
+ ClutterFixed x3,
+ ClutterFixed y3);
/**
* cogl_path_bezier3_to_rel:
* as the first control point. The given coordinates are relative to the
* current pen location.
*/
-void
-cogl_path_bezier3_to_rel (ClutterFixed x1,
- ClutterFixed y1,
- ClutterFixed x2,
- ClutterFixed y2,
- ClutterFixed x3,
- ClutterFixed y3);
+void cogl_path_bezier3_to_rel (ClutterFixed x1,
+ ClutterFixed y1,
+ ClutterFixed x2,
+ ClutterFixed y2,
+ ClutterFixed x3,
+ ClutterFixed y3);
/**
* cogl_path_close:
* Closes the path being constructed by adding a straight line segment
* to it that ends at the first vertex of the path.
**/
-void
-cogl_path_close (void);
+void cogl_path_close (void);
/**
* cogl_line:
* Clears the previously constructed shape and constructs a straight
* line shape start and ending at the given coordinates.
**/
-void
-cogl_line (ClutterFixed x1,
- ClutterFixed y1,
- ClutterFixed x2,
- ClutterFixed y2);
+void cogl_line (ClutterFixed x1,
+ ClutterFixed y1,
+ ClutterFixed x2,
+ ClutterFixed y2);
/**
* cogl_polyline:
* fashion for the rest of the vertices. (num_points - 1) segments will
* be constructed.
**/
-void
-cogl_polyline (ClutterFixed *coords,
- gint num_points);
+void cogl_polyline (ClutterFixed *coords,
+ gint num_points);
/**
* represents the Y coordinate of the first vertex, continuing in the same
* fashion for the rest of the vertices.
**/
-void
-cogl_polygon (ClutterFixed *coords,
- gint num_points);
+void cogl_polygon (ClutterFixed *coords,
+ gint num_points);
/**
* Clears the previously constructed shape and constructs a rectangular
* shape at the given coordinates.
**/
-void
-cogl_rectangle (ClutterFixed x,
- ClutterFixed y,
- ClutterFixed width,
- ClutterFixed height);
+void cogl_rectangle (ClutterFixed x,
+ ClutterFixed y,
+ ClutterFixed width,
+ ClutterFixed height);
/**
* cogl_arc:
* Clears the previously constructed shape and constructs and elliptical arc
* shape.
**/
-void
-cogl_arc (ClutterFixed center_x,
- ClutterFixed center_y,
- ClutterFixed radius_x,
- ClutterFixed radius_y,
- ClutterAngle angle_1,
- ClutterAngle angle_2,
- ClutterAngle angle_step);
+void cogl_arc (ClutterFixed center_x,
+ ClutterFixed center_y,
+ ClutterFixed radius_x,
+ ClutterFixed radius_y,
+ ClutterAngle angle_1,
+ ClutterAngle angle_2,
+ ClutterAngle angle_step);
/**
* Clears the previously constructed shape and constructs an ellipse
* shape.
**/
-void
-cogl_ellipse (ClutterFixed center_x,
- ClutterFixed center_y,
- ClutterFixed radius_x,
- ClutterFixed radius_y,
- ClutterAngle angle_step);
+void cogl_ellipse (ClutterFixed center_x,
+ ClutterFixed center_y,
+ ClutterFixed radius_x,
+ ClutterFixed radius_y,
+ ClutterAngle angle_step);
/**
* Clears the previously constructed shape and constructs a rectangular
* shape with rounded corners.
**/
-void
-cogl_round_rectangle (ClutterFixed x,
- ClutterFixed y,
- ClutterFixed width,
- ClutterFixed height,
- ClutterFixed radius,
- ClutterAngle arc_step);
+void cogl_round_rectangle (ClutterFixed x,
+ ClutterFixed y,
+ ClutterFixed width,
+ ClutterFixed height,
+ ClutterFixed radius,
+ ClutterAngle arc_step);
/**
* cogl_create_shader:
- * @shaderType: CGL_VERTEX_SHADER og CGL_FRAGMENT_SHADER.
+ * @shader_type: CGL_VERTEX_SHADER og CGL_FRAGMENT_SHADER.
*
* Create a new shader handle, use #cogl_shader_source to set the source code
* to be used on it.
*
* Returns: a new shader handle.
*/
-COGLhandle
-cogl_create_shader (COGLenum shaderType);
+COGLhandle cogl_create_shader (COGLenum shader_type);
/**
* cogl_shader_destroy:
*
* Free up the resources used by a cogl shader.
*/
-void
-cogl_shader_destroy (COGLhandle handle);
+void cogl_shader_destroy (COGLhandle handle);
/**
* cogl_shader_source:
* Replaces the current GLSL source associated with a shader with a new
* one.
*/
-void
-cogl_shader_source (COGLhandle shader,
- const gchar *source);
+void cogl_shader_source (COGLhandle shader,
+ const gchar *source);
/**
* cogl_shader_compile:
* @shader_handle: #COGLhandle for a shader.
* Compiles the shader, no return value, but the shader is now ready for
* linking into a program.
*/
-void
-cogl_shader_compile (COGLhandle shader_handle);
+void cogl_shader_compile (COGLhandle shader_handle);
/**
* cogl_shader_get_info_log:
* messages that caused a shader to not compile correctly, mainly useful for
* debugging purposes.
*/
-void
-cogl_shader_get_info_log (COGLhandle handle,
- guint size,
- gchar *buffer);
+void cogl_shader_get_info_log (COGLhandle handle,
+ guint size,
+ gchar *buffer);
/**
* cogl_shader_get_parameteriv:
* Retrieve a named parameter from a shader can be used to query to compile
* satus of a shader by passing in CGL_OBJECT_COMPILE_STATUS for @pname.
*/
-void
-cogl_shader_get_parameteriv (COGLhandle handle,
- COGLenum pname,
- COGLint *dest);
+void cogl_shader_get_parameteriv (COGLhandle handle,
+ COGLenum pname,
+ COGLint *dest);
/**
* cogl_create_program:
*
* Returns: a new cogl program.
*/
-COGLhandle
-cogl_create_program (void);
+COGLhandle cogl_create_program (void);
/**
* cogl_program_destroy:
*
* Releases all resources held by a cogl program.
*/
-void
-cogl_program_destroy (COGLhandle handle);
+void cogl_program_destroy (COGLhandle handle);
/**
* cogl_program_attach_shader:
* Attaches a shader to a program object, a program can have one vertex shader
* and one fragment shader attached.
*/
-void
-cogl_program_attach_shader (COGLhandle program_handle,
- COGLhandle shader_handle);
+void cogl_program_attach_shader (COGLhandle program_handle,
+ COGLhandle shader_handle);
/**
*
* Links a program making it ready for use.
*/
-void
-cogl_program_link (COGLhandle program_handle);
+void cogl_program_link (COGLhandle program_handle);
/**
* cogl_program_use:
* Activate a specific shader program replacing that part of the GL rendering
* pipeline, if passed in 0 the default behavior of GL is reinstated.
*/
-void
-cogl_program_use (COGLhandle program_handle);
+void cogl_program_use (COGLhandle program_handle);
/**
* cogl_program_get_uniform_location:
* uniform is a variable that is constant for all vertices/fragments for a
* shader object and is possible to modify as an external parameter.
*
- * Returns: the offset of a uniform in a specified program, this uniform can be set
- * using #cogl_program_uniform_1f when the program is in use.
+ * Returns: the offset of a uniform in a specified program, this uniform can be
+ * set using #cogl_program_uniform_1f when the program is in use.
*/
-COGLint
-cogl_program_get_uniform_location (COGLhandle program_handle,
- const gchar *uniform_name);
+COGLint cogl_program_get_uniform_location
+ (COGLhandle program_handle,
+ const gchar *uniform_name);
/**
* Changes the value of a uniform in the currently used (see #cogl_program_use)
* shader program.
*/
-void
-cogl_program_uniform_1f (COGLint uniform_no,
- gfloat value);
+void cogl_program_uniform_1f (COGLint uniform_no,
+ gfloat value);
/* Offscreen api */
*
* Returns:
*/
-CoglHandle
-cogl_offscreen_new_to_texture (CoglHandle texhandle);
+CoglHandle cogl_offscreen_new_to_texture (CoglHandle texhandle);
/**
* cogl_offscreen_new_multisample:
*
* Returns:
*/
-CoglHandle
-cogl_offscreen_new_multisample (void);
+CoglHandle cogl_offscreen_new_multisample(void);
/**
* cogl_offscreen_ref:
*
* Returns:
*/
-CoglHandle
-cogl_offscreen_ref (CoglHandle handle);
+CoglHandle cogl_offscreen_ref (CoglHandle handle);
/**
* cogl_offscreen_unref:
* @handle:
*
*/
-void
-cogl_offscreen_unref (CoglHandle handle);
+void cogl_offscreen_unref (CoglHandle handle);
/**
* cogl_offscreen_blit:
* @dst_buffer:
*
*/
-void
-cogl_offscreen_blit (CoglHandle src_buffer,
- CoglHandle dst_buffer);
+void cogl_offscreen_blit (CoglHandle src_buffer,
+ CoglHandle dst_buffer);
/**
* cogl_offscreen_blit_region:
* @dst_h:
*
*/
-void
-cogl_offscreen_blit_region (CoglHandle src_buffer,
- CoglHandle dst_buffer,
- int src_x,
- int src_y,
- int src_w,
- int src_h,
- int dst_x,
- int dst_y,
- int dst_w,
- int dst_h);
+void cogl_offscreen_blit_region (CoglHandle src_buffer,
+ CoglHandle dst_buffer,
+ gint src_x,
+ gint src_y,
+ gint src_w,
+ gint src_h,
+ gint dst_x,
+ gint dst_y,
+ gint dst_w,
+ gint dst_h);
/**
* cogl_draw_buffer:
* @offscreen:
*
*/
-void
-cogl_draw_buffer (CoglBufferTarget target, CoglHandle offscreen);
+void cogl_draw_buffer (CoglBufferTarget target,
+ CoglHandle offscreen);
G_END_DECLS