mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 03:20:46 -05:00
cogl-texture-2d: Determine format before checking texture support
When entering cogl_texture_2d_new_from_bitmap the internal format can be COGL_PIXEL_FORMAT_ANY. This was causing _cogl_texture_2d_can_create to use an invalid GL format type. Mesa apparently ignores this but it was causing errors when Cogl is compiled with debugging under NVidia. http://bugzilla.openedhand.com/show_bug.cgi?id=2026
This commit is contained in:
parent
770ca1311d
commit
9fc9aa562e
@ -286,6 +286,9 @@ _cogl_texture_2d_new_from_bitmap (CoglHandle bmp_handle,
|
|||||||
|
|
||||||
g_return_val_if_fail (bmp_handle != COGL_INVALID_HANDLE, COGL_INVALID_HANDLE);
|
g_return_val_if_fail (bmp_handle != COGL_INVALID_HANDLE, COGL_INVALID_HANDLE);
|
||||||
|
|
||||||
|
internal_format = _cogl_texture_determine_internal_format (bmp->format,
|
||||||
|
internal_format);
|
||||||
|
|
||||||
if (!_cogl_texture_2d_can_create (bmp->width, bmp->height, internal_format))
|
if (!_cogl_texture_2d_can_create (bmp->width, bmp->height, internal_format))
|
||||||
return COGL_INVALID_HANDLE;
|
return COGL_INVALID_HANDLE;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user