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 : public angle::Subject
27 {
28   public:
FramebufferAttachmentObjectImpl()29     FramebufferAttachmentObjectImpl() {}
~FramebufferAttachmentObjectImpl()30     ~FramebufferAttachmentObjectImpl() override {}
31 
32     virtual angle::Result getAttachmentRenderTarget(const gl::Context *context,
33                                                     GLenum binding,
34                                                     const gl::ImageIndex &imageIndex,
35                                                     GLsizei samples,
36                                                     FramebufferAttachmentRenderTarget **rtOut);
37 
38     virtual angle::Result initializeContents(const gl::Context *context,
39                                              const gl::ImageIndex &imageIndex);
40 };
41 
getAttachmentRenderTarget(const gl::Context * context,GLenum binding,const gl::ImageIndex & imageIndex,GLsizei samples,FramebufferAttachmentRenderTarget ** rtOut)42 inline angle::Result FramebufferAttachmentObjectImpl::getAttachmentRenderTarget(
43     const gl::Context *context,
44     GLenum binding,
45     const gl::ImageIndex &imageIndex,
46     GLsizei samples,
47     FramebufferAttachmentRenderTarget **rtOut)
48 {
49     UNIMPLEMENTED();
50     return angle::Result::Stop;
51 }
52 
initializeContents(const gl::Context * context,const gl::ImageIndex & imageIndex)53 inline angle::Result FramebufferAttachmentObjectImpl::initializeContents(
54     const gl::Context *context,
55     const gl::ImageIndex &imageIndex)
56 {
57     UNIMPLEMENTED();
58     return angle::Result::Stop;
59 }
60 
61 }  // namespace rx
62 
63 #endif  // LIBANGLE_RENDERER_FRAMEBUFFER_ATTACHMENT_OBJECT_IMPL_H_
64