blob: 58276071e754adeca26a4c37d71ebb96b9482711 [file] [log] [blame]
daniel@transgaming.com042d1b42012-11-28 19:37:09 +00001//
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.coma27e05b2012-11-28 19:39:42 +000018struct IDirect3DSurface9; // D3D9_REPLACE
19
daniel@transgaming.com042d1b42012-11-28 19:37:09 +000020namespace rx
21{
22class 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.coma27e05b2012-11-28 19:39:42 +000034 virtual IDirect3DSurface9 *getSurface() = 0; // D3D9_REPLACE - temporary pass-through function
daniel@transgaming.com042d1b42012-11-28 19:37:09 +000035
daniel@transgaming.com39cee2e2012-11-28 19:39:14 +000036 struct Desc {
37 GLsizei width;
38 GLsizei height;
39 GLenum format;
40 };
41
daniel@transgaming.com042d1b42012-11-28 19:37:09 +000042 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_