Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Niall

Pages: [1] 2
1
DotNet / Problems with RenderWindow.Capture()
« on: October 13, 2011, 06:32:54 pm »
Triple post, woo! On a roll!

I don't know if you'll experience the same issue, but it definitely seems to only occur when the window's minimized (possibly when out of focus, but I doubt it). The RenderWindow goes completely black and it messes with the capture function: http://www.fileize.com/files/9f261991/108/SFMLing.zip

This might be a feature, I'm not sure, but yeah.

2
DotNet / Problems with RenderWindow.Capture()
« on: October 12, 2011, 01:36:28 pm »
(Apologies for double post, just in case you miss me editing the previous one)

I've missed a trick here. I was simulating something again the old way to see if I came across any black images, and happened to tab back into it around frame 270. Turns out the renderwindow itself had gone completely black, it wasn't the SaveToFile function at fault. I don't know exactly what had triggered it as I'm making sure to clear the window every step etc etc but yes, working on it. It might only happen when the window's not in focus.

3
DotNet / Problems with RenderWindow.Capture()
« on: October 12, 2011, 12:45:39 pm »
Ah, makes sense. Sorry, I have a limited understanding of memory.

Hm.. by simplifying my program down to show you the issue I seem to have resolved the issue. It still seems to randomly save out black images but I'll try and pinpoint what's causing it and get back to you with an example of it.

As for the dedicated software thing - my simulation's running on a timestep of 0.05 and I can't predict how long it'd take to compute a frame thus I can't take a video and speed it up, it could end up looking a bit laggy if certain portions irregularly take longer to move along.

4
DotNet / Problems with RenderWindow.Capture()
« on: October 10, 2011, 11:15:29 pm »
But if I wait until I save it at the end of the simulation and I need to run it for a significantly long amount of time, the memory leaks get very severe and slow down the simulation. If I save them as I go, I randomly get that black image issue.

5
DotNet / Problems with RenderWindow.Capture()
« on: October 10, 2011, 11:09:21 pm »
Hmm, what would be an alternate method for solving this problem then, without memory leaks? I dunno how I'd approach it if I can't instance it again from an array..

6
DotNet / Problems with RenderWindow.Capture()
« on: October 10, 2011, 08:00:51 pm »
I've been doing some n-body simulation stuff and I've been wanting to capture images every frame so I can put them together into a video later. I'd messaged Laurent after getting some memory leak issues with the Capture() function and he helped me out - calling image.Dispose() once I'd saved it to a file did the trick.

I noticed however, when I was taking hundreds of screenshots, randomly, sometimes for only one and sometimes as a block of 10-20 frames, they were just saving as completely black. Ignored the content of my renderwindow, just.. a black image. It's a reproducable bug but the instances of it saving a black frame seem to be random.

I tried another approach (which actually helps simulation time, so I favour this one), wherein I hold a List<Image>, adding a captured image each frame. Then after however many seconds of simulating I loop through the array and save each Image to the disk, and close the window.
..However, I was running into memory leaks just from images.Add(app.Capture()); so I changed it to:
Code: [Select]
Image img = app.Capture();
images.Add(img);
img.Dispose();


I thought this'd work great, but now when it goes to loop through the images I get an error. "AccessViolationException was unhandled. Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
I looked up the error online and can't seem to find a fix anywhere.

Could anybody help me out a bit? Here's a stripped down example - http://www.fileize.com/files/dea5e894/cc9/SFMLing.zip

7
DotNet / VC# 2010 & SFML.Net
« on: September 29, 2011, 01:34:45 pm »
Ah, didn't realise. I removed the example projects from the solution and managed to build it all successfully! Thanks again (:

8
DotNet / VC# 2010 & SFML.Net
« on: September 28, 2011, 09:44:15 pm »
..Hmm. Apologies for the double-post, but I'm having some trouble with Tao. I've installed Microsoft .NET Framework 1.1 and used the Tao installer and got everything set up, however I'm still getting the "type or namespace name 'Tao' could not be found" errors. I've tried adding references to the opengl project for Tao.OpenGL.dll however that's not helping.

9
DotNet / VC# 2010 & SFML.Net
« on: September 28, 2011, 06:13:44 pm »
Managed to get it working! Thanks Laurent!

Right now I'm using 1.6, but all I have to do now is install Tao and then I'll be able to build SFML 2.

10
DotNet / VC# 2010 & SFML.Net
« on: September 28, 2011, 05:13:42 pm »
Well I've added the dlls from the lib folder from the site into the project references, and I've moved the csfml-audio, csfml-graphics etc into the same folder as my Program.cs and when I run the code provided in the documentation example the first error I get is this:

DllNotFoundException was unhandled
Unable to load 'csfml-graphics': The specified module could not be found.

at the line "RenderWindow app = new RenderWindow(new VideoMode(800, 600), "SFML window");"

Also, I'm not exactly sure how to recompile SFML.net myself, but is it a better idea if the git files are more up to date?

11
DotNet / VC# 2010 & SFML.Net
« on: September 28, 2011, 03:24:31 pm »
Hi guys, I'm completely new to this and I'm having some trouble setting things up in Visual C# 2010.

I've downloaded the SFML.Net package from the SVN and I was under the impression that I was to add references in my project to the dlls in the /lib folder, ie sfml-graphics.dll etc. However this folder's completely empty, the only things I can see are the C bindings and I can't add them as references - including them in my folder's build directory doesn't seem to help much either.
I've tried downloading the old package from the website and setting that up but I couldn't get it to detect the csfml dlls in my project folder.

Would anybody be able to help me.. figure out what I'm doing wrong?

12
General / SFML in Netbeans
« on: February 04, 2011, 10:02:54 am »
I've been doing that the whole time, as well as using the -L... stuff. Is it one or the other?

13
General / SFML in Netbeans
« on: February 03, 2011, 11:03:24 pm »
So if I move the include folder into C:\cygwin\usr\include I can get it showing up in the suggestions for '#include <>'. I moved the lib folder into C:\cygwin\lib\SFML\ but what does this change my command line options to? Still getting nonspecific errors to do with not being able to find -lsfml-system ):

14
General / SFML in Netbeans
« on: January 29, 2011, 01:14:31 am »
Quote from: "Hiura"
Yes that was what I meant. Now I think your current problem is that you haven't install correctly SFML lib files into C:\SFML\Lib.

Hmm, I'm not sure where I could have slipped up - I added C:\SFML\include to the includes, added sfml-system in the libraries and currently my command stands at "-LC:\SFML\lib -lsfml-system" but it's still giving me those errors. I wonder if anyone's ever successfully gotten SFML running in Netbeans before..

15
General / SFML in Netbeans
« on: January 25, 2011, 11:40:26 pm »
Quote from: "Hiura"
I meant the same command line but without the leading «g++». Because I get the same error if I type
Code: [Select]
$g++ g++

Do you mean I should try the -L command without the "g++" preceding it? Doing that produces the "cannot find -lsfml-system" error.

Pages: [1] 2