Avoid void * arithmetic

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21217 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2006-11-25 13:34:55 +00:00
parent 42eecb4f1b
commit 4f6a65ef4e
2 changed files with 4 additions and 3 deletions

View File

@ -473,7 +473,7 @@ int glFmt2bpp(GLenum format, GLenum type) {
* \param target texture target, usually GL_TEXTURE_2D * \param target texture target, usually GL_TEXTURE_2D
* \param format OpenGL format of data * \param format OpenGL format of data
* \param type OpenGL type of data * \param type OpenGL type of data
* \param data data to upload * \param dataptr data to upload
* \param stride data stride * \param stride data stride
* \param x x offset in texture * \param x x offset in texture
* \param y y offset in texture * \param y y offset in texture
@ -483,8 +483,9 @@ int glFmt2bpp(GLenum format, GLenum type) {
* \ingroup gltexture * \ingroup gltexture
*/ */
void glUploadTex(GLenum target, GLenum format, GLenum type, 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) { int x, int y, int w, int h, int slice) {
const uint8_t *data = dataptr;
int y_max = y + h; int y_max = y + h;
if (w <= 0 || h <= 0) return; if (w <= 0 || h <= 0) return;
if (slice <= 0) if (slice <= 0)

View File

@ -212,7 +212,7 @@ void glCreateClearTex(GLenum target, GLenum fmt, GLint filter,
int glCreatePPMTex(GLenum target, GLenum fmt, GLint filter, int glCreatePPMTex(GLenum target, GLenum fmt, GLint filter,
FILE *f, int *width, int *height, int *maxval); FILE *f, int *width, int *height, int *maxval);
void glUploadTex(GLenum target, GLenum format, GLenum type, 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); int x, int y, int w, int h, int slice);
void glDrawTex(GLfloat x, GLfloat y, GLfloat w, GLfloat h, void glDrawTex(GLfloat x, GLfloat y, GLfloat w, GLfloat h,
GLfloat tx, GLfloat ty, GLfloat tw, GLfloat th, GLfloat tx, GLfloat ty, GLfloat tw, GLfloat th,