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