Example #1
0
void
_cg_destroy_texture_units(cg_device_t *dev)
{
    int i;

    for (i = 0; i < dev->texture_units->len; i++) {
        cg_texture_unit_t *unit =
            &c_array_index(dev->texture_units, cg_texture_unit_t, i);
        texture_unit_free(unit);
    }
    c_array_free(dev->texture_units, true);
}
Example #2
0
void
_cogl_destroy_texture_units (void)
{
  int i;

  _COGL_GET_CONTEXT (ctx, NO_RETVAL);

  for (i = 0; i < ctx->texture_units->len; i++)
    {
      CoglTextureUnit *unit =
        &g_array_index (ctx->texture_units, CoglTextureUnit, i);
      texture_unit_free (unit);
    }
  g_array_free (ctx->texture_units, TRUE);
}