Turn size_format into gl_size_format, and add a FIXME note
This commit is contained in:
parent
0551e2dea8
commit
9dd7d7804e
|
@ -51,11 +51,12 @@ void gl_ff_matrix(const math_matrix_4x4 *mat)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void size_format(GLint* internalFormat)
|
static void gl_size_format(GLint* internalFormat)
|
||||||
{
|
{
|
||||||
switch (*internalFormat)
|
switch (*internalFormat)
|
||||||
{
|
{
|
||||||
case GL_RGB:
|
case GL_RGB:
|
||||||
|
/* FIXME: PS3 does not support this, neither does it have GL_RGB565_OES. */
|
||||||
*internalFormat = GL_RGB565;
|
*internalFormat = GL_RGB565;
|
||||||
break;
|
break;
|
||||||
case GL_RGBA:
|
case GL_RGBA:
|
||||||
|
@ -83,13 +84,13 @@ void gl_load_texture_image(GLenum target,
|
||||||
#ifdef HAVE_OPENGLES2
|
#ifdef HAVE_OPENGLES2
|
||||||
if (gl_check_capability(GL_CAPS_TEX_STORAGE_EXT))
|
if (gl_check_capability(GL_CAPS_TEX_STORAGE_EXT))
|
||||||
{
|
{
|
||||||
size_format(&internalFormat);
|
gl_size_format(&internalFormat);
|
||||||
glTexStorage2DEXT(target, 1, internalFormat, width, height);
|
glTexStorage2DEXT(target, 1, internalFormat, width, height);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (gl_check_capability(GL_CAPS_TEX_STORAGE))
|
if (gl_check_capability(GL_CAPS_TEX_STORAGE))
|
||||||
{
|
{
|
||||||
size_format(&internalFormat);
|
gl_size_format(&internalFormat);
|
||||||
glTexStorage2D(target, 1, internalFormat, width, height);
|
glTexStorage2D(target, 1, internalFormat, width, height);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -99,7 +100,7 @@ void gl_load_texture_image(GLenum target,
|
||||||
#ifdef HAVE_OPENGLES
|
#ifdef HAVE_OPENGLES
|
||||||
if (gl_check_capability(GL_CAPS_GLES3_SUPPORTED))
|
if (gl_check_capability(GL_CAPS_GLES3_SUPPORTED))
|
||||||
#endif
|
#endif
|
||||||
size_format(&internalFormat);
|
gl_size_format(&internalFormat);
|
||||||
glTexImage2D(target, level, internalFormat, width, height, border, format, type, data);
|
glTexImage2D(target, level, internalFormat, width, height, border, format, type, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue