28 #ifndef __RenderTarget_H__ 29 #define __RenderTarget_H__ 40 #ifndef OGRE_NUM_RENDERTARGET_GROUPS 41 #define OGRE_NUM_RENDERTARGET_GROUPS 10 42 #define OGRE_DEFAULT_RT_GROUP 4 43 #define OGRE_REND_TO_TEX_RT_GROUP 2 75 SF_TRIANGLE_COUNT = 16,
102 virtual const String& getName(
void)
const;
105 virtual void getMetrics(
unsigned int& width,
unsigned int& height,
unsigned int& colourDepth);
107 virtual uint32 getWidth(
void)
const;
108 virtual uint32 getHeight(
void)
const;
109 virtual uint32 getColourDepth(
void)
const;
118 void setDepthBufferPool(
uint16 poolId );
121 uint16 getDepthBufferPool()
const;
126 virtual bool attachDepthBuffer(
DepthBuffer *depthBuffer );
128 virtual void detachDepthBuffer();
134 virtual void _detachDepthBuffer();
158 virtual void update(
bool swapBuffers =
true);
192 virtual Viewport* addViewport(
Camera* cam,
int ZOrder = 0,
float left = 0.0f,
float top = 0.0f ,
193 float width = 1.0f,
float height = 1.0f);
196 virtual unsigned short getNumViewports(
void)
const;
199 virtual Viewport* getViewport(
unsigned short index);
204 virtual Viewport* getViewportByZOrder(
int ZOrder);
207 virtual bool hasViewportWithZOrder(
int ZOrder);
211 virtual void removeViewport(
int ZOrder);
215 virtual void removeAllViewports(
void);
235 virtual void getStatistics(
float& lastFPS,
float& avgFPS,
236 float& bestFPS,
float& worstFPS)
const;
238 virtual const FrameStats& getStatistics(
void)
const;
242 virtual float getLastFPS()
const;
246 virtual float getAverageFPS()
const;
250 virtual float getBestFPS()
const;
254 virtual float getWorstFPS()
const;
258 virtual float getBestFrameTime()
const;
262 virtual float getWorstFrameTime()
const;
266 virtual void resetStatistics(
void);
277 virtual void getCustomAttribute(
const String& name,
void* pData);
291 virtual void removeAllListeners(
void);
306 virtual bool isActive()
const;
310 virtual void setActive(
bool state );
323 virtual void setAutoUpdated(
bool autoupdate);
327 virtual bool isAutoUpdated(
void)
const;
342 void writeContentsToFile(
const String& filename);
346 virtual String writeContentsToTimestampedFile(
const String& filenamePrefix,
const String& filenameSuffix);
348 virtual bool requiresTextureFlipping()
const = 0;
351 virtual size_t getTriangleCount(
void)
const;
353 virtual size_t getBatchCount(
void)
const;
357 virtual void _notifyCameraRemoved(
const Camera* cam);
365 virtual bool isPrimary(
void)
const;
397 virtual Impl *_getImpl();
422 virtual void _beginUpdate();
433 virtual void _updateViewport(
int zorder,
bool updateStatistics =
true);
443 virtual void _updateViewport(
Viewport* viewport,
bool updateStatistics =
true);
453 virtual void _updateAutoUpdatedViewports(
bool updateStatistics =
true);
461 virtual void _endUpdate();
491 void updateStats(
void);
502 virtual void firePreUpdate(
void);
504 virtual void firePostUpdate(
void);
506 virtual void fireViewportPreUpdate(
Viewport* vp);
508 virtual void fireViewportPostUpdate(
Viewport* vp);
510 virtual void fireViewportAdded(
Viewport* vp);
512 virtual void fireViewportRemoved(
Viewport* vp);
515 virtual void updateImpl();
A 'canvas' which can receive the results of a rendering operation.
unsigned long bestFrameTime
4 byte pixel format, 1 byte for red, 1 byte for green, 1 byte for blue, and one byte for alpha ...
vector< RenderTargetListener * >::type RenderTargetListenerList
unsigned long mLastSecond
virtual void setPriority(uchar priority)
Sets the priority of this render target in relation to the others.
RenderTargetListenerList mListeners
unsigned char uchar
In order to avoid finger-aches :)
PixelFormat
The pixel format used for images, textures, and render surfaces.
virtual bool isHardwareGammaEnabled() const
Indicates whether on rendering, linear colour space is converted to sRGB gamma colour space...
An abstraction of a viewport, i.e.
DepthBuffer * mDepthBuffer
virtual PixelFormat suggestPixelFormat() const
Suggests a pixel format to use for extracting the data in this target, when calling copyContentsToMem...
An abstract class that contains a depth/stencil buffer.
RenderSystem specific interface for a RenderTarget; this should be subclassed by RenderSystems.
map< int, Viewport * >::type ViewportList
A viewpoint from which the scene will be rendered.
virtual void swapBuffers()
Swaps the frame buffers to display the next frame.
uchar mPriority
The priority of the render target.
ViewportList mViewportList
List of viewports, map on Z-order.
This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info...
virtual const String & getFSAAHint() const
Gets the FSAA hint (.
A interface class defining a listener which can be used to receive notifications of RenderTarget even...
A primitive describing a volume (3D), image (2D) or line (1D) of pixels in memory.
unsigned long worstFrameTime
virtual uchar getPriority() const
Gets the priority of a render target.
uint16 mDepthBufferPoolId
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
virtual uint getFSAA() const
Indicates whether multisampling is performed on rendering and at what level.
String mName
The name of this target.