Use GL_MAX_TEXTURE_SIZE on GLES when checking supported tex size
Under big GL, _cogl_texture_driver_size_supported uses the proxy texture to check whether the given texture size is supported. Proxy textures aren't available under GLES so previously this would just return TRUE to assume all texture sizes are supported. This patch makes it use glGetIntegerv with GL_MAX_TEXTURE_SIZE to give a second best guess. This fixes the sliced texture backend so that it will use slices when the texture is too big.
This commit is contained in:
parent
0fbdafd318
commit
bf8384baf1
@ -211,7 +211,13 @@ _cogl_texture_driver_size_supported (GLenum gl_target,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
return TRUE;
|
||||
GLint max_size;
|
||||
|
||||
/* GLES doesn't support a proxy texture target so let's at least
|
||||
check whether the size is greater than GL_MAX_TEXTURE_SIZE */
|
||||
GE( glGetIntegerv (GL_MAX_TEXTURE_SIZE, &max_size) );
|
||||
|
||||
return width <= max_size && height <= max_size;
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user