28#ifndef __RenderTexture_H__
29#define __RenderTexture_H__
87 mBoundSurfaces.push_back(0);
121 assert (index < mBoundSurfaces.size());
122 return mBoundSurfaces[index];
Specialisation of HardwareBuffer for a pixel buffer.
This class represents a render target that renders to multiple RenderTextures at once.
BoundSufaceList mBoundSurfaces
virtual void unbindSurfaceImpl(size_t attachment)=0
Implementation of unbindSurface, must be provided.
PixelFormat suggestPixelFormat() const
Irrelevant implementation since cannot copy.
const BoundSufaceList & getBoundSurfaceList() const
Get a list of the surfaces which have been bound.
virtual void bindSurface(size_t attachment, RenderTexture *target)
Bind a surface to a certain attachment point.
RenderTexture * getBoundSurface(size_t index)
Get a pointer to a bound surface.
MultiRenderTarget(const String &name)
virtual void bindSurfaceImpl(size_t attachment, RenderTexture *target)=0
Implementation of bindSurface, must be provided.
virtual void copyContentsToMemory(const PixelBox &dst, FrameBuffer buffer)
Error throwing implementation, it's not possible to write a MultiRenderTarget to disk.
virtual void unbindSurface(size_t attachment)
Unbind attachment.
vector< RenderTexture * >::type BoundSufaceList
A primitive describing a volume (3D), image (2D) or line (1D) of pixels in memory.
A 'canvas' which can receive the results of a rendering operation.
This class represents a RenderTarget that renders to a Texture.
HardwarePixelBuffer * mBuffer
virtual void copyContentsToMemory(const PixelBox &dst, FrameBuffer buffer)
Copies the current contents of the render target to a pixelbox.
RenderTexture(HardwarePixelBuffer *buffer, uint32 zoffset)
PixelFormat suggestPixelFormat() const
Suggests a pixel format to use for extracting the data in this target, when calling copyContentsToMem...
Reference-counted shared pointer, used for objects where implicit destruction is required.
PixelFormat
The pixel format used for images, textures, and render surfaces.
@ PF_UNKNOWN
Unknown pixel format.