}
+static struct gl_texture_object *
+get_texture_for_framebuffer(struct gl_context *ctx, GLuint texture)
+{
+ if (!texture)
+ return NULL;
+
+ return _mesa_lookup_texture(ctx, texture);
+}
+
+
/**
* Common code called by gl*FramebufferTexture*() to retrieve the correct
* texture object pointer.
* \return true if no errors, false if errors
*/
static bool
-get_texture_for_framebuffer(struct gl_context *ctx, GLuint texture,
- bool layered, const char *caller,
- struct gl_texture_object **texObj)
+get_texture_for_framebuffer_err(struct gl_context *ctx, GLuint texture,
+ bool layered, const char *caller,
+ struct gl_texture_object **texObj)
{
*texObj = NULL; /* This will get returned if texture = 0. */
}
/* Get the texture object */
- if (!get_texture_for_framebuffer(ctx, texture, false, caller, &texObj))
+ if (!get_texture_for_framebuffer_err(ctx, texture, false, caller, &texObj))
return;
if (texObj) {
}
/* Get the texture object */
- if (!get_texture_for_framebuffer(ctx, texture, false, func, &texObj))
+ if (!get_texture_for_framebuffer_err(ctx, texture, false, func, &texObj))
return;
if (texObj) {
return;
/* Get the texture object */
- if (!get_texture_for_framebuffer(ctx, texture, false, func, &texObj))
+ if (!get_texture_for_framebuffer_err(ctx, texture, false, func, &texObj))
return;
if (texObj) {
}
/* Get the texture object */
- if (!get_texture_for_framebuffer(ctx, texture, true, func, &texObj))
+ if (!get_texture_for_framebuffer_err(ctx, texture, true, func, &texObj))
return;
if (texObj) {
return;
/* Get the texture object */
- if (!get_texture_for_framebuffer(ctx, texture, true, func, &texObj))
+ if (!get_texture_for_framebuffer_err(ctx, texture, true, func, &texObj))
return;
if (texObj) {