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 - mitrious

Pages: [1]
1
Graphics / Re: Shapes problem
« on: September 23, 2012, 04:00:54 am »
Thanks, I thought the version I had was the latest, I didn't they had a new one yet, thx mate

2
Graphics / Re: Shapes problem
« on: September 23, 2012, 12:28:09 am »
How can I recompile it to run on VS2012 ? Since CMake won't gimme that option? - sorry for not mentioning it, my fault

3
General / Threads and Drawing
« on: September 23, 2012, 12:21:44 am »
Well, I'm creating a 2D game and using SFML, I've been wondering if it's worth dividing the logic and window handling of the game. Like this: putting the drawing and updating the window logic into one thread and the game logic in the main thread, making they work kinda together. I made a test to see if I could get it done and it seems like I can, at least I was drawing in one screen and updating logic on the other, but I didn't care so much about the FPS of both, I have an idea of how to do this, so I think it would work.

Anyways, is this a good idea?

4
Graphics / Re: Shapes problem
« on: September 21, 2012, 01:46:13 am »
Well I was using visual studio 2012, I just thought about changing because I hadn't had any problems so far, but it turns out that was it, it works perfectly in VS2010, thx

5
Graphics / Re: Shapes problem
« on: September 20, 2012, 03:49:38 pm »
Thank you, but I'm actually using it in Visual Studio and I did not compile it myself actually, I've downloaded it and am using the version that came with it. And as for the debug/release linking, I've just double checked it and it's not it. I will try to compile SFML myself and see if it stops, thanks

6
Graphics / Re: Shapes problem
« on: September 20, 2012, 03:26:27 pm »
I will re-edit the post with one simple class, in which I was able to produce the same crash.


7
Graphics / Re: Shapes problem
« on: September 20, 2012, 02:58:35 pm »
Sorry, but you really aren't really reading nor the code nor the comments, plus you're not really helping, the error only occurs in my engine, that's why I'm not posting it as a bug question, but rather as a question only.

if you read the game class there's a method there with a comment saying exactly what it does, that I call in initialize to pass the window object to the drawingManager object in the initialize method, you're just not paying any attention, I commented on the side of each method in the drawing manager saying EXACTLY what it does in order not to make the post even longer.

8
Graphics / Re: Shapes problem
« on: September 20, 2012, 02:28:22 pm »
I will just now edit my post with a full way to reproduce the error and a way to avoid it as well

9
Graphics / Re: Shapes problem
« on: September 20, 2012, 02:21:20 pm »
Actually I explained what I was doing, I just thought anyone could think about a derived class with only one pointer, one call to new and one call to delete. Sorry if I misjudged it, anyways I don't have to use a raw pointer or anything, I just wanna know what's wrong, I don't think something like that should be happening, so posted it here.

10
Graphics / Re: Shapes problem
« on: September 20, 2012, 01:47:48 pm »
Sorry but you didn't pay much attention to what I wrote, I'm saying that's my base class, if you need something else to go with I will have a, let's say, TestGame class deriving from game which will have a private field, let's call it, shape of the type sf::CircleShape* and we will call new on it on the initialize method (override it from the base class) and then we will delete it on the destructor of the TestGame class

11
Graphics / Shapes problem
« on: September 20, 2012, 01:20:10 pm »
Consider this simple class and main:

class Foo
{
public:
        Foo() { shape = new sf::CircleShape(100); }
        ~Foo() { delete shape; }
private:
        sf::CircleShape *shape;
};


int main(int argc, char **argv)
{

        Foo f;
        return 0;
}

If I run it it'll crash when trying to free memory allocated for shape when it's being deleted, on the destructor's call. If anyone could try to compile this simple code and see if it crashes it'd be much appreciated.

Pages: [1]
anything