summaryrefslogtreecommitdiff
path: root/cogl/cogl-texture-rectangle-private.h
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2011-10-14 09:25:12 +0100
committerRobert Bragg <robert@linux.intel.com>2011-11-01 12:03:02 +0000
commit90f106117fada67c084dd6cda7e70a0f6246c807 (patch)
treed9bd718b45c33f3bb213b56d8da6897de875e202 /cogl/cogl-texture-rectangle-private.h
parente70071ff1d72583f447309d1fbcc67959f592633 (diff)
downloadcogl-90f106117fada67c084dd6cda7e70a0f6246c807.tar.gz
texture: Make CoglTextureRectangle experimentally public
This exposes CoglTextureRectangle in the experimental cogl 2.0 api. For now we just expose a single constructor; cogl_texture_rectangle_new_with_size() but we can add more later. This is part of going work to improve our texture apis with more emphasis on providing low-level access to the varying semantics of different texture types understood by the gpu instead of only trying to present a lowest common denominator api. CoglTextureRectangle is notably useful for never being restricted to power of two sizes and for being sampled with non-normalized texture coordinates which can be convenient for use a lookup tables in glsl due to not needing separate uniforms for mapping normalized coordinates to texels. Unlike CoglTexture2D though rectangle textures can't have a mipmap and they only support the _CLAMP_TO_EDGE wrap mode. Applications wanting to use CoglTextureRectangle should first check cogl_has_feature (COGL_FEATURE_ID_TEXTURE_RECTANGLE). Reviewed-by: Neil Roberts <neil@linux.intel.com>
Diffstat (limited to 'cogl/cogl-texture-rectangle-private.h')
-rw-r--r--cogl/cogl-texture-rectangle-private.h18
1 files changed, 2 insertions, 16 deletions
diff --git a/cogl/cogl-texture-rectangle-private.h b/cogl/cogl-texture-rectangle-private.h
index 07eca5e8..dde91097 100644
--- a/cogl/cogl-texture-rectangle-private.h
+++ b/cogl/cogl-texture-rectangle-private.h
@@ -24,14 +24,9 @@
#ifndef __COGL_TEXTURE_RECTANGLE_H
#define __COGL_TEXTURE_RECTANGLE_H
-#include "cogl-handle.h"
#include "cogl-pipeline-private.h"
#include "cogl-texture-private.h"
-#define COGL_TEXTURE_RECTANGLE(tex) ((CoglTextureRectangle *) tex)
-
-typedef struct _CoglTextureRectangle CoglTextureRectangle;
-
struct _CoglTextureRectangle
{
CoglTexture _parent;
@@ -52,24 +47,15 @@ struct _CoglTextureRectangle
gboolean is_foreign;
};
-gboolean
-_cogl_is_texture_rectangle (void *object);
-
GQuark
_cogl_handle_texture_rectangle_get_type (void);
-CoglHandle
-_cogl_texture_rectangle_new_with_size (unsigned int width,
- unsigned int height,
- CoglTextureFlags flags,
- CoglPixelFormat internal_format);
-
-CoglHandle
+CoglTextureRectangle *
_cogl_texture_rectangle_new_from_bitmap (CoglBitmap *bmp,
CoglTextureFlags flags,
CoglPixelFormat internal_format);
-CoglHandle
+CoglTextureRectangle *
_cogl_texture_rectangle_new_from_foreign (GLuint gl_handle,
GLuint width,
GLuint height,