summaryrefslogtreecommitdiff
path: root/cogl/cogl-texture-driver.h
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2009-11-30 12:15:05 +0000
committerNeil Roberts <neil@linux.intel.com>2009-12-02 22:03:26 +0000
commitf17767e4c105d1d172d9496646ec22105e107e31 (patch)
treef63292c741fec07130aa4e8ba23a492443722273 /cogl/cogl-texture-driver.h
parent8753422ef53608b90cef24e35dee10b01dede14e (diff)
downloadcogl-f17767e4c105d1d172d9496646ec22105e107e31.tar.gz
cogl: Add _cogl_texture_driver_upload_to_gl
This provides a way to upload the entire data for a texture without having to first call glTexImage and then glTexSubImage. This should be faster especially with indirect rendering where it would needlessy send the data for the texture twice.
Diffstat (limited to 'cogl/cogl-texture-driver.h')
-rw-r--r--cogl/cogl-texture-driver.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/cogl/cogl-texture-driver.h b/cogl/cogl-texture-driver.h
index 6626d18f..6961659d 100644
--- a/cogl/cogl-texture-driver.h
+++ b/cogl/cogl-texture-driver.h
@@ -70,6 +70,20 @@ _cogl_texture_driver_upload_subregion_to_gl (GLenum gl_target,
GLuint source_gl_type);
/*
+ * Replaces the contents of the GL texture with the entire bitmap. On
+ * GL this just directly calls glTexImage2D, but under GLES it needs
+ * to copy the bitmap if the rowstride is not a multiple of a possible
+ * alignment value because there is no GL_UNPACK_ROW_LENGTH
+ */
+void
+_cogl_texture_driver_upload_to_gl (GLenum gl_target,
+ GLuint gl_handle,
+ CoglBitmap *source_bmp,
+ GLint internal_gl_format,
+ GLuint source_gl_format,
+ GLuint source_gl_type);
+
+/*
* This sets up the glPixelStore state for an download to a destination with
* the same size, and with no offset.
*/