SFML community forums
Bindings - other languages => DotNet => Topic started by: Aravol on June 25, 2014, 04:58:39 am
-
Trying to string up a basic draw loop, and I suddenly find myself unable to get any draw functions to work properly.
Any attempts to call RenderStates.Default results in a System.AccessViolationException.
Any attempt to call draw with new RenderStates does not crash, but does not display anything to the window.
I've tried with shapes, sprites, and have attempted doing this both synchronously and asynchronously.
I've manually switched out my CSFML libraries to make sure the proper version is being bound.
I've tried this with both x64 and x86.
I've made sure the Texture is loaded (size information is visible in debugger on the Sprite)
I've tried switching between .NET 4.0 and 4.5
All in Visual Studio 2012 on a windows 7.
Any help would be gretly appreciated
The following code is enough to reproduce the issue
// Initialize values Window
= new RenderWindow
( new VideoMode
(800u, 600u
),
"Hello World"); Window
.Closed += (sender, e
) => Window
.Close(); var test
= new Sprite
(new Texture
(@"Content\PlayerTexture.png")); while (Window
.IsOpen) { Window
.DispatchEvents(); Window
.Clear(); test
.Draw(Window, RenderStates
.Default); Window
.Display(); }
-
So, as an update, I've managed to fix the problem by reverting my submodule for the .NET wrappers to the 2.1 Tag. Seems there may be a problem with the head revision
-
If you use the latest master branch of SFML.NET you must also recompile the latest master of SFML and CSFML. There has been changes to blending modes and this is most likely the source of your problem.