~noskcaj/ubuntu/trusty/cogl/1.16.2

« back to all changes in this revision

Viewing changes to cogl/cogl-texture-3d.c

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha, Jeremy Bicha, Rico Tzschichholz
  • Date: 2013-02-26 16:43:25 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20130226164325-t4z9rylpa20v0p6q
Tags: 1.13.4-0ubuntu1
[ Jeremy Bicha ]
* New upstream release
  - soname bump
* debian/control.in:
  - Bump minimum glib to 2.32
  - Drop obsolete breaks/replaces
  - Bump libclutter-1.0-dev breaks for soname transition
* debian/libcogl-dev.install:
  - Add some missing files

[ Rico Tzschichholz ]
* debian/control.in:
  - Build-depend on libxrandr-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
#include "cogl-texture-private.h"
32
32
#include "cogl-texture-3d-private.h"
33
33
#include "cogl-texture-3d.h"
 
34
#include "cogl-texture-gl-private.h"
34
35
#include "cogl-texture-driver.h"
35
36
#include "cogl-context-private.h"
36
37
#include "cogl-object-private.h"
37
38
#include "cogl-journal-private.h"
38
39
#include "cogl-pipeline-private.h"
39
40
#include "cogl-pipeline-opengl-private.h"
 
41
#include "cogl-error-private.h"
 
42
#include "cogl-util-gl-private.h"
40
43
 
41
44
#include <string.h>
42
45
#include <math.h>
56
59
static const CoglTextureVtable cogl_texture_3d_vtable;
57
60
 
58
61
static void
59
 
_cogl_texture_3d_set_wrap_mode_parameters (CoglTexture *tex,
60
 
                                           GLenum wrap_mode_s,
61
 
                                           GLenum wrap_mode_t,
62
 
                                           GLenum wrap_mode_p)
 
62
_cogl_texture_3d_gl_flush_legacy_texobj_wrap_modes (CoglTexture *tex,
 
63
                                                    GLenum wrap_mode_s,
 
64
                                                    GLenum wrap_mode_t,
 
65
                                                    GLenum wrap_mode_p)
63
66
{
64
67
  CoglTexture3D *tex_3d = COGL_TEXTURE_3D (tex);
65
68
  CoglContext *ctx = tex->context;
66
69
 
67
70
  /* Only set the wrap mode if it's different from the current value
68
71
     to avoid too many GL calls. */
69
 
  if (tex_3d->wrap_mode_s != wrap_mode_s ||
70
 
      tex_3d->wrap_mode_t != wrap_mode_t ||
71
 
      tex_3d->wrap_mode_p != wrap_mode_p)
 
72
  if (tex_3d->gl_legacy_texobj_wrap_mode_s != wrap_mode_s ||
 
73
      tex_3d->gl_legacy_texobj_wrap_mode_t != wrap_mode_t ||
 
74
      tex_3d->gl_legacy_texobj_wrap_mode_p != wrap_mode_p)
72
75
    {
73
76
      _cogl_bind_gl_texture_transient (GL_TEXTURE_3D,
74
77
                                       tex_3d->gl_texture,
83
86
                                GL_TEXTURE_WRAP_R,
84
87
                                wrap_mode_p) );
85
88
 
86
 
      tex_3d->wrap_mode_s = wrap_mode_s;
87
 
      tex_3d->wrap_mode_t = wrap_mode_t;
88
 
      tex_3d->wrap_mode_p = wrap_mode_p;
 
89
      tex_3d->gl_legacy_texobj_wrap_mode_s = wrap_mode_s;
 
90
      tex_3d->gl_legacy_texobj_wrap_mode_t = wrap_mode_t;
 
91
      tex_3d->gl_legacy_texobj_wrap_mode_p = wrap_mode_p;
89
92
    }
90
93
}
91
94
 
