[MPlayer-cvslog] r21217 - in trunk/libvo: gl_common.c gl_common.h

reimar subversion at mplayerhq.hu
Sat Nov 25 14:34:55 CET 2006


Author: reimar
Date: Sat Nov 25 14:34:55 2006
New Revision: 21217

Modified:
   trunk/libvo/gl_common.c
   trunk/libvo/gl_common.h

Log:
Avoid void * arithmetic


Modified: trunk/libvo/gl_common.c
==============================================================================
--- trunk/libvo/gl_common.c	(original)
+++ trunk/libvo/gl_common.c	Sat Nov 25 14:34:55 2006
@@ -473,7 +473,7 @@
  * \param target texture target, usually GL_TEXTURE_2D
  * \param format OpenGL format of data
  * \param type OpenGL type of data
- * \param data data to upload
+ * \param dataptr data to upload
  * \param stride data stride
  * \param x x offset in texture
  * \param y y offset in texture
@@ -483,8 +483,9 @@
  * \ingroup gltexture
  */
 void glUploadTex(GLenum target, GLenum format, GLenum type,
-                 const void *data, int stride,
+                 const void *dataptr, int stride,
                  int x, int y, int w, int h, int slice) {
+  const uint8_t *data = dataptr;
   int y_max = y + h;
   if (w <= 0 || h <= 0) return;
   if (slice <= 0)

Modified: trunk/libvo/gl_common.h
==============================================================================
--- trunk/libvo/gl_common.h	(original)
+++ trunk/libvo/gl_common.h	Sat Nov 25 14:34:55 2006
@@ -212,7 +212,7 @@
 int glCreatePPMTex(GLenum target, GLenum fmt, GLint filter,
                    FILE *f, int *width, int *height, int *maxval);
 void glUploadTex(GLenum target, GLenum format, GLenum type,
-                 const void *data, int stride,
+                 const void *dataptr, int stride,
                  int x, int y, int w, int h, int slice);
 void glDrawTex(GLfloat x, GLfloat y, GLfloat w, GLfloat h,
                GLfloat tx, GLfloat ty, GLfloat tw, GLfloat th,



More information about the MPlayer-cvslog mailing list