Check for out-of-memory when allocating 3d textures
Check for out-of-memory when allocating 3d textures

This makes Cogl explicitly check for out-of-memory errors reported by
the opengl driver in cogl_texture_3d_new_with_size() calls. This allows
us to throw a COGL_SYSTEM_ERROR_NO_MEMORY error and return NULL so
applications may gracefully handle this condition.

This patch only affects the cogl_texture_3d_new_with_size() api not
_new_from_data() or _new_from_bitmap().

Reviewed-by: Neil Roberts <822ec91a7ef82248fd36162ca8ac3283eba70848@linux.intel.com>

djdeath/cogl-android,djdeath/cogl-android,djdeath/cogl,gcampax/cogl,gcampax/cogl,gcampax/cogl,gcampax/cogl,djdeath/cogl,djdeath/cogl-android,djdeath/cogl