92
95
static void
93
96
_cogl_texture_3d_free (CoglTexture3D *tex_3d)
94
97
{
95
 
  _cogl_delete_gl_texture (tex_3d->gl_texture);
 
98
  if (tex_3d->gl_texture)
 
99
    _cogl_delete_gl_texture (tex_3d->gl_texture);
96
100
 
97
101
  /* Chain up */
98
102
  _cogl_texture_free (COGL_TEXTURE (tex_3d));
117
121
  CoglTexture3D *tex_3d = g_new (CoglTexture3D, 1);
118
122
  CoglTexture *tex = COGL_TEXTURE (tex_3d);
119
123
 
120
 
  _cogl_texture_init (tex, ctx, &cogl_texture_3d_vtable);
121
 
 
122
 
  tex_3d->width = width;
123
 
  tex_3d->height = height;
 
124
  _cogl_texture_init (tex, ctx, width, height, &cogl_texture_3d_vtable);
 
125
 
 
126
  tex_3d->gl_texture = 0;
 
127
 
124
128
  tex_3d->depth = depth;
125
129
  tex_3d->mipmaps_dirty = TRUE;
126
130
  tex_3d->auto_mipmap = TRUE;
127
131
 
128
132
  /* We default to GL_LINEAR for both filters */
129
 
  tex_3d->min_filter = GL_LINEAR;
130
 
  tex_3d->mag_filter = GL_LINEAR;
 
133
  tex_3d->gl_legacy_texobj_min_filter = GL_LINEAR;
 
134
  tex_3d->gl_legacy_texobj_mag_filter = GL_LINEAR;
131
135
 
132
136
  /* Wrap mode not yet set */
133
 
  tex_3d->wrap_mode_s = GL_FALSE;
134
 
  tex_3d->wrap_mode_t = GL_FALSE;
135
 
  tex_3d->wrap_mode_p = GL_FALSE;
136
 
 
137
 
  tex_3d->format = internal_format;
138
 
 
139
 
  return tex_3d;
 
137
  tex_3d->gl_legacy_texobj_wrap_mode_s = GL_FALSE;
 
138
  tex_3d->gl_legacy_texobj_wrap_mode_t = GL_FALSE;
 
139
  tex_3d->gl_legacy_texobj_wrap_mode_p = GL_FALSE;
 
140
 
 
141
  tex_3d->internal_format = internal_format;
 
142
 
 
143
  return _cogl_texture_3d_object_new (tex_3d);
140
144
}
141
145
 
142
146
static CoglBool
145
149
                             int height,
146
150
                             int depth,
147
151
                             CoglPixelFormat internal_format,
148
 
                             GError **error)
 
152
                             CoglError **error)
149
153
{
150
154
  GLenum gl_intformat;
151
155
  GLenum gl_type;
153
157
  /* This should only happen on GLES */
154
158
  if (!cogl_has_feature (ctx, COGL_FEATURE_ID_TEXTURE_3D))
155
159
    {
156
 
      g_set_error (error,
157
 
                   COGL_ERROR,
158
 
                   COGL_ERROR_UNSUPPORTED,
159
 
                   "3D textures are not supported by the GPU");
 
160
      _cogl_set_error (error,
 
161
                       COGL_SYSTEM_ERROR,
 
162
                       COGL_SYSTEM_ERROR_UNSUPPORTED,
 
163
                       "3D textures are not supported by the GPU");
160
164
      return FALSE;
161
165
    }
162
166
 
167
171
       !_cogl_util_is_pot (height) ||
168
172
       !_cogl_util_is_pot (depth)))
169
173
    {
170
 
      g_set_error (error,
171
 
                   COGL_ERROR,
172
 
                   COGL_ERROR_UNSUPPORTED,
173
 
                   "A non-power-of-two size was requested but this is not "
174
 
                   "supported by the GPU");
 
174
      _cogl_set_error (error,
 
175
                       COGL_SYSTEM_ERROR,
 
176
                       COGL_SYSTEM_ERROR_UNSUPPORTED,
 
177
                       "A non-power-of-two size was requested but this is not "
 
178
                       "supported by the GPU");
175
179
      return FALSE;
176
180
    }
177
181
 
190
194
                                               height,
191
195
                                               depth))
192
196
    {
193
 
      g_set_error (error,
194
 
                   COGL_ERROR,
195
 
                   COGL_ERROR_UNSUPPORTED,
196
 
                   "The requested dimensions are not supported by the GPU");
 
197
      _cogl_set_error (error,
 
198
                       COGL_SYSTEM_ERROR,
 
199
                       COGL_SYSTEM_ERROR_UNSUPPORTED,
 
200
                       "The requested dimensions are not supported by the GPU");
197
201
      return FALSE;
198
202
    }
199
203
 
205
209
                               int width,
206
210
                               int height,
207
211
                               int depth,
208
 
                               CoglPixelFormat internal_format,
