offscreen: cogl_offscreen_new_to_texture now supports GL_TEXTURE_RECTANGLE_ARB

cogl_offscreen_new_to_texture previously bailed out if the given texture's
GL target was anything but GL_TEXTURE_2D, but it now also allows
foreign GL_TEXTURE_RECTANGLE_ARB textures.

Thanks to Owen for reporting this issue, ref:
https://bugzilla.gnome.org/show_bug.cgi?id=601032
This commit is contained in:
Robert Bragg 2009-11-25 02:47:52 +00:00
parent 32bc0f2088
commit 95fed739d5

View File

@ -265,7 +265,8 @@ cogl_offscreen_new_to_texture (CoglHandle texhandle)
if (!cogl_texture_get_gl_texture (texhandle, &tex_gl_handle, &tex_gl_target))
return COGL_INVALID_HANDLE;
if (tex_gl_target != GL_TEXTURE_2D)
if (tex_gl_target != GL_TEXTURE_2D &&
tex_gl_target != GL_TEXTURE_RECTANGLE_ARB)
return COGL_INVALID_HANDLE;
/* Create a renderbuffer for stenciling */