arsa  2.7
IRenderTarget.h
Go to the documentation of this file.
1 // Copyright (C) 2015 Patryk Nadrowski
2 // This file is part of the "Irrlicht Engine".
3 // For conditions of distribution and use, see copyright notice in irrlicht.h
4 
5 #ifndef __I_RENDER_TARGET_H_INCLUDED__
6 #define __I_RENDER_TARGET_H_INCLUDED__
7 
8 #include "IReferenceCounted.h"
9 #include "EDriverTypes.h"
10 #include "irrArray.h"
11 
12 namespace irr
13 {
14 namespace video
15 {
16  class ITexture;
17 
20  {
21  ECS_POSX = 0,
27  };
28 
30  class IRenderTarget : public virtual IReferenceCounted
31  {
32  public:
33 
36  {
37  }
38 
41  {
42  return Texture;
43  }
44 
47  {
48  return DepthStencil;
49  }
50 
52 
58  virtual void setTexture(const core::array<ITexture*>& texture, ITexture* depthStencil, const core::array<E_CUBE_SURFACE>& cubeSurfaces = core::array<E_CUBE_SURFACE>()) = 0;
59 
61  void setTexture(ITexture* texture, ITexture* depthStencil)
62  {
63  core::array<ITexture*> textureArray(1);
64  textureArray.push_back(texture);
65 
66  setTexture(textureArray, depthStencil);
67  }
68 
70  void setTexture(ITexture* texture, ITexture* depthStencil, E_CUBE_SURFACE cubeSurface)
71  {
72  core::array<ITexture*> textureArray(1);
73  textureArray.push_back(texture);
74 
75  core::array<E_CUBE_SURFACE> cubeSurfaces(1);
76  cubeSurfaces.push_back(cubeSurface);
77 
78  setTexture(textureArray, depthStencil, cubeSurfaces);
79  }
80 
83  {
84  return DriverType;
85  }
86 
87  protected:
88 
91 
94 
97 
100 
101  private:
102  // no copying (IReferenceCounted still allows that for reasons which take some time to work around)
104  IRenderTarget& operator=(const IRenderTarget&);
105  };
106 
107 }
108 }
109 
110 #endif
E_DRIVER_TYPE DriverType
Driver type of render target.
Definition: IRenderTarget.h:99
void setTexture(ITexture *texture, ITexture *depthStencil, E_CUBE_SURFACE cubeSurface)
Set one cube surface texture.
Definition: IRenderTarget.h:70
GLenum GLenum GLuint texture
virtual void setTexture(const core::array< ITexture * > &texture, ITexture *depthStencil, const core::array< E_CUBE_SURFACE > &cubeSurfaces=core::array< E_CUBE_SURFACE >())=0
Set multiple textures.
core::array< ITexture * > Texture
Textures assigned to render target.
Definition: IRenderTarget.h:90
Everything in the Irrlicht Engine can be found in this namespace.
Definition: CARSADPad.h:6
void push_back(const T &element)
Adds an element at back of array.
Definition: irrArray.h:111
ITexture * getDepthStencil() const
Returns a of previously set depth / depth-stencil texture.
Definition: IRenderTarget.h:46
E_DRIVER_TYPE
An enum for all types of drivers the Irrlicht Engine supports.
Definition: EDriverTypes.h:16
Null driver, useful for applications to run the engine without visualization.
Definition: EDriverTypes.h:21
E_CUBE_SURFACE
Enumeration of cube texture surfaces.
Definition: IRenderTarget.h:19
void setTexture(ITexture *texture, ITexture *depthStencil)
Set one texture.
Definition: IRenderTarget.h:61
const core::array< ITexture * > & getTexture() const
Returns an array of previously set textures.
Definition: IRenderTarget.h:40
ITexture * DepthStencil
Depth or packed depth-stencil texture assigned to render target.
Definition: IRenderTarget.h:93
E_DRIVER_TYPE getDriverType() const
Get driver type of render target.
Definition: IRenderTarget.h:82
Interface of a Render Target.
Definition: IRenderTarget.h:30
Self reallocating template array (like stl vector) with additional features.
Definition: irrArray.h:22
Interface of a Video Driver dependent Texture.
Definition: ITexture.h:177
Base class of most objects of the Irrlicht Engine.
core::array< E_CUBE_SURFACE > CubeSurfaces
Active surface of cube textures.
Definition: IRenderTarget.h:96