blob: b8bc7f339edb50d28c4af035d7d16f253fa803d5 [file] [log] [blame]
Geoff Lang6a1e6b92014-11-06 10:42:45 -05001//
2// Copyright 2014 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
7// FramebufferImpl.h: Defines the abstract rx::DefaultAttachmentImpl class.
8
Geoff Lang0a73dd82014-11-19 16:18:08 -05009#ifndef LIBANGLE_RENDERER_FRAMBUFFERIMPL_H_
10#define LIBANGLE_RENDERER_FRAMBUFFERIMPL_H_
Geoff Lang6a1e6b92014-11-06 10:42:45 -050011
Geoff Lang9ad4bda2014-12-01 11:03:09 -050012#include "libANGLE/Error.h"
13
Geoff Lang6a1e6b92014-11-06 10:42:45 -050014#include "angle_gl.h"
15
Geoff Lang9ad4bda2014-12-01 11:03:09 -050016namespace gl
17{
18struct Rectangle;
19}
20
Geoff Lang6a1e6b92014-11-06 10:42:45 -050021namespace rx
22{
23
24class DefaultAttachmentImpl
25{
26 public:
27 virtual ~DefaultAttachmentImpl() {};
28
29 virtual GLsizei getWidth() const = 0;
30 virtual GLsizei getHeight() const = 0;
31 virtual GLenum getInternalFormat() const = 0;
32 virtual GLenum getActualFormat() const = 0;
33 virtual GLsizei getSamples() const = 0;
34};
35
Geoff Langda88add2014-12-01 10:22:01 -050036class FramebufferImpl
37{
38 public:
39 virtual ~FramebufferImpl() {};
Geoff Lang9ad4bda2014-12-01 11:03:09 -050040
41 virtual gl::Error invalidate(size_t count, const GLenum *attachments) = 0;
42 virtual gl::Error invalidateSub(size_t count, const GLenum *attachments, const gl::Rectangle &area) = 0;
Geoff Langda88add2014-12-01 10:22:01 -050043};
44
Geoff Lang6a1e6b92014-11-06 10:42:45 -050045}
46
Geoff Lang0a73dd82014-11-19 16:18:08 -050047#endif // LIBANGLE_RENDERER_FRAMBUFFERIMPL_H_