daniel@transgaming.com | 042d1b4 | 2012-11-28 19:37:09 +0000 | [diff] [blame] | 1 | // |
| 2 | // Copyright (c) 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 | // RenderTarget.h: Defines an abstract wrapper class to manage IDirect3DSurface9 |
| 8 | // and ID3D11View objects belonging to renderbuffers. |
| 9 | |
| 10 | #ifndef LIBGLESV2_RENDERER_RENDERTARGET_H_ |
| 11 | #define LIBGLESV2_RENDERER_RENDERTARGET_H_ |
| 12 | |
| 13 | #define GL_APICALL |
| 14 | #include <GLES2/gl2.h> |
| 15 | |
| 16 | #include "common/angleutils.h" |
| 17 | |
daniel@transgaming.com | a27e05b | 2012-11-28 19:39:42 +0000 | [diff] [blame^] | 18 | struct IDirect3DSurface9; // D3D9_REPLACE |
| 19 | |
daniel@transgaming.com | 042d1b4 | 2012-11-28 19:37:09 +0000 | [diff] [blame] | 20 | namespace rx |
| 21 | { |
| 22 | class RenderTarget |
| 23 | { |
| 24 | public: |
| 25 | RenderTarget() {}; |
| 26 | virtual ~RenderTarget() {}; |
| 27 | |
| 28 | GLsizei getWidth() { return mWidth; } |
| 29 | GLsizei getHeight() { return mHeight; } |
| 30 | GLenum getInternalFormat() { return mInternalFormat; } |
| 31 | GLenum getActualFormat() { return mActualFormat; } |
| 32 | GLsizei getSamples() { return mSamples; } |
| 33 | |
daniel@transgaming.com | a27e05b | 2012-11-28 19:39:42 +0000 | [diff] [blame^] | 34 | virtual IDirect3DSurface9 *getSurface() = 0; // D3D9_REPLACE - temporary pass-through function |
daniel@transgaming.com | 042d1b4 | 2012-11-28 19:37:09 +0000 | [diff] [blame] | 35 | |
daniel@transgaming.com | 39cee2e | 2012-11-28 19:39:14 +0000 | [diff] [blame] | 36 | struct Desc { |
| 37 | GLsizei width; |
| 38 | GLsizei height; |
| 39 | GLenum format; |
| 40 | }; |
| 41 | |
daniel@transgaming.com | 042d1b4 | 2012-11-28 19:37:09 +0000 | [diff] [blame] | 42 | protected: |
| 43 | GLsizei mWidth; |
| 44 | GLsizei mHeight; |
| 45 | GLenum mInternalFormat; |
| 46 | GLenum mActualFormat; |
| 47 | GLsizei mSamples; |
| 48 | |
| 49 | private: |
| 50 | DISALLOW_COPY_AND_ASSIGN(RenderTarget); |
| 51 | }; |
| 52 | |
| 53 | } |
| 54 | |
| 55 | #endif // LIBGLESV2_RENDERTARGET_H_ |