blob: 388ee4e8344c47773cfce675eaedc11d507d775c [file] [log] [blame]
Geoff Lang6a1e6b92014-11-06 10:42:45 -05001//
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// Framebuffer11.h: Implements the DefaultAttachment11 class.
8
Geoff Lang2b5420c2014-11-19 14:20:15 -05009#include "libANGLE/renderer/d3d/FramebufferD3D.h"
10#include "libANGLE/renderer/RenderTarget.h"
Geoff Lang6a1e6b92014-11-06 10:42:45 -050011
12namespace rx
13{
14
15DefaultAttachmentD3D::DefaultAttachmentD3D(RenderTarget *renderTarget)
16 : mRenderTarget(renderTarget)
17{
18 ASSERT(mRenderTarget);
19}
20
21DefaultAttachmentD3D::~DefaultAttachmentD3D()
22{
23 SafeDelete(mRenderTarget);
24}
25
26DefaultAttachmentD3D *DefaultAttachmentD3D::makeDefaultAttachmentD3D(DefaultAttachmentImpl* impl)
27{
28 ASSERT(HAS_DYNAMIC_TYPE(DefaultAttachmentD3D*, impl));
29 return static_cast<DefaultAttachmentD3D*>(impl);
30}
31
32GLsizei DefaultAttachmentD3D::getWidth() const
33{
34 return mRenderTarget->getWidth();
35}
36
37GLsizei DefaultAttachmentD3D::getHeight() const
38{
39 return mRenderTarget->getHeight();
40}
41
42GLenum DefaultAttachmentD3D::getInternalFormat() const
43{
44 return mRenderTarget->getInternalFormat();
45}
46
47GLenum DefaultAttachmentD3D::getActualFormat() const
48{
49 return mRenderTarget->getActualFormat();
50}
51
52GLsizei DefaultAttachmentD3D::getSamples() const
53{
54 return mRenderTarget->getSamples();
55}
56
57RenderTarget *DefaultAttachmentD3D::getRenderTarget() const
58{
59 return mRenderTarget;
60}
61
62}