4 * An object oriented GL/GLES Abstraction/Utility Layer
6 * Copyright (C) 2010 Intel Corporation.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
22 * Neil Roberts <neil@linux.intel.com>
25 #ifndef __COGL_TEXTURE_3D_PRIVATE_H
26 #define __COGL_TEXTURE_3D_PRIVATE_H
28 #include "cogl-handle.h"
29 #include "cogl-pipeline-private.h"
30 #include "cogl-texture-private.h"
31 #include "cogl-texture-3d.h"
37 /* The internal format of the GL texture represented as a
39 CoglPixelFormat format;
40 /* The internal format of the GL texture represented as a GL enum */
42 /* The texture object number */
53 gboolean mipmaps_dirty;
55 CoglTexturePixel first_pixel;
59 * cogl_texture_3d_new_from_bitmap:
60 * @bmp_handle: A #CoglBitmap object.
61 * @height: height of the texture in pixels.
62 * @depth: depth of the texture in pixels.
63 * @internal_format: the #CoglPixelFormat that will be used for storing
64 * the buffer on the GPU. If COGL_PIXEL_FORMAT_ANY is given then a
65 * premultiplied format similar to the format of the source data will
66 * be used. The default blending equations of Cogl expect premultiplied
67 * color data; the main use of passing a non-premultiplied format here
68 * is if you have non-premultiplied source data and are going to adjust
69 * the blend mode (see cogl_pipeline_set_blend()) or use the data for
70 * something other than straight blending.
71 * @error: A GError return location.
73 * Creates a new 3D texture and initializes it with the images in
74 * @bmp_handle. The images are assumed to be packed together after one
75 * another in the increasing y axis. The height of individual image is
76 * given as @height and the number of images is given in @depth. The
77 * actual height of the bitmap can be larger than @height × @depth. In
78 * this case it assumes there is padding between the images.
80 * Return value: the newly created texture or %NULL if
84 _cogl_texture_3d_new_from_bitmap (CoglContext *context,
88 CoglPixelFormat internal_format,
91 #endif /* __COGL_TEXTURE_3D_PRIVATE_H */