209
 
                               GError **error)
 
212
                               CoglPixelFormat internal_format)
210
213
{
211
 
  CoglTexture3D         *tex_3d;
212
 
  GLenum                 gl_intformat;
213
 
  GLenum                 gl_format;
214
 
  GLenum                 gl_type;
215
 
 
216
214
  /* Since no data, we need some internal format */
217
215
  if (internal_format == COGL_PIXEL_FORMAT_ANY)
218
216
    internal_format = COGL_PIXEL_FORMAT_RGBA_8888_PRE;
219
217
 
 
218
  return _cogl_texture_3d_create_base (ctx,
 
219
                                       width, height, depth,
 
220
                                       internal_format);
 
221
}
 
222
 
 
223
static CoglBool
 
224
_cogl_texture_3d_allocate (CoglTexture *tex,
 
225
                           CoglError **error)
 
226
{
 
227
  CoglContext *ctx = tex->context;
 
228
  CoglTexture3D *tex_3d = COGL_TEXTURE_3D (tex);
 
229
  GLenum gl_intformat;
 
230
  GLenum gl_format;
 
231
  GLenum gl_type;
 
232
  GLenum gl_error;
 
233
  GLenum gl_texture;
 
234
 
220
235
  if (!_cogl_texture_3d_can_create (ctx,
221
 
                                    width, height, depth,
222
 
                                    internal_format,
 
236
                                    tex->width,
 
237
                                    tex->height,
 
238
                                    tex_3d->depth,
 
239
                                    tex_3d->internal_format,
223
240
                                    error))
224
 
    return NULL;
225
 
 
226
 
  internal_format = ctx->driver_vtable->pixel_format_to_gl (ctx,
227
 
                                                            internal_format,
228
 
                                                            &gl_intformat,
229
 
                                                            &gl_format,
230
 
                                                            &gl_type);
231
 
 
232
 
  tex_3d = _cogl_texture_3d_create_base (ctx,
233
 
                                         width, height, depth,
234
 
                                         internal_format);
235
 
 
236
 
  ctx->texture_driver->gen (ctx, GL_TEXTURE_3D, 1, &tex_3d->gl_texture);
 
241
    return FALSE;
 
242
 
 
243
  ctx->driver_vtable->pixel_format_to_gl (ctx,
 
244
                                          tex_3d->internal_format,
 
245
                                          &gl_intformat,
 
246
                                          &gl_format,
 
247
                                          &gl_type);
 
248
 
 
249
  gl_texture =
 
250
    ctx->texture_driver->gen (ctx, GL_TEXTURE_3D, tex_3d->internal_format);
237
251
  _cogl_bind_gl_texture_transient (GL_TEXTURE_3D,
238
 
                                   tex_3d->gl_texture,
 
252
                                   gl_texture,
239
253
                                   FALSE);
240
 
  GE( ctx, glTexImage3D (GL_TEXTURE_3D, 0, gl_intformat,
241
 
                         width, height, depth, 0, gl_format, gl_type, NULL) );
242
 
 
243
 
  return _cogl_texture_3d_object_new (tex_3d);
 
254
  /* Clear any GL errors */
 
255
  while ((gl_error = ctx->glGetError ()) != GL_NO_ERROR)
 
256
    ;
 
257
 
 
258
  ctx->glTexImage3D (GL_TEXTURE_3D, 0, gl_intformat,
 
259
                     tex->width, tex->height, tex_3d->depth,
 
260
                     0, gl_format, gl_type, NULL);
 
261
 
 
262
  if (_cogl_gl_util_catch_out_of_memory (ctx, error))
 
263
    {
 
264
      GE( ctx, glDeleteTextures (1, &gl_texture) );
 
265
      return FALSE;
 
266
    }
 
267
 
 
268
  tex_3d->gl_texture = gl_texture;
 
269
  tex_3d->gl_format = gl_intformat;
 
270
 
 
271
  return TRUE;
244
272
}
245
273
 
246
274
CoglTexture3D *
248
276
                                 unsigned int height,
249
277
                                 unsigned int depth,
250
278
                                 CoglPixelFormat internal_format,
251
 
                                 GError **error)
 
279
                                 CoglError **error)
