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

Pages: [1]
1
Feature requests / parameter for nbSegments in Circle()
« on: November 03, 2010, 10:37:25 pm »
(dynamically or otherwise) changing the number of segments according to the radius or the performance is all stuff we can easely implement when there's that extra parameter overload ;)

if implemented correctly in the sfml libs, it's only about 5 more lines of code, and one extra function overload. you can easely do this yourself if you downloaded the sources for smfl and compiled it.

2
Feature requests / parameter for nbSegments in Circle()
« on: November 02, 2010, 08:24:13 pm »
This is a simple one.

When using Circle() to define a shape, it always has 40 segments.
That's good for most circles, but way too much for small circles (slow performance) and way too few for big circles (looks ugly).

Why don't you add an overload for Circle with an extra parameter for the number of segments?

This should not cause any conflicts with existing projects.

3
Window / [bug?] Width & Height become 0 while not focussed.
« on: May 31, 2010, 10:17:39 pm »
In the future there will probably be a Minimized/Deactivated event in SFML, so you could use it to pause your game and not update it when its size is zero.
yeah, i tried it like that with the out of focus events. but that was not enough obviously.

But maybe it would be better to keep the size as well, yes.
that would be good. but don't forget you have a Style.Resize option for when you construct a window.

Thanks for your help.
anytime, i love projects like this.

4
Window / [bug?] Width & Height become 0 while not focussed.
« on: May 31, 2010, 09:14:56 pm »
Quote from: "Laurent"
The size of the window really becomes zero (the window is not visible anymore yet still focused), so it seems logical that SFML reports that.

I admit that it's not really useful, but what problem do you get with that? Maybe I can think about changing this behaviour if you show me one example where it clearly is an issue :)


well, i have this sidescrolling starfield with about 300 stars. the stars wrap around the screen borders (kinda like recycling). so i use something like
if(this.x > program.window.width) {this.x=0;}
after the star has been moved, and then i draw it.

but when the windows is minimized, the stars keep wrapping around a 'window' that is 0px wide. so when i restore the window from the taskbar, all the stars have x==0. all on the left side of the screen.

5
Window / [bug?] Width & Height become 0 while not focussed.
« on: May 31, 2010, 08:05:32 pm »
Quote from: "Laurent"
I couldn't reproduce your problem, your code works fine for me. When the window is out of focus it keeps its size. The size becomes zero only if I minimize the window to the task bar, which is expected.


ah, yes, that's what i meant actually.
why does the size becomes zero when minimized? that doesn't seem logical to me.

6
Window / [bug?] Width & Height become 0 while not focussed.
« on: May 29, 2010, 08:07:16 pm »
Code: [Select]


using System;
using System.Collections;
using SFML;
using SFML.Graphics;
using SFML.Window;

namespace Nereid
{
    static class Bug
    {
        public static RenderWindow App;

        static void Main()
        {

            Styles style = Styles.Close;

            App = new RenderWindow(new VideoMode(1024, 768), "SFML.Net OpenGL", style, new WindowSettings(24, 8, 4));

            while (App.IsOpened())
            {
                App.DispatchEvents();

                App.Clear();

                if (App.Width == 0 && App.Height == 0) { System.Console.WriteLine("Something's not right"); }

                App.Draw(Shape.Rectangle(new Vector2(App.Width - 150, App.Height - 150), new Vector2(App.Width, App.Height), Color.Blue));

                App.Display();
            }

        }
    }
}


7
Window / [bug?] Width & Height become 0 while not focussed.
« on: May 29, 2010, 05:18:47 pm »
at least in v1.6, in the dotnet version, and when using Style.Close. but i suppose this error is everywhere.

While the window is not focussed, the .Width and .Height fields of the RenderWindow are 0, though it is stated that those should be constant.
The fields are restored to the correct values when the window regains focus and .Display() is called.

This makes wrapping moving stuff around the window when it's not focusssed impossible without a workaround.

Pages: [1]