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

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.