mirror of
https://github.com/brl/mutter.git
synced 2024-11-10 07:56:14 -05:00
6197e3abf3
This adds public constructors which take a CoglBitmap to all primitive texture types. This constructor should be considered the canonical constructor for initializing the texture with data because it should be possible to wrap any type of data in a CoglBitmap. Having at least this single constructor avoids the need to have an explosion of constructors such as new_from_data, new_from_pixel_buffer and new_from_file etc. The already available internal bitmap constructor for CoglTexture2D has had its flags parameter removed under the assumption that flags do not make sense for primitive textures. The meta constructor cogl_texture_new_from_bitmap now just explicitly calls set_auto_mipmap after constructing the texture depending on the value of the COGL_TEXTURE_NO_AUTO_MIPMAP flag. Reviewed-by: Robert Bragg <robert@linux.intel.com>
59 lines
1.7 KiB
C
59 lines
1.7 KiB
C
/*
|
|
* Cogl
|
|
*
|
|
* An object oriented GL/GLES Abstraction/Utility Layer
|
|
*
|
|
* Copyright (C) 2010 Intel Corporation.
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
* Authors:
|
|
* Neil Roberts <neil@linux.intel.com>
|
|
*/
|
|
|
|
#ifndef __COGL_TEXTURE_3D_PRIVATE_H
|
|
#define __COGL_TEXTURE_3D_PRIVATE_H
|
|
|
|
#include "cogl-handle.h"
|
|
#include "cogl-pipeline-private.h"
|
|
#include "cogl-texture-private.h"
|
|
#include "cogl-texture-3d.h"
|
|
|
|
struct _CoglTexture3D
|
|
{
|
|
CoglTexture _parent;
|
|
|
|
/* The internal format of the GL texture represented as a
|
|
CoglPixelFormat */
|
|
CoglPixelFormat format;
|
|
/* The internal format of the GL texture represented as a GL enum */
|
|
GLenum gl_format;
|
|
/* The texture object number */
|
|
GLuint gl_texture;
|
|
int width;
|
|
int height;
|
|
int depth;
|
|
GLenum min_filter;
|
|
GLenum mag_filter;
|
|
GLint wrap_mode_s;
|
|
GLint wrap_mode_t;
|
|
GLint wrap_mode_p;
|
|
gboolean auto_mipmap;
|
|
gboolean mipmaps_dirty;
|
|
|
|
CoglTexturePixel first_pixel;
|
|
};
|
|
|
|
#endif /* __COGL_TEXTURE_3D_PRIVATE_H */
|