28 #ifndef __RenderTexture_H__
29 #define __RenderTexture_H__
85 for (
size_t i = mBoundSurfaces.size(); i <= attachment; ++i)
87 mBoundSurfaces.push_back(0);
89 mBoundSurfaces[attachment] = target;
91 bindSurfaceImpl(attachment, target);
101 if (attachment < mBoundSurfaces.size())
102 mBoundSurfaces[attachment] = 0;
103 unbindSurfaceImpl(attachment);
109 virtual void copyContentsToMemory(
const PixelBox &dst, FrameBuffer buffer);
121 assert (index < mBoundSurfaces.size());
122 return mBoundSurfaces[index];
130 virtual void bindSurfaceImpl(
size_t attachment,
RenderTexture *target) = 0;
132 virtual void unbindSurfaceImpl(
size_t attachment) = 0;
A 'canvas' which can receive the results of a rendering operation.
This class represents a RenderTarget that renders to a Texture.
const BoundSufaceList & getBoundSurfaceList() const
Get a list of the surfaces which have been bound.
RenderTexture * getBoundSurface(size_t index)
Get a pointer to a bound surface.
BoundSufaceList mBoundSurfaces
This class represents a render target that renders to multiple RenderTextures at once.
virtual void bindSurface(size_t attachment, RenderTexture *target)
Bind a surface to a certain attachment point.
PixelFormat
The pixel format used for images, textures, and render surfaces.
HardwarePixelBuffer * mBuffer
virtual void unbindSurface(size_t attachment)
Unbind attachment.
Specialisation of HardwareBuffer for a pixel buffer.
vector< RenderTexture * >::type BoundSufaceList
A primitive describing a volume (3D), image (2D) or line (1D) of pixels in memory.
PixelFormat suggestPixelFormat() const
Irrelevant implementation since cannot copy.