Renamed Window::UseVerticalSync to EnableVerticalSync

Renamed Shape::Get/SetOutlineWidth to Get/SetOutlineThickness

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1767 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2011-01-02 22:23:12 +00:00
parent 3cf2281988
commit f4fa8b1fbc
25 changed files with 72 additions and 72 deletions

View File

@ -141,7 +141,7 @@ CSFML_API sfBool sfRenderWindow_WaitEvent(sfRenderWindow* renderWindow, sfEvent*
/// \param enabled : sfTrue to enable v-sync, sfFalse to deactivate /// \param enabled : sfTrue to enable v-sync, sfFalse to deactivate
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_API void sfRenderWindow_UseVerticalSync(sfRenderWindow* renderWindow, sfBool enabled); CSFML_API void sfRenderWindow_EnableVerticalSync(sfRenderWindow* renderWindow, sfBool enabled);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// Show or hide the mouse cursor on a window /// Show or hide the mouse cursor on a window

View File

@ -49,7 +49,7 @@ CSFML_API sfShape* sfShape_Create(void);
/// \param p2x, p2y : Position second point /// \param p2x, p2y : Position second point
/// \param thickness : Line thickness /// \param thickness : Line thickness
/// \param color : Color used to draw the line /// \param color : Color used to draw the line
/// \param outline : Outline width /// \param outline : Outline thickness
/// \param outlineColor : Color used to draw the outline /// \param outlineColor : Color used to draw the outline
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@ -61,7 +61,7 @@ CSFML_API sfShape* sfShape_CreateLine(float p1x, float p1y, float p2x, float p2y
/// \param left, top : Top-left corner of the rectangle /// \param left, top : Top-left corner of the rectangle
/// \param width, height : Size of the rectangle /// \param width, height : Size of the rectangle
/// \param color : Color used to fill the rectangle /// \param color : Color used to fill the rectangle
/// \param outline : Outline width /// \param outline : Outline thickness
/// \param outlineColor : Color used to draw the outline /// \param outlineColor : Color used to draw the outline
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@ -73,7 +73,7 @@ CSFML_API sfShape* sfShape_CreateRectangle(float left, float top, float width, f
/// \param x, y : Position of the center /// \param x, y : Position of the center
/// \param radius : Radius /// \param radius : Radius
/// \param color : Color used to fill the circle /// \param color : Color used to fill the circle
/// \param outline : Outline width /// \param outline : Outline thickness
/// \param outlineColor : Color used to draw the outline /// \param outlineColor : Color used to draw the outline
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@ -368,23 +368,23 @@ CSFML_API void sfShape_EnableFill(sfShape* shape, sfBool enable);
CSFML_API void sfShape_EnableOutline(sfShape* shape, sfBool enable); CSFML_API void sfShape_EnableOutline(sfShape* shape, sfBool enable);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// Change the width of a shape outline /// Change the thickness of a shape outline
/// ///
/// \param shape : Shape to modify /// \param shape : Shape to modify
/// \param width : New width /// \param thickness : New thickness
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_API void sfShape_SetOutlineWidth(sfShape* shape, float width); CSFML_API void sfShape_SetOutlineThickness(sfShape* shape, float thickness);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// Get the width of a shape outline /// Get the thickness of a shape outline
/// ///
/// \param shape : Shape to read /// \param shape : Shape to read
/// ///
/// \param return Current outline width /// \param return Current outline thickness
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_API float sfShape_GetOutlineWidth(const sfShape* shape); CSFML_API float sfShape_GetOutlineThickness(const sfShape* shape);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// Get the number of points composing a shape /// Get the number of points composing a shape

View File

@ -166,7 +166,7 @@ CSFML_API sfBool sfWindow_WaitEvent(sfWindow* window, sfEvent* event);
/// \param enabled : sfTrue to enable v-sync, sfFalse to deactivate /// \param enabled : sfTrue to enable v-sync, sfFalse to deactivate
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_API void sfWindow_UseVerticalSync(sfWindow* window, sfBool enabled); CSFML_API void sfWindow_EnableVerticalSync(sfWindow* window, sfBool enabled);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// Show or hide the mouse cursor on a window /// Show or hide the mouse cursor on a window

View File

@ -204,9 +204,9 @@ sfBool sfRenderWindow_WaitEvent(sfRenderWindow* renderWindow, sfEvent* event)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// Enable / disable vertical synchronization on a window /// Enable / disable vertical synchronization on a window
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void sfRenderWindow_UseVerticalSync(sfRenderWindow* renderWindow, sfBool enabled) void sfRenderWindow_EnableVerticalSync(sfRenderWindow* renderWindow, sfBool enabled)
{ {
CSFML_CALL(renderWindow, UseVerticalSync(enabled == sfTrue)); CSFML_CALL(renderWindow, EnableVerticalSync(enabled == sfTrue));
} }

View File

@ -368,20 +368,20 @@ void sfShape_EnableOutline(sfShape* shape, sfBool enable)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// Change the width of a shape outline /// Change the thickness of a shape outline
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void sfShape_SetOutlineWidth(sfShape* shape, float width) void sfShape_SetOutlineThickness(sfShape* shape, float thickness)
{ {
CSFML_CALL(shape, SetOutlineWidth(width)) CSFML_CALL(shape, SetOutlineThickness(thickness))
} }
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// Get the width of a shape outline /// Get the thickness of a shape outline
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
float sfShape_GetOutlineWidth(const sfShape* shape) float sfShape_GetOutlineThickness(const sfShape* shape)
{ {
CSFML_CALL_RETURN(shape, GetOutlineWidth(), 0.f) CSFML_CALL_RETURN(shape, GetOutlineThickness(), 0.f)
} }

View File

@ -196,9 +196,9 @@ sfBool sfWindow_WaitEvent(sfWindow* window, sfEvent* event)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// Enable / disable vertical synchronization on a window /// Enable / disable vertical synchronization on a window
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void sfWindow_UseVerticalSync(sfWindow* window, sfBool enabled) void sfWindow_EnableVerticalSync(sfWindow* window, sfBool enabled)
{ {
CSFML_CALL(window, UseVerticalSync(enabled == sfTrue)) CSFML_CALL(window, EnableVerticalSync(enabled == sfTrue))
} }

View File

@ -152,9 +152,9 @@ namespace SFML
/// </summary> /// </summary>
/// <param name="enable">True to enable v-sync, false to deactivate</param> /// <param name="enable">True to enable v-sync, false to deactivate</param>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
public override void UseVerticalSync(bool enable) public override void EnableVerticalSync(bool enable)
{ {
sfRenderWindow_UseVerticalSync(This, enable); sfRenderWindow_EnableVerticalSync(This, enable);
} }
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@ -555,7 +555,7 @@ namespace SFML
static extern ContextSettings sfRenderWindow_GetSettings(IntPtr This); static extern ContextSettings sfRenderWindow_GetSettings(IntPtr This);
[DllImport("csfml-graphics-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] [DllImport("csfml-graphics-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfRenderWindow_UseVerticalSync(IntPtr This, bool Enable); static extern void sfRenderWindow_EnableVerticalSync(IntPtr This, bool Enable);
[DllImport("csfml-graphics-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] [DllImport("csfml-graphics-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfRenderWindow_ShowMouseCursor(IntPtr This, bool Show); static extern void sfRenderWindow_ShowMouseCursor(IntPtr This, bool Show);

View File

@ -186,13 +186,13 @@ namespace SFML
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// <summary> /// <summary>
/// Width of the shape outline /// Thickness of the shape outline
/// </summary> /// </summary>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
public float OutlineWidth public float OutlineThickness
{ {
get {return sfShape_GetOutlineWidth(This);} get {return sfShape_GetOutlineThickness(This);}
set {sfShape_SetOutlineWidth(This, value);} set {sfShape_SetOutlineThickness(This, value);}
} }
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@ -385,7 +385,7 @@ namespace SFML
" Origin(" + Origin + ")" + " Origin(" + Origin + ")" +
" Color(" + Color + ")" + " Color(" + Color + ")" +
" BlendMode(" + BlendMode + ")" + " BlendMode(" + BlendMode + ")" +
" OutlineWidth(" + OutlineWidth + ")" + " OutlineThickness(" + OutlineThickness + ")" +
" PointsCount(" + PointsCount + ")"; " PointsCount(" + PointsCount + ")";
} }
@ -533,10 +533,10 @@ namespace SFML
static extern void sfShape_EnableOutline(IntPtr This, bool Enable); static extern void sfShape_EnableOutline(IntPtr This, bool Enable);
[DllImport("csfml-graphics-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] [DllImport("csfml-graphics-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfShape_SetOutlineWidth(IntPtr This, float Width); static extern void sfShape_SetOutlineThickness(IntPtr This, float Thickness);
[DllImport("csfml-graphics-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] [DllImport("csfml-graphics-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern float sfShape_GetOutlineWidth(IntPtr This); static extern float sfShape_GetOutlineThickness(IntPtr This);
[DllImport("csfml-graphics-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] [DllImport("csfml-graphics-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern uint sfShape_GetPointsCount(IntPtr This); static extern uint sfShape_GetPointsCount(IntPtr This);

View File

@ -187,9 +187,9 @@ namespace SFML
/// </summary> /// </summary>
/// <param name="enable">True to enable v-sync, false to deactivate</param> /// <param name="enable">True to enable v-sync, false to deactivate</param>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
public virtual void UseVerticalSync(bool enable) public virtual void EnableVerticalSync(bool enable)
{ {
sfWindow_UseVerticalSync(This, enable); sfWindow_EnableVerticalSync(This, enable);
} }
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@ -618,7 +618,7 @@ namespace SFML
static extern ContextSettings sfWindow_GetSettings(IntPtr This); static extern ContextSettings sfWindow_GetSettings(IntPtr This);
[DllImport("csfml-window-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] [DllImport("csfml-window-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfWindow_UseVerticalSync(IntPtr This, bool Enable); static extern void sfWindow_EnableVerticalSync(IntPtr This, bool Enable);
[DllImport("csfml-window-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] [DllImport("csfml-window-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfWindow_ShowMouseCursor(IntPtr This, bool Show); static extern void sfWindow_ShowMouseCursor(IntPtr This, bool Show);

View File

@ -155,12 +155,12 @@ public :
/// See Scale to add a factor based on the previous scale instead. /// See Scale to add a factor based on the previous scale instead.
/// The default scale of a drawable object is (1, 1). /// The default scale of a drawable object is (1, 1).
/// ///
/// \param scale New scale factors /// \param factors New scale factors
/// ///
/// \see Scale, SetScaleX, SetScaleY, GetScale /// \see Scale, SetScaleX, SetScaleY, GetScale
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void SetScale(const Vector2f& scale); void SetScale(const Vector2f& factors);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Set the X scale factor of the object /// \brief Set the X scale factor of the object

View File

@ -172,12 +172,12 @@ public :
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Change the thickness of the shape outline /// \brief Change the thickness of the shape outline
/// ///
/// \param width New width of the outline /// \param thickness New thickness of the outline
/// ///
/// \see GetOutlineWidth, EnableOutline /// \see GetOutlineThickness, EnableOutline
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void SetOutlineWidth(float width); void SetOutlineThickness(float thickness);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Get the position of a point /// \brief Get the position of a point
@ -230,12 +230,12 @@ public :
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Get the thickness of the shape outline /// \brief Get the thickness of the shape outline
/// ///
/// \return Current outline width /// \return Current outline thickness
/// ///
/// \see SetOutlineWidth /// \see SetOutlineThickness
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
float GetOutlineWidth() const; float GetOutlineThickness() const;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Create a new line /// \brief Create a new line
@ -257,7 +257,7 @@ public :
/// \param p2y Y coordinate of the end point /// \param p2y Y coordinate of the end point
/// \param thickness Thickness of the line /// \param thickness Thickness of the line
/// \param color Color of the shape's points /// \param color Color of the shape's points
/// \param outline Outline width /// \param outline Outline thickness
/// \param outlineColor Outline color of the shape's points /// \param outlineColor Outline color of the shape's points
/// ///
/// \see Rectangle, Circle /// \see Rectangle, Circle
@ -285,7 +285,7 @@ public :
/// \param end End point /// \param end End point
/// \param thickness Thickness of the line /// \param thickness Thickness of the line
/// \param color Color of the shape's points /// \param color Color of the shape's points
/// \param outline Outline width /// \param outline Outline thickness
/// \param outlineColor Outline color of the shape's points /// \param outlineColor Outline color of the shape's points
/// ///
/// \see Rectangle, Circle /// \see Rectangle, Circle
@ -312,7 +312,7 @@ public :
/// \param width Width of the rectangle /// \param width Width of the rectangle
/// \param height Height of the rectangle /// \param height Height of the rectangle
/// \param color Color of the shape's points /// \param color Color of the shape's points
/// \param outline Outline width /// \param outline Outline thickness
/// \param outlineColor Outline color of the shape's points /// \param outlineColor Outline color of the shape's points
/// ///
/// \see Line, Circle /// \see Line, Circle
@ -337,7 +337,7 @@ public :
/// ///
/// \param rectangle Rectangle defining the shape /// \param rectangle Rectangle defining the shape
/// \param color Color of the shape's points /// \param color Color of the shape's points
/// \param outline Outline width /// \param outline Outline thickness
/// \param outlineColor Outline color of the shape's points /// \param outlineColor Outline color of the shape's points
/// ///
/// \see Line, Circle /// \see Line, Circle
@ -363,7 +363,7 @@ public :
/// \param y Y coordinate of the center /// \param y Y coordinate of the center
/// \param radius Radius of the circle /// \param radius Radius of the circle
/// \param color Color of the shape's points /// \param color Color of the shape's points
/// \param outline Outline width /// \param outline Outline thickness
/// \param outlineColor Outline color of the shape's points /// \param outlineColor Outline color of the shape's points
/// ///
/// \see Line, Rectangle /// \see Line, Rectangle
@ -389,7 +389,7 @@ public :
/// \param center Center of the circle /// \param center Center of the circle
/// \param radius Radius of the circle /// \param radius Radius of the circle
/// \param color Color of the shape's points /// \param color Color of the shape's points
/// \param outline Outline width /// \param outline Outline thickness
/// \param outlineColor Outline color of the shape's points /// \param outlineColor Outline color of the shape's points
/// ///
/// \see Line, Rectangle /// \see Line, Rectangle
@ -449,7 +449,7 @@ private :
// Member data // Member data
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
std::vector<Point> myPoints; ///< Points composing the shape std::vector<Point> myPoints; ///< Points composing the shape
float myOutline; ///< Outline width float myOutline; ///< Outline thickness
bool myIsFillEnabled; ///< Should we draw the inside if the shape ? bool myIsFillEnabled; ///< Should we draw the inside if the shape ?
bool myIsOutlineEnabled; ///< Should we draw the outline if the shape ? bool myIsOutlineEnabled; ///< Should we draw the outline if the shape ?
bool myIsCompiled; ///< Compiled state of the shape bool myIsCompiled; ///< Compiled state of the shape
@ -480,7 +480,7 @@ private :
/// \li outline color /// \li outline color
/// ///
/// Shapes have an outline that can be enabled or not. You can /// Shapes have an outline that can be enabled or not. You can
/// control the thickness of the outline with the SetOutlineWidth /// control the thickness of the outline with the SetOutlineThickness
/// function. /// function.
/// ///
/// They also inherits all the functions from sf::Drawable: /// They also inherits all the functions from sf::Drawable:
@ -523,7 +523,7 @@ private :
/// // Enable outline only /// // Enable outline only
/// shape.EnableFill(false); /// shape.EnableFill(false);
/// shape.EnableOutline(true); /// shape.EnableOutline(true);
/// shape.SetOutlineWidth(10); /// shape.SetOutlineThickness(10);
/// ///
/// // Display it /// // Display it
/// window.Draw(shape); // window is a sf::RenderWindow /// window.Draw(shape); // window is a sf::RenderWindow

View File

@ -265,7 +265,7 @@ public :
/// \param enabled True to enable v-sync, false to deactivate /// \param enabled True to enable v-sync, false to deactivate
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void UseVerticalSync(bool enabled); void EnableVerticalSync(bool enabled);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Show or hide the mouse cursor /// \brief Show or hide the mouse cursor

View File

@ -99,10 +99,10 @@ void Drawable::SetScale(float factorX, float factorY)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void Drawable::SetScale(const Vector2f& scale) void Drawable::SetScale(const Vector2f& factors)
{ {
SetScaleX(scale.x); SetScaleX(factors.x);
SetScaleY(scale.y); SetScaleY(factors.y);
} }

View File

@ -112,9 +112,9 @@ void Shape::SetPointOutlineColor(unsigned int index, const Color& color)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void Shape::SetOutlineWidth(float width) void Shape::SetOutlineThickness(float thickness)
{ {
myOutline = width; myOutline = thickness;
} }
@ -140,7 +140,7 @@ const Color& Shape::GetPointOutlineColor(unsigned int index) const
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
float Shape::GetOutlineWidth() const float Shape::GetOutlineThickness() const
{ {
return myOutline; return myOutline;
} }
@ -170,7 +170,7 @@ Shape Shape::Line(const Vector2f& p1, const Vector2f& p2, float thickness, const
shape.AddPoint(p2 - normal, color, outlineColor); shape.AddPoint(p2 - normal, color, outlineColor);
shape.AddPoint(p2 + normal, color, outlineColor); shape.AddPoint(p2 + normal, color, outlineColor);
shape.AddPoint(p1 + normal, color, outlineColor); shape.AddPoint(p1 + normal, color, outlineColor);
shape.SetOutlineWidth(outline); shape.SetOutlineThickness(outline);
// Compile it // Compile it
shape.Compile(); shape.Compile();
@ -188,7 +188,7 @@ Shape Shape::Rectangle(float left, float top, float width, float height, const C
shape.AddPoint(Vector2f(left + width, top), color, outlineColor); shape.AddPoint(Vector2f(left + width, top), color, outlineColor);
shape.AddPoint(Vector2f(left + width, top + height), color, outlineColor); shape.AddPoint(Vector2f(left + width, top + height), color, outlineColor);
shape.AddPoint(Vector2f(left, top + height), color, outlineColor); shape.AddPoint(Vector2f(left, top + height), color, outlineColor);
shape.SetOutlineWidth(outline); shape.SetOutlineThickness(outline);
// Compile it // Compile it
shape.Compile(); shape.Compile();
@ -227,7 +227,7 @@ Shape Shape::Circle(const Vector2f& center, float radius, const Color& color, fl
} }
// Compile it // Compile it
shape.SetOutlineWidth(outline); shape.SetOutlineThickness(outline);
shape.Compile(); shape.Compile();
return shape; return shape;

View File

@ -127,7 +127,7 @@ public :
/// \param enabled True to enable v-sync, false to deactivate /// \param enabled True to enable v-sync, false to deactivate
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void UseVerticalSync(bool enabled) = 0; virtual void EnableVerticalSync(bool enabled) = 0;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Make the current thread's reference context active /// \brief Make the current thread's reference context active

View File

@ -139,7 +139,7 @@ void GlxContext::Display()
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void GlxContext::UseVerticalSync(bool enabled) void GlxContext::EnableVerticalSync(bool enabled)
{ {
const GLubyte* name = reinterpret_cast<const GLubyte*>("glXSwapIntervalSGI"); const GLubyte* name = reinterpret_cast<const GLubyte*>("glXSwapIntervalSGI");
PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalSGI = reinterpret_cast<PFNGLXSWAPINTERVALSGIPROC>(glXGetProcAddress(name)); PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalSGI = reinterpret_cast<PFNGLXSWAPINTERVALSGIPROC>(glXGetProcAddress(name));

View File

@ -96,7 +96,7 @@ public :
/// \param enabled : True to enable v-sync, false to deactivate /// \param enabled : True to enable v-sync, false to deactivate
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void UseVerticalSync(bool enabled); virtual void EnableVerticalSync(bool enabled);
private : private :

View File

@ -104,7 +104,7 @@ public:
/// \param enabled : True to enable v-sync, false to deactivate /// \param enabled : True to enable v-sync, false to deactivate
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void UseVerticalSync(bool enabled); virtual void EnableVerticalSync(bool enabled);
protected: protected:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@ -141,4 +141,4 @@ private:
} // namespace sf } // namespace sf
#endif // SFML_AGLCONTEXT_HPP #endif // SFML_SFCONTEXT_HPP

View File

@ -99,7 +99,7 @@ void SFContext::Display()
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void SFContext::UseVerticalSync(bool enabled) void SFContext::EnableVerticalSync(bool enabled)
{ {
// Make compiler happy // Make compiler happy
#ifdef USE_OS_X_VERSION_10_4 #ifdef USE_OS_X_VERSION_10_4

View File

@ -130,7 +130,7 @@ void WglContext::Display()
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void WglContext::UseVerticalSync(bool enabled) void WglContext::EnableVerticalSync(bool enabled)
{ {
PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = reinterpret_cast<PFNWGLSWAPINTERVALEXTPROC>(wglGetProcAddress("wglSwapIntervalEXT")); PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = reinterpret_cast<PFNWGLSWAPINTERVALEXTPROC>(wglGetProcAddress("wglSwapIntervalEXT"));
if (wglSwapIntervalEXT) if (wglSwapIntervalEXT)

View File

@ -95,7 +95,7 @@ public :
/// \param enabled : True to enable v-sync, false to deactivate /// \param enabled : True to enable v-sync, false to deactivate
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void UseVerticalSync(bool enabled); virtual void EnableVerticalSync(bool enabled);
private : private :

View File

@ -232,10 +232,10 @@ bool Window::WaitEvent(Event& event)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void Window::UseVerticalSync(bool enabled) void Window::EnableVerticalSync(bool enabled)
{ {
if (SetActive()) if (SetActive())
myContext->UseVerticalSync(enabled); myContext->EnableVerticalSync(enabled);
} }
@ -431,8 +431,8 @@ void Window::Initialize()
{ {
// Setup default behaviours (to get a consistent behaviour across different implementations) // Setup default behaviours (to get a consistent behaviour across different implementations)
Show(true); Show(true);
UseVerticalSync(false);
ShowMouseCursor(true); ShowMouseCursor(true);
EnableVerticalSync(false);
EnableKeyRepeat(true); EnableKeyRepeat(true);
// Reset frame time // Reset frame time