• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2012 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 // RenderTargetD3D.h: Defines an abstract wrapper class to manage IDirect3DSurface9
8 // and ID3D11View objects belonging to renderbuffers and renderable textures.
9 
10 #ifndef LIBANGLE_RENDERER_D3D_RENDERTARGETD3D_H_
11 #define LIBANGLE_RENDERER_D3D_RENDERTARGETD3D_H_
12 
13 #include "common/angleutils.h"
14 #include "libANGLE/FramebufferAttachment.h"
15 #include "libANGLE/angletypes.h"
16 
17 namespace rx
18 {
19 
20 class RenderTargetD3D : public FramebufferAttachmentRenderTarget
21 {
22   public:
23     RenderTargetD3D();
24     ~RenderTargetD3D() override;
25 
26     virtual GLsizei getWidth() const         = 0;
27     virtual GLsizei getHeight() const        = 0;
28     virtual GLsizei getDepth() const         = 0;
29     virtual GLenum getInternalFormat() const = 0;
30     virtual GLsizei getSamples() const       = 0;
getExtents()31     gl::Extents getExtents() const { return gl::Extents(getWidth(), getHeight(), getDepth()); }
isMultisampled()32     bool isMultisampled() const { return getSamples() > 0; }
33 
34     virtual unsigned int getSerial() const;
35     static unsigned int issueSerials(unsigned int count);
36 
37   private:
38     const unsigned int mSerial;
39     static unsigned int mCurrentSerial;
40 };
41 
42 }  // namespace rx
43 
44 #endif  // LIBANGLE_RENDERER_D3D_RENDERTARGETD3D_H_
45