252
280
{
253
281
  CoglTexture3D *tex_3d;
254
282
  CoglBitmap *dst_bmp;
257
285
  GLenum gl_intformat;
258
286
  GLenum gl_format;
259
287
  GLenum gl_type;
260
 
  uint8_t *data;
261
288
  CoglContext *ctx;
262
289
 
263
290
  ctx = _cogl_bitmap_get_context (bmp);
279
306
                                              &internal_format,
280
307
                                              &gl_intformat,
281
308
                                              &gl_format,
282
 
                                              &gl_type);
283
 
 
 
309
                                              &gl_type,
 
310
                                              error);
284
311
  if (dst_bmp == NULL)
285
 
    {
286
 
      g_set_error (error, COGL_BITMAP_ERROR, COGL_BITMAP_ERROR_FAILED,
287
 
                   "Bitmap conversion failed");
288
 
      return NULL;
289
 
    }
 
312
    return NULL;
290
313
 
291
314
  tex_3d = _cogl_texture_3d_create_base (ctx,
292
315
                                         bmp_width, height, depth,
294
317
 
295
318
  /* Keep a copy of the first pixel so that if glGenerateMipmap isn't
296
319
     supported we can fallback to using GL_GENERATE_MIPMAP */
297
 
  if (!cogl_has_feature (ctx, COGL_FEATURE_ID_OFFSCREEN) &&
298
 
      (data = _cogl_bitmap_map (dst_bmp,
299
 
                                COGL_BUFFER_ACCESS_READ, 0)))
 
320
  if (!cogl_has_feature (ctx, COGL_FEATURE_ID_OFFSCREEN))
300
321
    {
 
322
      CoglError *ignore = NULL;
 
323
      uint8_t *data = _cogl_bitmap_map (dst_bmp,
 
324
                                        COGL_BUFFER_ACCESS_READ, 0,
 
325
                                        &ignore);
 
326
 
301
327
      CoglPixelFormat format = cogl_bitmap_get_format (dst_bmp);
 
328
 
302
329
      tex_3d->first_pixel.gl_format = gl_format;
303
330
      tex_3d->first_pixel.gl_type = gl_type;
304
 
      memcpy (tex_3d->first_pixel.data, data,
305
 
              _cogl_pixel_format_get_bytes_per_pixel (format));
306
 
 
307
 
      _cogl_bitmap_unmap (dst_bmp);
308
 
    }
309
 
 
310
 
  ctx->texture_driver->gen (ctx, GL_TEXTURE_3D, 1, &tex_3d->gl_texture);
311
 
 
312
 
  ctx->texture_driver->upload_to_gl_3d (ctx,
313
 
                                        GL_TEXTURE_3D,
314
 
                                        tex_3d->gl_texture,
315
 
                                        FALSE, /* is_foreign */
316
 
                                        height,
317
 
                                        depth,
318
 
                                        dst_bmp,
319
 
                                        gl_intformat,
320
 
                                        gl_format,
321
 
                                        gl_type);
 
331
 
 
332
      if (data)
 
333
        {
 
334
          memcpy (tex_3d->first_pixel.data, data,
 
335
                  _cogl_pixel_format_get_bytes_per_pixel (format));
 
336
          _cogl_bitmap_unmap (dst_bmp);
 
337
        }
 
338
      else
 
339
        {
 
340
          g_warning ("Failed to read first pixel of bitmap for "
 
341
                     "glGenerateMipmap fallback");
 
342
          cogl_error_free (ignore);
 
343
          memset (tex_3d->first_pixel.data, 0,
 
344
                  _cogl_pixel_format_get_bytes_per_pixel (format));
 
345
        }
 
346
    }
 
347
 
 
348
  tex_3d->gl_texture =
 
349
    ctx->texture_driver->gen (ctx, GL_TEXTURE_3D, internal_format);
 
350
 
 
351
  if (!ctx->texture_driver->upload_to_gl_3d (ctx,
 
352
                                             GL_TEXTURE_3D,
 
353
                                             tex_3d->gl_texture,
 
354
                                             FALSE, /* is_foreign */
 
355
                                             height,
 
356
                                             depth,
 
357
                                             dst_bmp,
 
358
                                             gl_intformat,
 
359
                                             gl_format,
 
360
                                             gl_type,
 
361
                                             error))
 
362
    {
 
363
      cogl_object_unref (dst_bmp);
 
364
      cogl_object_unref (tex_3d);
 
365
      return NULL;
 
366
    }
