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.

Topics - Niall

Pages: [1]
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();

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

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?

General / SFML in Netbeans
« on: January 19, 2011, 04:56:31 pm »
Hey guys, I'm trying to get SFML set up in Netbeans 6.9.1 for Windows. I found this and could follow it to a degree but it's for Linux and things seem to work a bit differently.

Currently I've linked things up as in that blog post and defined the _WIN32 preprocessor token, having a simple setup like this:

Code: [Select]
#define _WIN32
#include <iostream>

using namespace std;

int main() {
    return 0;

Produces these errors: http://pastebin.com/heTw6i18

Does anybody know how to fix this, if it's even possible?

Pages: [1]