comparison libvo/gl_common.c @ 16303:a87c6cf3fe52

Fix texture format variable types. Internal format is GLint, others are GLenum
author reimar
date Thu, 25 Aug 2005 12:45:57 +0000
parents d5374d07492a
children b5ca0e5760d0
comparison
equal deleted inserted replaced
16302:36a018da4c27 16303:a87c6cf3fe52
108 * image format, not necessarily the best for performance. 108 * image format, not necessarily the best for performance.
109 * \param gl_format [OUT] OpenGL format for this image format. 109 * \param gl_format [OUT] OpenGL format for this image format.
110 * \param gl_type [OUT] OpenGL type for this image format. 110 * \param gl_type [OUT] OpenGL type for this image format.
111 * \return 1 if format is supported by OpenGL, 0 if not. 111 * \return 1 if format is supported by OpenGL, 0 if not.
112 */ 112 */
113 int glFindFormat(uint32_t fmt, uint32_t *bpp, GLenum *gl_texfmt, 113 int glFindFormat(uint32_t fmt, uint32_t *bpp, GLint *gl_texfmt,
114 GLenum *gl_format, GLenum *gl_type) 114 GLenum *gl_format, GLenum *gl_type)
115 { 115 {
116 int dummy1; 116 int dummy1;
117 GLenum dummy2; 117 GLenum dummy2;
118 GLint dummy3;
118 if (bpp == NULL) bpp = &dummy1; 119 if (bpp == NULL) bpp = &dummy1;
119 if (gl_texfmt == NULL) gl_texfmt = &dummy2; 120 if (gl_texfmt == NULL) gl_texfmt = &dummy3;
120 if (gl_format == NULL) gl_format = &dummy2; 121 if (gl_format == NULL) gl_format = &dummy2;
121 if (gl_type == NULL) gl_type = &dummy2; 122 if (gl_type == NULL) gl_type = &dummy2;
122 123
123 *bpp = IMGFMT_IS_BGR(fmt)?IMGFMT_BGR_DEPTH(fmt):IMGFMT_RGB_DEPTH(fmt); 124 *bpp = IMGFMT_IS_BGR(fmt)?IMGFMT_BGR_DEPTH(fmt):IMGFMT_RGB_DEPTH(fmt);
124 *gl_texfmt = 3; 125 *gl_texfmt = 3;