2 // Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
7 // Image.h: Implements the rx::Image class, an abstract base class for the
8 // renderer-specific classes which will define the interface to the underlying
9 // surfaces or resources.
11 #include "libGLESv2/renderer/Image.h"
12 #include "libGLESv2/Framebuffer.h"
13 #include "libGLESv2/main.h"
23 mInternalFormat = GL_NONE;
24 mActualFormat = GL_NONE;
30 gl::Error Image::copy(GLint xoffset, GLint yoffset, GLint zoffset, const gl::Rectangle &area, gl::Framebuffer *source)
32 gl::FramebufferAttachment *colorbuffer = source->getReadColorbuffer();
35 RenderTarget *renderTarget = NULL;
36 gl::Error error = GetAttachmentRenderTarget(colorbuffer, &renderTarget);
43 return copy(xoffset, yoffset, zoffset, area, renderTarget);