From 6676d77ea17070acaae2da0844e7b957b4ecb916 Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Mon, 4 Apr 2011 23:37:20 +0200 Subject: [PATCH] Updated the C and .Net bindings according to the previous modifications --- bindings/c/include/SFML/Graphics/RenderImage.h | 8 -------- bindings/c/src/SFML/Graphics/RenderImage.cpp | 9 --------- bindings/dotnet/examples/opengl/OpenGL.cs | 4 +--- bindings/dotnet/examples/visualbasic/OpenGL.vb | 2 +- bindings/dotnet/examples/window/Window.cs | 2 +- bindings/dotnet/src/Graphics/RenderImage.cs | 13 ------------- bindings/dotnet/src/Graphics/RenderWindow.cs | 6 +++--- bindings/dotnet/src/Window/Window.cs | 6 +++--- examples/opengl/OpenGL.cpp | 2 +- examples/window/Window.cpp | 2 +- 10 files changed, 11 insertions(+), 43 deletions(-) diff --git a/bindings/c/include/SFML/Graphics/RenderImage.h b/bindings/c/include/SFML/Graphics/RenderImage.h index 638d0eea..afd90e41 100644 --- a/bindings/c/include/SFML/Graphics/RenderImage.h +++ b/bindings/c/include/SFML/Graphics/RenderImage.h @@ -202,13 +202,5 @@ CSFML_API void sfRenderImage_ConvertCoords(const sfRenderImage* renderImage, uns //////////////////////////////////////////////////////////// CSFML_API const sfImage* sfRenderImage_GetImage(const sfRenderImage* renderImage); -//////////////////////////////////////////////////////////// -/// Check whether the system supports render images or not -/// -/// \return sfTrue if the RenderImage class can be used -/// -//////////////////////////////////////////////////////////// -CSFML_API sfBool sfRenderImage_IsAvailable(void); - #endif // SFML_RENDERIMAGE_H diff --git a/bindings/c/src/SFML/Graphics/RenderImage.cpp b/bindings/c/src/SFML/Graphics/RenderImage.cpp index d91fcdf6..92f46d08 100644 --- a/bindings/c/src/SFML/Graphics/RenderImage.cpp +++ b/bindings/c/src/SFML/Graphics/RenderImage.cpp @@ -246,12 +246,3 @@ const sfImage* sfRenderImage_GetImage(const sfRenderImage* renderImage) return renderImage->Target; } - - -//////////////////////////////////////////////////////////// -/// Check whether the system supports render images or not -//////////////////////////////////////////////////////////// -sfBool sfRenderImage_IsAvailable(void) -{ - return sf::RenderImage::IsAvailable() ? sfTrue : sfFalse; -} diff --git a/bindings/dotnet/examples/opengl/OpenGL.cs b/bindings/dotnet/examples/opengl/OpenGL.cs index 4418fdbe..39af5e75 100644 --- a/bindings/dotnet/examples/opengl/OpenGL.cs +++ b/bindings/dotnet/examples/opengl/OpenGL.cs @@ -13,10 +13,8 @@ namespace opengl /// static void Main() { - string path = System.IO.Directory.GetCurrentDirectory(); - // Create main window - RenderWindow window = new RenderWindow(new VideoMode(800, 600), "SFML.Net OpenGL"); + RenderWindow window = new RenderWindow(new VideoMode(800, 600), "SFML.Net OpenGL", Styles.Default, new ContextSettings(32, 0)); // Setup event handlers window.Closed += new EventHandler(OnClosed); diff --git a/bindings/dotnet/examples/visualbasic/OpenGL.vb b/bindings/dotnet/examples/visualbasic/OpenGL.vb index 2a59bc60..d9b73ca4 100644 --- a/bindings/dotnet/examples/visualbasic/OpenGL.vb +++ b/bindings/dotnet/examples/visualbasic/OpenGL.vb @@ -15,7 +15,7 @@ Module OpenGL Sub Main() ' Create main window - window = New RenderWindow(New VideoMode(800, 600), "SFML.Net OpenGL (Visual Basic)") + window = New RenderWindow(New VideoMode(800, 600), "SFML.Net OpenGL (Visual Basic)", Styles.Default, new ContextSettings(32, 0)) ' Create a sprite for the background Dim backgroundImage = New Image("resources/background.jpg") diff --git a/bindings/dotnet/examples/window/Window.cs b/bindings/dotnet/examples/window/Window.cs index f50ead46..2e74dd70 100644 --- a/bindings/dotnet/examples/window/Window.cs +++ b/bindings/dotnet/examples/window/Window.cs @@ -13,7 +13,7 @@ namespace window static void Main() { // Create the main window - Window window = new Window(new VideoMode(640, 480, 32), "SFML.Net Window"); + Window window = new Window(new VideoMode(640, 480, 32), "SFML.Net Window", Styles.Default, new ContextSettings(32, 0)); // Setup event handlers window.Closed += new EventHandler(OnClosed); diff --git a/bindings/dotnet/src/Graphics/RenderImage.cs b/bindings/dotnet/src/Graphics/RenderImage.cs index d53c87db..396725e4 100644 --- a/bindings/dotnet/src/Graphics/RenderImage.cs +++ b/bindings/dotnet/src/Graphics/RenderImage.cs @@ -242,16 +242,6 @@ namespace SFML get {return myImage;} } - //////////////////////////////////////////////////////////// - /// - /// Tell whether or not the system supports render images - /// - //////////////////////////////////////////////////////////// - public static bool IsAvailable - { - get {return sfRenderImage_IsAvailable();} - } - //////////////////////////////////////////////////////////// /// /// Provide a string describing the object @@ -340,9 +330,6 @@ namespace SFML [DllImport("csfml-graphics-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] static extern IntPtr sfRenderImage_GetImage(IntPtr This); - [DllImport("csfml-graphics-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] - static extern bool sfRenderImage_IsAvailable(); - #endregion } } diff --git a/bindings/dotnet/src/Graphics/RenderWindow.cs b/bindings/dotnet/src/Graphics/RenderWindow.cs index 265defe0..b6f63742 100644 --- a/bindings/dotnet/src/Graphics/RenderWindow.cs +++ b/bindings/dotnet/src/Graphics/RenderWindow.cs @@ -25,7 +25,7 @@ namespace SFML /// Title of the window //////////////////////////////////////////////////////////// public RenderWindow(VideoMode mode, string title) : - this(mode, title, Styles.Default, new ContextSettings(24, 8)) + this(mode, title, Styles.Default, new ContextSettings(0, 0)) { } @@ -38,7 +38,7 @@ namespace SFML /// Window style (Resize | Close by default) //////////////////////////////////////////////////////////// public RenderWindow(VideoMode mode, string title, Styles style) : - this(mode, title, style, new ContextSettings(24, 8)) + this(mode, title, style, new ContextSettings(0, 0)) { } @@ -64,7 +64,7 @@ namespace SFML /// Platform-specific handle of the control //////////////////////////////////////////////////////////// public RenderWindow(IntPtr handle) : - this(handle, new ContextSettings(24, 8)) + this(handle, new ContextSettings(0, 0)) { } diff --git a/bindings/dotnet/src/Window/Window.cs b/bindings/dotnet/src/Window/Window.cs index f1a34dcc..b1dbe838 100644 --- a/bindings/dotnet/src/Window/Window.cs +++ b/bindings/dotnet/src/Window/Window.cs @@ -50,7 +50,7 @@ namespace SFML /// Title of the window //////////////////////////////////////////////////////////// public Window(VideoMode mode, string title) : - this(mode, title, Styles.Default, new ContextSettings(24, 8)) + this(mode, title, Styles.Default, new ContextSettings(0, 0)) { } @@ -63,7 +63,7 @@ namespace SFML /// Window style (Resize | Close by default) //////////////////////////////////////////////////////////// public Window(VideoMode mode, string title, Styles style) : - this(mode, title, style, new ContextSettings(24, 8)) + this(mode, title, style, new ContextSettings(0, 0)) { } @@ -89,7 +89,7 @@ namespace SFML /// Platform-specific handle of the control //////////////////////////////////////////////////////////// public Window(IntPtr handle) : - this(handle, new ContextSettings(24, 8)) + this(handle, new ContextSettings(0, 0)) { } diff --git a/examples/opengl/OpenGL.cpp b/examples/opengl/OpenGL.cpp index 50ab1a6e..251bda8e 100644 --- a/examples/opengl/OpenGL.cpp +++ b/examples/opengl/OpenGL.cpp @@ -15,7 +15,7 @@ int main() { // Create the main window - sf::RenderWindow window(sf::VideoMode(800, 600), "SFML OpenGL"); + sf::RenderWindow window(sf::VideoMode(800, 600), "SFML OpenGL", sf::Style::Default, sf::ContextSettings(32)); // Create a sprite for the background sf::Image backgroundImage; diff --git a/examples/window/Window.cpp b/examples/window/Window.cpp index 92c5f605..89a17f17 100644 --- a/examples/window/Window.cpp +++ b/examples/window/Window.cpp @@ -15,7 +15,7 @@ int main() { // Create the main window - sf::Window window(sf::VideoMode(640, 480, 32), "SFML Window"); + sf::Window window(sf::VideoMode(640, 480, 32), "SFML Window", sf::Style::Default, sf::ContextSettings(32)); // Create a clock for measuring the time elapsed sf::Clock clock;