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

Pages: [1]
1
DotNet / Re: Window not updateing unless clicked upon.
« on: April 02, 2013, 03:08:45 pm »
clock.ElapsedMilliseconds returns integer, so if the elapsed time is below 1ms, you will apply zero and your objects won't move. Use (float)clock.Elapsed.TotalMilliseconds instead.
Already does, but not in this sample, thanks anyway.

2
DotNet / Re: Window not updateing unless clicked upon.
« on: April 01, 2013, 10:01:38 pm »
Quote
But I'd guess it would still be using camelCase for the latest release or not?
No, SFML.Net uses CamelCase, which is kind of standard in .Net ;)

Quote
Lets hope someone knows.
Your code looks ok. Can you please post a complete (I can copy-paste-compile it) and minimal (nothing unrelated to the problem) example that reproduces the problem?
Well i fixed the issue by setting             window.SetFramerateLimit(30); before while(running)

Do you still want the complete/minimal code sample?

3
DotNet / Re: Window not updateing unless clicked upon.
« on: April 01, 2013, 07:32:42 pm »
Edit: You did realize this is in the DotNet forum?.
Nope I didn't. ;D

But I'd guess it would still be using camelCase for the latest release or not? ???
Sorry I've no idea about the DotNet binding, my bad. ;)

No wonder it was looking mighty odd then :)

Lets hope someone knows.

4
DotNet / Re: Window not updateing unless clicked upon.
« on: April 01, 2013, 06:39:16 pm »
Merely just trying to get it to run and see stuff on the window.

Edit: You did realize this is in the DotNet forum?.

5
DotNet / Window not updateing unless clicked upon.
« on: April 01, 2013, 03:54:07 pm »
Console project, wont update unless dragged.
VS2012,Win8
SFML 2.0RC
   
VideoMode mode = new VideoMode(1024,768);
            RenderWindow window = new RenderWindow(mode, "test", Styles.Default);
            Texture tex = new Texture(new Image("triangle.png"));
            Sprite sprite = new Sprite(tex);
            Stopwatch clock = new Stopwatch();
            SFML.Graphics.View view = new View();
            window.SetView(view);
            clock.Start();
            window.Closed += OnClose;
            Event events;
            Boolean running = true;
            window.SetActive(true);
            //window.
            while (running)
            {
                window.DispatchEvents();
                float time = clock.ElapsedMilliseconds;
                clock.Restart();
                window.Clear(Color.Black);
                s.Tick(time);
                sprite.Position = new Vector2f(s.x, s.y);
                sprite.Rotation = s.heading;
                //view.Center = sprite.Position;
                  window.Draw(sprite);
                window.Display();
            }
        }

Pages: [1]