Public Member Functions | Protected Member Functions | List of all members
sf::RenderTarget Class Referenceabstract

Base class for all render targets (window, image, ...) More...

#include <RenderTarget.hpp>

Inheritance diagram for sf::RenderTarget:
sf::RenderWindow

Public Member Functions

virtual ~RenderTarget ()
 Destructor. More...
 
void Clear (const Color &FillColor=Color(0, 0, 0))
 Clear the entire target with a single color. More...
 
virtual void Draw (const Drawable &Object)
 Draw something into the target. More...
 
virtual unsigned int GetWidth () const =0
 Get the width of the rendering region of the target. More...
 
virtual unsigned int GetHeight () const =0
 Get the height of the rendering region of the target. More...
 
void SetView (const View &NewView)
 Change the current active view. More...
 
const ViewGetView () const
 Get the current view. More...
 
ViewGetDefaultView ()
 Get the default view of the window for read / write. More...
 
void PreserveOpenGLStates (bool Preserve)
 Tell SFML to preserve external OpenGL states, at the expense of more CPU charge. More...
 

Protected Member Functions

 RenderTarget ()
 Default constructor. More...
 
void Initialize ()
 Called by the derived class when it's ready to be initialized. More...
 

Detailed Description

Base class for all render targets (window, image, ...)

Definition at line 43 of file RenderTarget.hpp.

Constructor & Destructor Documentation

sf::RenderTarget::~RenderTarget ( )
virtual

Destructor.

Definition at line 51 of file RenderTarget.cpp.

sf::RenderTarget::RenderTarget ( )
protected

Default constructor.

Definition at line 39 of file RenderTarget.cpp.

Member Function Documentation

void sf::RenderTarget::Clear ( const Color FillColor = Color(0, 0, 0))

Clear the entire target with a single color.

Parameters
FillColor: Color to use to clear the render target

Definition at line 60 of file RenderTarget.cpp.

void sf::RenderTarget::Draw ( const Drawable Object)
virtual

Draw something into the target.

Draw something on the window.

Parameters
Object: Object to draw

Definition at line 76 of file RenderTarget.cpp.

View & sf::RenderTarget::GetDefaultView ( )

Get the default view of the window for read / write.

Returns
Default view

Definition at line 147 of file RenderTarget.cpp.

virtual unsigned int sf::RenderTarget::GetHeight ( ) const
pure virtual

Get the height of the rendering region of the target.

Returns
Height in pixels

Implemented in sf::RenderWindow.

const View & sf::RenderTarget::GetView ( ) const

Get the current view.

Returns
Current view active in the window

Definition at line 138 of file RenderTarget.cpp.

virtual unsigned int sf::RenderTarget::GetWidth ( ) const
pure virtual

Get the width of the rendering region of the target.

Returns
Width in pixels

Implemented in sf::RenderWindow.

void sf::RenderTarget::Initialize ( )
protected

Called by the derived class when it's ready to be initialized.

Definition at line 170 of file RenderTarget.cpp.

void sf::RenderTarget::PreserveOpenGLStates ( bool  Preserve)

Tell SFML to preserve external OpenGL states, at the expense of more CPU charge.

Use this function if you don't want SFML to mess up your own OpenGL states (if any). Don't enable state preservation if not needed, as it will allow SFML to do internal optimizations and improve performances. This parameter is false by default

Parameters
Preserve: True to preserve OpenGL states, false to let SFML optimize

Use this function if you don't want SFML to mess up your own OpenGL states (if any). Don't enable state preservation if not needed, as it will allow SFML to do internal optimizations and improve performances. This parameter is false by default

Definition at line 161 of file RenderTarget.cpp.

void sf::RenderTarget::SetView ( const View NewView)

Change the current active view.

Parameters
NewView: New view to use (pass GetDefaultView() to set the default view)

Definition at line 129 of file RenderTarget.cpp.


The documentation for this class was generated from the following files: