# HG changeset patch # User reimar # Date 1124973957 0 # Node ID a87c6cf3fe522faa747fab8fd064ec25b3d07017 # Parent 36a018da4c2744fbdb1a8a5c360e417391df88bc Fix texture format variable types. Internal format is GLint, others are GLenum diff -r 36a018da4c27 -r a87c6cf3fe52 libvo/gl_common.c --- a/libvo/gl_common.c Wed Aug 24 12:33:32 2005 +0000 +++ b/libvo/gl_common.c Thu Aug 25 12:45:57 2005 +0000 @@ -110,13 +110,14 @@ * \param gl_type [OUT] OpenGL type for this image format. * \return 1 if format is supported by OpenGL, 0 if not. */ -int glFindFormat(uint32_t fmt, uint32_t *bpp, GLenum *gl_texfmt, +int glFindFormat(uint32_t fmt, uint32_t *bpp, GLint *gl_texfmt, GLenum *gl_format, GLenum *gl_type) { int dummy1; GLenum dummy2; + GLint dummy3; if (bpp == NULL) bpp = &dummy1; - if (gl_texfmt == NULL) gl_texfmt = &dummy2; + if (gl_texfmt == NULL) gl_texfmt = &dummy3; if (gl_format == NULL) gl_format = &dummy2; if (gl_type == NULL) gl_type = &dummy2; diff -r 36a018da4c27 -r a87c6cf3fe52 libvo/gl_common.h --- a/libvo/gl_common.h Wed Aug 24 12:33:32 2005 +0000 +++ b/libvo/gl_common.h Thu Aug 25 12:45:57 2005 +0000 @@ -61,7 +61,7 @@ const char *glValName(GLint value); -int glFindFormat(uint32_t format, uint32_t *bpp, GLenum *gl_texfmt, +int glFindFormat(uint32_t format, uint32_t *bpp, GLint *gl_texfmt, GLenum *gl_format, GLenum *gl_type); int glFmt2bpp(GLenum format, GLenum type); void glCreateClearTex(GLenum target, GLenum fmt, GLint filter, diff -r 36a018da4c27 -r a87c6cf3fe52 libvo/vo_gl.c --- a/libvo/vo_gl.c Wed Aug 24 12:33:32 2005 +0000 +++ b/libvo/vo_gl.c Thu Aug 25 12:45:57 2005 +0000 @@ -64,7 +64,7 @@ static int use_glFinish; static int swap_interval; static GLenum gl_target; -static GLenum gl_texfmt; +static GLint gl_texfmt; static GLenum gl_format; static GLenum gl_type; static GLint gl_buffer; diff -r 36a018da4c27 -r a87c6cf3fe52 libvo/vo_gl2.c --- a/libvo/vo_gl2.c Wed Aug 24 12:33:32 2005 +0000 +++ b/libvo/vo_gl2.c Thu Aug 25 12:45:57 2005 +0000 @@ -64,8 +64,8 @@ static struct TexSquare * texgrid = NULL; static GLint gl_internal_format; static int rgb_sz, r_sz, g_sz, b_sz, a_sz; -static GLint gl_bitmap_format; -static GLint gl_bitmap_type; +static GLenum gl_bitmap_format; +static GLenum gl_bitmap_type; static int isGL12 = GL_FALSE; static int gl_bilinear=1;