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 GLsizei width, 42 GLsizei height) override; 43 angle::Result setStorageMultisample(const gl::Context *context, 44 GLsizei samples, 45 GLenum internalformat, 46 GLsizei width, 47 GLsizei height, 48 gl::MultisamplingMode mode) override; 49 angle::Result setStorageEGLImageTarget(const gl::Context *context, egl::Image *image) override; 50 51 angle::Result initializeContents(const gl::Context *context, 52 const gl::ImageIndex &imageIndex) override; 53 54 GLuint getRenderbufferID() const; 55 GLenum getNativeInternalFormat() const; 56 57 private: 58 GLuint mRenderbufferID; 59 60 GLenum mNativeInternalFormat; 61 }; 62 63 } // namespace rx 64 65 #endif // LIBANGLE_RENDERER_GL_RENDERBUFFERGL_H_ 66