Geoff Lang | 6a1e6b9 | 2014-11-06 10:42:45 -0500 | [diff] [blame] | 1 | // |
| 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 Lang | 0a73dd8 | 2014-11-19 16:18:08 -0500 | [diff] [blame] | 9 | #ifndef LIBANGLE_RENDERER_FRAMBUFFERIMPL_H_ |
| 10 | #define LIBANGLE_RENDERER_FRAMBUFFERIMPL_H_ |
Geoff Lang | 6a1e6b9 | 2014-11-06 10:42:45 -0500 | [diff] [blame] | 11 | |
Geoff Lang | 9ad4bda | 2014-12-01 11:03:09 -0500 | [diff] [blame^] | 12 | #include "libANGLE/Error.h" |
| 13 | |
Geoff Lang | 6a1e6b9 | 2014-11-06 10:42:45 -0500 | [diff] [blame] | 14 | #include "angle_gl.h" |
| 15 | |
Geoff Lang | 9ad4bda | 2014-12-01 11:03:09 -0500 | [diff] [blame^] | 16 | namespace gl |
| 17 | { |
| 18 | struct Rectangle; |
| 19 | } |
| 20 | |
Geoff Lang | 6a1e6b9 | 2014-11-06 10:42:45 -0500 | [diff] [blame] | 21 | namespace rx |
| 22 | { |
| 23 | |
| 24 | class 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 Lang | da88add | 2014-12-01 10:22:01 -0500 | [diff] [blame] | 36 | class FramebufferImpl |
| 37 | { |
| 38 | public: |
| 39 | virtual ~FramebufferImpl() {}; |
Geoff Lang | 9ad4bda | 2014-12-01 11:03:09 -0500 | [diff] [blame^] | 40 | |
| 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 Lang | da88add | 2014-12-01 10:22:01 -0500 | [diff] [blame] | 43 | }; |
| 44 | |
Geoff Lang | 6a1e6b9 | 2014-11-06 10:42:45 -0500 | [diff] [blame] | 45 | } |
| 46 | |
Geoff Lang | 0a73dd8 | 2014-11-19 16:18:08 -0500 | [diff] [blame] | 47 | #endif // LIBANGLE_RENDERER_FRAMBUFFERIMPL_H_ |