• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include "common/angleutils.h"
14 
15 namespace rx
16 {
17 class RenderTarget
18 {
19   public:
RenderTarget()20     RenderTarget()
21     {
22         mWidth = 0;
23         mHeight = 0;
24         mInternalFormat = GL_NONE;
25         mActualFormat = GL_NONE;
26         mSamples = 0;
27     }
28 
~RenderTarget()29     virtual ~RenderTarget() {};
30 
getWidth()31     GLsizei getWidth() { return mWidth; }
getHeight()32     GLsizei getHeight() { return mHeight; }
getInternalFormat()33     GLenum getInternalFormat() { return mInternalFormat; }
getActualFormat()34     GLenum getActualFormat() { return mActualFormat; }
getSamples()35     GLsizei getSamples() { return mSamples; }
36 
37     struct Desc {
38         GLsizei width;
39         GLsizei height;
40         GLenum  format;
41     };
42 
43   protected:
44     GLsizei mWidth;
45     GLsizei mHeight;
46     GLenum mInternalFormat;
47     GLenum mActualFormat;
48     GLsizei mSamples;
49 
50   private:
51     DISALLOW_COPY_AND_ASSIGN(RenderTarget);
52 };
53 
54 }
55 
56 #endif // LIBGLESV2_RENDERTARGET_H_
57