Home | History | Annotate | Download | only in renderer
      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:
     20     RenderTarget()
     21     {
     22         mWidth = 0;
     23         mHeight = 0;
     24         mInternalFormat = GL_NONE;
     25         mActualFormat = GL_NONE;
     26         mSamples = 0;
     27     }
     28 
     29     virtual ~RenderTarget() {};
     30 
     31     GLsizei getWidth() { return mWidth; }
     32     GLsizei getHeight() { return mHeight; }
     33     GLenum getInternalFormat() { return mInternalFormat; }
     34     GLenum getActualFormat() { return mActualFormat; }
     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