mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Updated the C and .Net bindings according to the previous modifications
This commit is contained in:
parent
10ebd94ee7
commit
6676d77ea1
@ -202,13 +202,5 @@ CSFML_API void sfRenderImage_ConvertCoords(const sfRenderImage* renderImage, uns
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
CSFML_API const sfImage* sfRenderImage_GetImage(const sfRenderImage* renderImage);
|
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
|
#endif // SFML_RENDERIMAGE_H
|
||||||
|
@ -246,12 +246,3 @@ const sfImage* sfRenderImage_GetImage(const sfRenderImage* renderImage)
|
|||||||
|
|
||||||
return renderImage->Target;
|
return renderImage->Target;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
/// Check whether the system supports render images or not
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
sfBool sfRenderImage_IsAvailable(void)
|
|
||||||
{
|
|
||||||
return sf::RenderImage::IsAvailable() ? sfTrue : sfFalse;
|
|
||||||
}
|
|
||||||
|
@ -13,10 +13,8 @@ namespace opengl
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
static void Main()
|
static void Main()
|
||||||
{
|
{
|
||||||
string path = System.IO.Directory.GetCurrentDirectory();
|
|
||||||
|
|
||||||
// Create main window
|
// 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
|
// Setup event handlers
|
||||||
window.Closed += new EventHandler(OnClosed);
|
window.Closed += new EventHandler(OnClosed);
|
||||||
|
@ -15,7 +15,7 @@ Module OpenGL
|
|||||||
Sub Main()
|
Sub Main()
|
||||||
|
|
||||||
' Create main window
|
' 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
|
' Create a sprite for the background
|
||||||
Dim backgroundImage = New Image("resources/background.jpg")
|
Dim backgroundImage = New Image("resources/background.jpg")
|
||||||
|
@ -13,7 +13,7 @@ namespace window
|
|||||||
static void Main()
|
static void Main()
|
||||||
{
|
{
|
||||||
// Create the main window
|
// 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
|
// Setup event handlers
|
||||||
window.Closed += new EventHandler(OnClosed);
|
window.Closed += new EventHandler(OnClosed);
|
||||||
|
@ -242,16 +242,6 @@ namespace SFML
|
|||||||
get {return myImage;}
|
get {return myImage;}
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
/// <summary>
|
|
||||||
/// Tell whether or not the system supports render images
|
|
||||||
/// </summary>
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
public static bool IsAvailable
|
|
||||||
{
|
|
||||||
get {return sfRenderImage_IsAvailable();}
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provide a string describing the object
|
/// Provide a string describing the object
|
||||||
@ -340,9 +330,6 @@ namespace SFML
|
|||||||
[DllImport("csfml-graphics-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
[DllImport("csfml-graphics-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
static extern IntPtr sfRenderImage_GetImage(IntPtr This);
|
static extern IntPtr sfRenderImage_GetImage(IntPtr This);
|
||||||
|
|
||||||
[DllImport("csfml-graphics-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
|
||||||
static extern bool sfRenderImage_IsAvailable();
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ namespace SFML
|
|||||||
/// <param name="title">Title of the window</param>
|
/// <param name="title">Title of the window</param>
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
public RenderWindow(VideoMode mode, string title) :
|
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
|
|||||||
/// <param name="style">Window style (Resize | Close by default)</param>
|
/// <param name="style">Window style (Resize | Close by default)</param>
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
public RenderWindow(VideoMode mode, string title, Styles style) :
|
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
|
|||||||
/// <param name="handle">Platform-specific handle of the control</param>
|
/// <param name="handle">Platform-specific handle of the control</param>
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
public RenderWindow(IntPtr handle) :
|
public RenderWindow(IntPtr handle) :
|
||||||
this(handle, new ContextSettings(24, 8))
|
this(handle, new ContextSettings(0, 0))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ namespace SFML
|
|||||||
/// <param name="title">Title of the window</param>
|
/// <param name="title">Title of the window</param>
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
public Window(VideoMode mode, string title) :
|
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
|
|||||||
/// <param name="style">Window style (Resize | Close by default)</param>
|
/// <param name="style">Window style (Resize | Close by default)</param>
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
public Window(VideoMode mode, string title, Styles style) :
|
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
|
|||||||
/// <param name="handle">Platform-specific handle of the control</param>
|
/// <param name="handle">Platform-specific handle of the control</param>
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
public Window(IntPtr handle) :
|
public Window(IntPtr handle) :
|
||||||
this(handle, new ContextSettings(24, 8))
|
this(handle, new ContextSettings(0, 0))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
// Create the main window
|
// 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
|
// Create a sprite for the background
|
||||||
sf::Image backgroundImage;
|
sf::Image backgroundImage;
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
// Create the main window
|
// 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
|
// Create a clock for measuring the time elapsed
|
||||||
sf::Clock clock;
|
sf::Clock clock;
|
||||||
|
Loading…
Reference in New Issue
Block a user