Updated the API documentation of RenderTarget, RenderImage and RenderWindow
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1413 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
fd10d2abfe
commit
0aaebddc7b
5 changed files with 331 additions and 139 deletions
|
@ -34,8 +34,6 @@
|
|||
namespace sf
|
||||
{
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Default constructor
|
||||
////////////////////////////////////////////////////////////
|
||||
RenderImage::RenderImage() :
|
||||
myRenderImage(NULL)
|
||||
{
|
||||
|
@ -43,8 +41,6 @@ myRenderImage(NULL)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Destructor
|
||||
////////////////////////////////////////////////////////////
|
||||
RenderImage::~RenderImage()
|
||||
{
|
||||
|
@ -52,8 +48,6 @@ RenderImage::~RenderImage()
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Create the render image from its dimensions
|
||||
////////////////////////////////////////////////////////////
|
||||
bool RenderImage::Create(unsigned int width, unsigned int height, bool depthBuffer)
|
||||
{
|
||||
|
@ -98,8 +92,6 @@ bool RenderImage::Create(unsigned int width, unsigned int height, bool depthBuff
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Enable or disable image smoothing filter
|
||||
////////////////////////////////////////////////////////////
|
||||
void RenderImage::SetSmooth(bool smooth)
|
||||
{
|
||||
|
@ -107,8 +99,6 @@ void RenderImage::SetSmooth(bool smooth)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Tells whether the smooth filtering is enabled or not
|
||||
////////////////////////////////////////////////////////////
|
||||
bool RenderImage::IsSmooth() const
|
||||
{
|
||||
|
@ -116,9 +106,6 @@ bool RenderImage::IsSmooth() const
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Activate of deactivate the render-image as the current target
|
||||
/// for rendering
|
||||
////////////////////////////////////////////////////////////
|
||||
bool RenderImage::SetActive(bool active)
|
||||
{
|
||||
|
@ -126,8 +113,6 @@ bool RenderImage::SetActive(bool active)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Update the contents of the target
|
||||
////////////////////////////////////////////////////////////
|
||||
void RenderImage::Display()
|
||||
{
|
||||
|
@ -143,8 +128,6 @@ void RenderImage::Display()
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the width of the rendering region of the image
|
||||
////////////////////////////////////////////////////////////
|
||||
unsigned int RenderImage::GetWidth() const
|
||||
{
|
||||
|
@ -152,8 +135,6 @@ unsigned int RenderImage::GetWidth() const
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the height of the rendering region of the image
|
||||
////////////////////////////////////////////////////////////
|
||||
unsigned int RenderImage::GetHeight() const
|
||||
{
|
||||
|
@ -161,8 +142,6 @@ unsigned int RenderImage::GetHeight() const
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the target image
|
||||
////////////////////////////////////////////////////////////
|
||||
const Image& RenderImage::GetImage() const
|
||||
{
|
||||
|
@ -170,8 +149,6 @@ const Image& RenderImage::GetImage() const
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Check whether the system supports render images or not
|
||||
////////////////////////////////////////////////////////////
|
||||
bool RenderImage::IsAvailable()
|
||||
{
|
||||
|
@ -180,8 +157,6 @@ bool RenderImage::IsAvailable()
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Activate / deactivate the render image for rendering
|
||||
////////////////////////////////////////////////////////////
|
||||
bool RenderImage::Activate(bool active)
|
||||
{
|
||||
|
|
|
@ -37,8 +37,6 @@
|
|||
namespace sf
|
||||
{
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Default constructor
|
||||
////////////////////////////////////////////////////////////
|
||||
RenderTarget::RenderTarget() :
|
||||
myRenderer (*this),
|
||||
myStatesSaved (false),
|
||||
|
@ -48,8 +46,6 @@ myViewHasChanged(false)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Destructor
|
||||
////////////////////////////////////////////////////////////
|
||||
RenderTarget::~RenderTarget()
|
||||
{
|
||||
|
@ -57,8 +53,6 @@ RenderTarget::~RenderTarget()
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Clear the entire target with a single color
|
||||
////////////////////////////////////////////////////////////
|
||||
void RenderTarget::Clear(const Color& color)
|
||||
{
|
||||
|
@ -67,8 +61,6 @@ void RenderTarget::Clear(const Color& color)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Draw something on the window
|
||||
////////////////////////////////////////////////////////////
|
||||
void RenderTarget::Draw(const Drawable& object)
|
||||
{
|
||||
|
@ -99,8 +91,6 @@ void RenderTarget::Draw(const Drawable& object)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Draw something into the target with a shader
|
||||
////////////////////////////////////////////////////////////
|
||||
void RenderTarget::Draw(const Drawable& object, const Shader& shader)
|
||||
{
|
||||
|
@ -131,19 +121,15 @@ void RenderTarget::Draw(const Drawable& object, const Shader& shader)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Change the current active view
|
||||
////////////////////////////////////////////////////////////
|
||||
void RenderTarget::SetView(const View& view)
|
||||
{
|
||||
// Save it
|
||||
// Save it for later use
|
||||
myCurrentView = view;
|
||||
myViewHasChanged = true;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the current view
|
||||
////////////////////////////////////////////////////////////
|
||||
const View& RenderTarget::GetView() const
|
||||
{
|
||||
|
@ -151,8 +137,6 @@ const View& RenderTarget::GetView() const
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the default view of the window
|
||||
////////////////////////////////////////////////////////////
|
||||
const View& RenderTarget::GetDefaultView() const
|
||||
{
|
||||
|
@ -160,8 +144,6 @@ const View& RenderTarget::GetDefaultView() const
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the viewport of a view applied to this target
|
||||
////////////////////////////////////////////////////////////
|
||||
IntRect RenderTarget::GetViewport(const View& view) const
|
||||
{
|
||||
|
@ -176,9 +158,6 @@ IntRect RenderTarget::GetViewport(const View& view) const
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Convert a point in window coordinates into view coordinates
|
||||
/// This version uses the current view of the window
|
||||
////////////////////////////////////////////////////////////
|
||||
Vector2f RenderTarget::ConvertCoords(unsigned int x, unsigned int y) const
|
||||
{
|
||||
|
@ -186,9 +165,6 @@ Vector2f RenderTarget::ConvertCoords(unsigned int x, unsigned int y) const
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Convert a point in window coordinates into view coordinates
|
||||
/// This version uses the given view
|
||||
////////////////////////////////////////////////////////////
|
||||
Vector2f RenderTarget::ConvertCoords(unsigned int x, unsigned int y, const View& view) const
|
||||
{
|
||||
|
@ -203,8 +179,6 @@ Vector2f RenderTarget::ConvertCoords(unsigned int x, unsigned int y, const View&
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Save the current OpenGL render states and matrices
|
||||
////////////////////////////////////////////////////////////
|
||||
void RenderTarget::SaveGLStates()
|
||||
{
|
||||
|
@ -220,8 +194,6 @@ void RenderTarget::SaveGLStates()
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Restore the previously saved OpenGL render states and matrices
|
||||
////////////////////////////////////////////////////////////
|
||||
void RenderTarget::RestoreGLStates()
|
||||
{
|
||||
|
@ -236,8 +208,6 @@ void RenderTarget::RestoreGLStates()
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Called by the derived class when it's ready to be initialized
|
||||
////////////////////////////////////////////////////////////
|
||||
void RenderTarget::Initialize()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue