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 // RenderbufferD3d.h: Defines the RenderbufferD3D class which implements RenderbufferImpl. 8 9 #ifndef LIBANGLE_RENDERER_D3D_RENDERBUFFERD3D_H_ 10 #define LIBANGLE_RENDERER_D3D_RENDERBUFFERD3D_H_ 11 12 #include "angle_gl.h" 13 14 #include "common/angleutils.h" 15 #include "libANGLE/renderer/RenderbufferImpl.h" 16 17 namespace rx 18 { 19 class EGLImageD3D; 20 class RendererD3D; 21 class RenderTargetD3D; 22 class SwapChainD3D; 23 24 class RenderbufferD3D : public RenderbufferImpl 25 { 26 public: 27 RenderbufferD3D(const gl::RenderbufferState &state, RendererD3D *renderer); 28 ~RenderbufferD3D() override; 29 30 void onDestroy(const gl::Context *context) override; 31 32 angle::Result setStorage(const gl::Context *context, 33 GLenum internalformat, 34 GLsizei width, 35 GLsizei height) override; 36 angle::Result setStorageMultisample(const gl::Context *context, 37 GLsizei samples, 38 GLenum internalformat, 39 GLsizei width, 40 GLsizei height, 41 gl::MultisamplingMode mode) override; 42 angle::Result setStorageEGLImageTarget(const gl::Context *context, egl::Image *image) override; 43 44 angle::Result getRenderTarget(const gl::Context *context, RenderTargetD3D **outRenderTarget); 45 angle::Result getAttachmentRenderTarget(const gl::Context *context, 46 GLenum binding, 47 const gl::ImageIndex &imageIndex, 48 GLsizei samples, 49 FramebufferAttachmentRenderTarget **rtOut) override; 50 51 angle::Result initializeContents(const gl::Context *context, 52 const gl::ImageIndex &imageIndex) override; 53 54 private: 55 RendererD3D *mRenderer; 56 RenderTargetD3D *mRenderTarget; 57 EGLImageD3D *mImage; 58 }; 59 60 } // namespace rx 61 62 #endif // LIBANGLE_RENDERER_D3D_RENDERBUFFERD3D_H_ 63