blob: 62c684cf7940f55adcfc8ceb1b87dd22f7bcf9a4 [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
18namespace rx
19{
20class 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
daniel@transgaming.com39cee2e2012-11-28 19:39:14 +000034 struct Desc {
35 GLsizei width;
36 GLsizei height;
37 GLenum format;
38 };
39
daniel@transgaming.com042d1b42012-11-28 19:37:09 +000040 protected:
41 GLsizei mWidth;
42 GLsizei mHeight;
43 GLenum mInternalFormat;
44 GLenum mActualFormat;
45 GLsizei mSamples;
46
47 private:
48 DISALLOW_COPY_AND_ASSIGN(RenderTarget);
49};
50
51}
52
53#endif // LIBGLESV2_RENDERTARGET_H_