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/ImageIndex.h"
15 #include "libANGLE/Observer.h"
16
17 namespace gl
18 {
19 class Context;
20 } // namespace gl
21
22 namespace rx
23 {
24 class FramebufferAttachmentRenderTarget;
25
26 class FramebufferAttachmentObjectImpl : angle::NonCopyable
27 {
28 public:
FramebufferAttachmentObjectImpl()29 FramebufferAttachmentObjectImpl() {}
~FramebufferAttachmentObjectImpl()30 virtual ~FramebufferAttachmentObjectImpl() {}
31
32 virtual angle::Result getAttachmentRenderTarget(const gl::Context *context,
33 GLenum binding,
34 const gl::ImageIndex &imageIndex,
35 FramebufferAttachmentRenderTarget **rtOut);
36
37 virtual angle::Result initializeContents(const gl::Context *context,
38 const gl::ImageIndex &imageIndex);
39 };
40
getAttachmentRenderTarget(const gl::Context * context,GLenum binding,const gl::ImageIndex & imageIndex,FramebufferAttachmentRenderTarget ** rtOut)41 inline angle::Result FramebufferAttachmentObjectImpl::getAttachmentRenderTarget(
42 const gl::Context *context,
43 GLenum binding,
44 const gl::ImageIndex &imageIndex,
45 FramebufferAttachmentRenderTarget **rtOut)
46 {
47 UNIMPLEMENTED();
48 return angle::Result::Stop;
49 }
50
initializeContents(const gl::Context * context,const gl::ImageIndex & imageIndex)51 inline angle::Result FramebufferAttachmentObjectImpl::initializeContents(
52 const gl::Context *context,
53 const gl::ImageIndex &imageIndex)
54 {
55 UNIMPLEMENTED();
56 return angle::Result::Stop;
57 }
58
59 } // namespace rx
60
61 #endif // LIBANGLE_RENDERER_FRAMEBUFFER_ATTACHMENT_OBJECT_IMPL_H_
62