1 //
2 // Copyright 2016 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.
5 //
6 // FramebufferAttachmentObjectImpl.h:
7 // Common ancenstor for all implementations of FBO attachable-objects.
8 // This means Surfaces, Textures and Renderbuffers.
9 //
10
11 #ifndef LIBANGLE_RENDERER_FRAMEBUFFER_ATTACHMENT_OBJECT_IMPL_H_
12 #define LIBANGLE_RENDERER_FRAMEBUFFER_ATTACHMENT_OBJECT_IMPL_H_
13
14 #include "libANGLE/FramebufferAttachment.h"
15
16 namespace rx
17 {
18
19 class FramebufferAttachmentObjectImpl : angle::NonCopyable
20 {
21 public:
FramebufferAttachmentObjectImpl()22 FramebufferAttachmentObjectImpl() {}
~FramebufferAttachmentObjectImpl()23 virtual ~FramebufferAttachmentObjectImpl() {}
24
25 virtual gl::Error getAttachmentRenderTarget(const gl::Context *context,
26 GLenum binding,
27 const gl::ImageIndex &imageIndex,
28 FramebufferAttachmentRenderTarget **rtOut);
29
30 virtual gl::Error initializeContents(const gl::Context *context,
31 const gl::ImageIndex &imageIndex);
32 };
33
getAttachmentRenderTarget(const gl::Context * context,GLenum binding,const gl::ImageIndex & imageIndex,FramebufferAttachmentRenderTarget ** rtOut)34 inline gl::Error FramebufferAttachmentObjectImpl::getAttachmentRenderTarget(
35 const gl::Context *context,
36 GLenum binding,
37 const gl::ImageIndex &imageIndex,
38 FramebufferAttachmentRenderTarget **rtOut)
39 {
40 UNIMPLEMENTED();
41 return gl::OutOfMemory() << "getAttachmentRenderTarget not supported.";
42 }
43
initializeContents(const gl::Context * context,const gl::ImageIndex & imageIndex)44 inline gl::Error FramebufferAttachmentObjectImpl::initializeContents(
45 const gl::Context *context,
46 const gl::ImageIndex &imageIndex)
47 {
48 UNIMPLEMENTED();
49 return gl::OutOfMemory() << "initialize not supported.";
50 }
51
52 } // namespace rx
53
54 #endif // LIBANGLE_RENDERER_FRAMEBUFFER_ATTACHMENT_OBJECT_IMPL_H_
55