322
367
 
323
368
  tex_3d->gl_format = gl_intformat;
324
369
 
325
370
  cogl_object_unref (dst_bmp);
326
371
 
327
 
  return _cogl_texture_3d_object_new (tex_3d);
 
372
  _cogl_texture_set_allocated (COGL_TEXTURE (tex_3d), TRUE);
 
373
 
 
374
  return tex_3d;
328
375
}
329
376
 
330
377
CoglTexture3D *
337
384
                               int rowstride,
338
385
                               int image_stride,
339
386
                               const uint8_t *data,
340
 
                               GError **error)
 
387
                               CoglError **error)
341
388
{
342
389
  CoglBitmap *bitmap;
343
390
  CoglTexture3D *ret;
344
391
 
345
392
  /* These are considered a programmer errors so we won't set a
346
 
     GError. It would be nice if this was a _COGL_RETURN_IF_FAIL but the
 
393
     CoglError. It would be nice if this was a _COGL_RETURN_IF_FAIL but the
347
394
     rest of Cogl isn't using that */
348
395
  if (format == COGL_PIXEL_FORMAT_ANY)
349
396
    return NULL;
374
421
      bitmap = _cogl_bitmap_new_with_malloc_buffer (context,
375
422
                                                    width,
376
423
                                                    depth * height,
377
 
                                                    format);
 
424
                                                    format,
 
425
                                                    error);
 
426
      if (!bitmap)
 
427
        return NULL;
378
428
 
379
429
      bmp_data = _cogl_bitmap_map (bitmap,
380
430
                                   COGL_BUFFER_ACCESS_WRITE,
381
 
                                   COGL_BUFFER_MAP_HINT_DISCARD);
 
431
                                   COGL_BUFFER_MAP_HINT_DISCARD,
 
432
                                   error);
382
433
 
383
434
      if (bmp_data == NULL)
384
435
        {
479
530
}
480
531
 
481
532
static void
482
 
_cogl_texture_3d_set_filters (CoglTexture *tex,
483
 
                              GLenum       min_filter,
484
 
                              GLenum       mag_filter)
 
533
_cogl_texture_3d_gl_flush_legacy_texobj_filters (CoglTexture *tex,
 
534
                                                 GLenum min_filter,
 
535
                                                 GLenum mag_filter)
