"Initial commit to Gerrit"
[profile/ivi/cogl.git] / cogl / cogl-texture-rectangle-private.h
1 /*
2  * Cogl
3  *
4  * An object oriented GL/GLES Abstraction/Utility Layer
5  *
6  * Copyright (C) 2009 Intel Corporation.
7  *
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.
12  *
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.
17  *
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/>.
20  *
21  *
22  */
23
24 #ifndef __COGL_TEXTURE_RECTANGLE_H
25 #define __COGL_TEXTURE_RECTANGLE_H
26
27 #include "cogl-pipeline-private.h"
28 #include "cogl-texture-private.h"
29 #include "cogl-texture-rectangle.h"
30
31 struct _CoglTextureRectangle
32 {
33   CoglTexture     _parent;
34
35   /* The internal format of the GL texture represented as a
36      CoglPixelFormat */
37   CoglPixelFormat format;
38   /* The internal format of the GL texture represented as a GL enum */
39   GLenum          gl_format;
40   /* The texture object number */
41   GLuint          gl_texture;
42   int             width;
43   int             height;
44   GLenum          min_filter;
45   GLenum          mag_filter;
46   GLint           wrap_mode_s;
47   GLint           wrap_mode_t;
48   gboolean        is_foreign;
49 };
50
51 CoglTextureRectangle *
52 _cogl_texture_rectangle_new_from_bitmap (CoglBitmap      *bmp,
53                                          CoglTextureFlags flags,
54                                          CoglPixelFormat  internal_format);
55
56 CoglTextureRectangle *
57 _cogl_texture_rectangle_new_from_foreign (GLuint gl_handle,
58                                           GLuint width,
59                                           GLuint height,
60                                           CoglPixelFormat format);
61
62 #endif /* __COGL_TEXTURE_RECTANGLE_H */