summaryrefslogtreecommitdiff
path: root/cogl/cogl-sub-texture-private.h
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2011-10-21 11:36:25 +0100
committerRobert Bragg <robert@linux.intel.com>2011-11-01 12:03:03 +0000
commit18fb1ffab5880b8b35cbf9a6421d6b8c29010338 (patch)
tree5845b3e5d580e2b15c05adb609f60858e0da2582 /cogl/cogl-sub-texture-private.h
parent1ee861a82cc1edd90d859137574301e55dca77e0 (diff)
downloadcogl-18fb1ffab5880b8b35cbf9a6421d6b8c29010338.tar.gz
texture: Make CoglSubTexture experimental public api
This exposes cogl_sub_texture_new() and cogl_is_sub_texture() as experimental public API. Previously sub-textures were only exposed via cogl_texture_new_from_sub_texture() so there wasn't a corresponding CoglSubTexture type. A CoglSubTexture is a high-level texture defined as a sub-region of some other parent texture. CoglSubTextures are high level textures that implement the CoglMetaTexture interface which can be used to manually handle texture repeating. Reviewed-by: Neil Roberts <neil@linux.intel.com>
Diffstat (limited to 'cogl/cogl-sub-texture-private.h')
-rw-r--r--cogl/cogl-sub-texture-private.h24
1 files changed, 7 insertions, 17 deletions
diff --git a/cogl/cogl-sub-texture-private.h b/cogl/cogl-sub-texture-private.h
index 0cc3c91c..b3fb7615 100644
--- a/cogl/cogl-sub-texture-private.h
+++ b/cogl/cogl-sub-texture-private.h
@@ -21,15 +21,12 @@
*
*/
-#ifndef __COGL_SUB_TEXTURE_H
-#define __COGL_SUB_TEXTURE_H
+#ifndef __COGL_SUB_TEXTURE_PRIVATE_H
+#define __COGL_SUB_TEXTURE_PRIVATE_H
-#include "cogl-handle.h"
#include "cogl-texture-private.h"
-#define COGL_SUB_TEXTURE(tex) ((CoglSubTexture *) tex)
-
-typedef struct _CoglSubTexture CoglSubTexture;
+#include <glib.h>
struct _CoglSubTexture
{
@@ -40,12 +37,12 @@ struct _CoglSubTexture
use the full texture from that to render instead of making a
chain. However we want to preserve the next texture in case the
user is expecting us to keep a reference and also so that we can
- later add a cogl_sub_texture_get_full_texture() function. */
- CoglHandle next_texture;
+ later add a cogl_sub_texture_get_parent_texture() function. */
+ CoglTexture *next_texture;
/* This is the texture that will actually be used to draw. It will
point to the end of the chain if a sub texture of a sub texture
is created */
- CoglHandle full_texture;
+ CoglTexture *full_texture;
/* The region represented by this sub-texture. This is the region of
full_texture which won't necessarily be the same as the region
@@ -60,11 +57,4 @@ struct _CoglSubTexture
GQuark
_cogl_handle_sub_texture_get_type (void);
-CoglHandle
-_cogl_sub_texture_new (CoglHandle next_texture,
- int sub_x,
- int sub_y,
- int sub_width,
- int sub_height);
-
-#endif /* __COGL_SUB_TEXTURE_H */
+#endif /* __COGL_SUB_TEXTURE_PRIVATE_H */