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 | |
| 18 | namespace rx |
| 19 | { |
| 20 | class RenderTarget |
| 21 | { |
| 22 | public: |
| 23 | RenderTarget() {}; |
| 24 | virtual ~RenderTarget() {}; |
| 25 | |
| 26 | GLsizei getWidth() { return mWidth; } |
| 27 | GLsizei getHeight() { return mHeight; } |
| 28 | GLenum getInternalFormat() { return mInternalFormat; } |
| 29 | GLenum getActualFormat() { return mActualFormat; } |
| 30 | GLsizei getSamples() { return mSamples; } |
| 31 | |
| 32 | virtual IDirect3DSurface9 *getSurface() = 0; // D3D9_REPLACE - temporary pass-through function |
| 33 | |
| 34 | protected: |
| 35 | GLsizei mWidth; |
| 36 | GLsizei mHeight; |
| 37 | GLenum mInternalFormat; |
| 38 | GLenum mActualFormat; |
| 39 | GLsizei mSamples; |
| 40 | |
| 41 | private: |
| 42 | DISALLOW_COPY_AND_ASSIGN(RenderTarget); |
| 43 | }; |
| 44 | |
| 45 | } |
| 46 | |
| 47 | #endif // LIBGLESV2_RENDERTARGET_H_ |