• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2015 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 // RenderbufferGL.h: Defines the class interface for RenderbufferGL.
8 
9 #ifndef LIBANGLE_RENDERER_GL_RENDERBUFFERGL_H_
10 #define LIBANGLE_RENDERER_GL_RENDERBUFFERGL_H_
11 
12 #include "libANGLE/renderer/RenderbufferImpl.h"
13 
14 namespace angle
15 {
16 struct FeaturesGL;
17 }  // namespace angle
18 
19 namespace gl
20 {
21 class TextureCapsMap;
22 }  // namespace gl
23 
24 namespace rx
25 {
26 
27 class BlitGL;
28 class FunctionsGL;
29 class StateManagerGL;
30 
31 class RenderbufferGL : public RenderbufferImpl
32 {
33   public:
34     RenderbufferGL(const gl::RenderbufferState &state, GLuint id);
35     ~RenderbufferGL() override;
36 
37     void onDestroy(const gl::Context *context) override;
38 
39     angle::Result setStorage(const gl::Context *context,
40                              GLenum internalformat,
41                              size_t width,
42                              size_t height) override;
43     angle::Result setStorageMultisample(const gl::Context *context,
44                                         size_t samples,
45                                         GLenum internalformat,
46                                         size_t width,
47                                         size_t height) override;
48     angle::Result setStorageEGLImageTarget(const gl::Context *context, egl::Image *image) override;
49 
50     angle::Result initializeContents(const gl::Context *context,
51                                      const gl::ImageIndex &imageIndex) override;
52 
53     GLuint getRenderbufferID() const;
54     GLenum getNativeInternalFormat() const;
55 
56   private:
57     GLuint mRenderbufferID;
58 
59     GLenum mNativeInternalFormat;
60 };
61 
62 }  // namespace rx
63 
64 #endif  // LIBANGLE_RENDERER_GL_RENDERBUFFERGL_H_
65