## General API (Deprecated) General API (Deprecated) |

## Functions

CoglBool | cogl_check_extension ()
void | cogl_viewport ()
void | cogl_get_bitmasks ()
void | cogl_set_depth_test_enabled ()
CoglBool | cogl_get_depth_test_enabled ()

## Description

## Functions

### cogl_check_extension ()

    CoglBool
    cogl_check_extension (const char *name,
                          const char *ext);

`cogl_check_extension` has been deprecated since version 1.2 and should not be used in newly-written code.

OpenGL is an implementation detail for Cogl and so it's not appropriate to expose OpenGL extensions through the Cogl API. This function can be replaced by the following equivalent code:

    1
    CoglBool retval = (strstr (ext, name) != NULL) ? TRUE : FALSE;

Check whether `name` occurs in list of extensions in `ext` .

#### Parameters

name | extension to check for |
ext | list of extensions |

#### Returns

`TRUE` if the extension occurs in the list, `FALSE` otherwise.

### cogl_viewport ()

    void
    cogl_viewport (unsigned int width,
                   unsigned int height);

`cogl_viewport` has been deprecated since version 1.8 and should not be used in newly-written code.

Use cogl_framebuffer_set_viewport instead

Replace the current viewport with the given values.

#### Parameters

width | Width of the viewport |
height | Height of the viewport |

Since: 0.8.2

### cogl_get_bitmasks ()

    void
    cogl_get_bitmasks (int *red,
                       int *green,
                       int *blue,
                       int *alpha);

`cogl_get_bitmasks` has been deprecated since version 1.8 and should not be used in newly-written code.

Use cogl_framebuffer_get_red/green/blue/`alpha_bits()` instead

Gets the number of bitplanes used for each of the color components in the color buffer. Pass `NULL` for any of the arguments if the value is not required.

#### Parameters

red | Return location for the number of red bits or `NULL`. | [out]
green | Return location for the number of green bits or `NULL`. | [out]
blue | Return location for the number of blue bits or `NULL`. | [out]
alpha | Return location for the number of alpha bits or `NULL`. | [out]

### cogl_set_depth_test_enabled ()

    void
    cogl_set_depth_test_enabled (CoglBool setting);

`cogl_set_depth_test_enabled` has been deprecated since version 1.16 and should not be used in newly-written code.

Use `cogl_pipeline_set_depth_state()` instead

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.

#### Parameters

setting | `TRUE` to enable depth testing or `FALSE` to disable. |

### cogl_get_depth_test_enabled ()

    CoglBool
    cogl_get_depth_test_enabled (void);

`cogl_get_depth_test_enabled` has been deprecated since version 1.16 and should not be used in newly-written code.

Use `cogl_pipeline_set_depth_state()` instead

Queries if depth testing has been enabled via `cogl_set_depth_test_enable()`

#### Returns

`TRUE` if depth testing is enabled, and `FALSE` otherwise

## Types and Values