485
536
{
486
537
  CoglTexture3D *tex_3d = COGL_TEXTURE_3D (tex);
487
538
  CoglContext *ctx = tex->context;
488
539
 
489
 
  if (min_filter == tex_3d->min_filter
490
 
      && mag_filter == tex_3d->mag_filter)
 
540
  if (min_filter == tex_3d->gl_legacy_texobj_min_filter
 
541
      && mag_filter == tex_3d->gl_legacy_texobj_mag_filter)
491
542
    return;
492
543
 
493
544
  /* Store new values */
494
 
  tex_3d->min_filter = min_filter;
495
 
  tex_3d->mag_filter = mag_filter;
 
545
  tex_3d->gl_legacy_texobj_min_filter = min_filter;
 
546
  tex_3d->gl_legacy_texobj_mag_filter = mag_filter;
496
547
 
497
548
  /* Apply new filters to the texture */
498
549
  _cogl_bind_gl_texture_transient (GL_TEXTURE_3D,
512
563
  if ((flags & COGL_TEXTURE_NEEDS_MIPMAP) &&
513
564
      tex_3d->auto_mipmap && tex_3d->mipmaps_dirty)
514
565
    {
515
 
      _cogl_bind_gl_texture_transient (GL_TEXTURE_3D,
516
 
                                       tex_3d->gl_texture,
517
 
                                       FALSE);
518
566
      /* glGenerateMipmap is defined in the FBO extension. If it's not
519
567
         available we'll fallback to temporarily enabling
520
568
         GL_GENERATE_MIPMAP and reuploading the first pixel */
521
569
      if (cogl_has_feature (ctx, COGL_FEATURE_ID_OFFSCREEN))
522
 
        ctx->texture_driver->gl_generate_mipmaps (ctx, GL_TEXTURE_3D);
 
570
        _cogl_texture_gl_generate_mipmaps (tex);
523
571
#if defined (HAVE_COGL_GL) || defined (HAVE_COGL_GLES)
524
572
      else if (ctx->driver != COGL_DRIVER_GLES2)
525
573
        {
 
574
          _cogl_bind_gl_texture_transient (GL_TEXTURE_3D,
 
575
                                           tex_3d->gl_texture,
 
576
                                           FALSE);
 
577
 
526
578
          GE( ctx, glTexParameteri (GL_TEXTURE_3D,
527
579
                                    GL_GENERATE_MIPMAP,
528
580
                                    GL_TRUE) );
554
606
}
555
607
 
556
608
static CoglBool
557
 
_cogl_texture_3d_set_region (CoglTexture    *tex,
558
 
                             int             src_x,
559
 
                             int             src_y,
560
 
                             int             dst_x,
561
 
                             int             dst_y,
562
 
                             unsigned int    dst_width,
563
 
                             unsigned int    dst_height,
564
 
                             CoglBitmap     *bmp)
 
609
_cogl_texture_3d_set_region (CoglTexture *tex,
 
610
                             int src_x,
 
611
                             int src_y,
 
612
                             int dst_x,
 
613
                             int dst_y,
 
614
                             int dst_width,
 
615
                             int dst_height,
 
616
                             int level,
 
617
                             CoglBitmap *bmp,
 
618
                             CoglError **error)
565
619
{
566
620
  /* This function doesn't really make sense for 3D textures because
567
621
     it can't specify which image to upload to */
 
622
  _cogl_set_error (error,
 
623
                   COGL_SYSTEM_ERROR,
 
624
                   COGL_SYSTEM_ERROR_UNSUPPORTED,
 
625
                   "Setting a 2D region on a 3D texture isn't "
 
626
                   "currently supported");
 
627
 
568
628
  return FALSE;
569
629
}
570
630
 
571
631
static int
572
632
_cogl_texture_3d_get_data (CoglTexture *tex,
573
633
                           CoglPixelFormat format,
574
 
                           unsigned int rowstride,
 
634
                           int rowstride,
575
635
                           uint8_t *data)
576
636
{
577
637
  /* FIXME: we could probably implement this by assuming the data is
585
645
static CoglPixelFormat
586
646
_cogl_texture_3d_get_format (CoglTexture *tex)
587
647
{
588
 
  return COGL_TEXTURE_3D (tex)->format;
 
648
  return COGL_TEXTURE_3D (tex)->internal_format;
589
649
}
590
650
 
591
651
static GLenum
594
654
  return COGL_TEXTURE_3D (tex)->gl_format;
595
655
}
596
656
 
597
 
static int
598
 
_cogl_texture_3d_get_width (CoglTexture *tex)
599
 
{
600
 
  return COGL_TEXTURE_3D (tex)->width;
601
 
}
602
 
 
603
 
static int
604
 
_cogl_texture_3d_get_height (CoglTexture *tex)
605
 
{
606
 
  return COGL_TEXTURE_3D (tex)->height;
607
 
}
608
 
 
609
657
static CoglTextureType
610
658
_cogl_texture_3d_get_type (CoglTexture *tex)
611
659
{
616
664
cogl_texture_3d_vtable =
617
665
  {
618
666
    TRUE, /* primitive */
 
667
    _cogl_texture_3d_allocate,
619
668
    _cogl_texture_3d_set_region,
620
669
    _cogl_texture_3d_get_data,
621
670
    NULL, /* foreach_sub_texture_in_region */
625
674
    _cogl_texture_3d_transform_coords_to_gl,
626
675
    _cogl_texture_3d_transform_quad_coords_to_gl,
627
676
    _cogl_texture_3d_get_gl_texture,
628
 
    _cogl_texture_3d_set_filters,
 
677
    _cogl_texture_3d_gl_flush_legacy_texobj_filters,
629
678
    _cogl_texture_3d_pre_paint,
630
679
    _cogl_texture_3d_ensure_non_quad_rendering,
631
 
    _cogl_texture_3d_set_wrap_mode_parameters,
 
680
    _cogl_texture_3d_gl_flush_legacy_texobj_wrap_modes,
632
681
    _cogl_texture_3d_get_format,
633
682
    _cogl_texture_3d_get_gl_format,
634
 
    _cogl_texture_3d_get_width,
635
 
    _cogl_texture_3d_get_height,
636
683
    _cogl_texture_3d_get_type,
637
684
    NULL, /* is_foreign */
638
685
    _cogl_texture_3d_set_auto_mipmap