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

Pages: [1]
1
Feature requests / Fill method for Image ?
« on: June 27, 2016, 06:36:13 pm »
Maybe it's a good idea to add a method to sf::Image which fills the specified region(or whole) image with specified Color ?

2
General / Is my game loop is correct ?
« on: November 27, 2015, 01:20:13 pm »
The code below worked correctly(and even with different framerates) - but I need to know - is everything ok ?(e.g -  order of calling functions or delta time calculation). Is there is some room for improvements ?


       
              Clock clock;
                Time accumulator = Time::Zero;
                Time updateRate = seconds(1.0f / 60.0f);
                Time dt = Time::Zero;
                Time fpsTime = Time::Zero;

                while (m_pWindow->isOpen())
                {
                        ProcessEvents();

                        accumulator += dt;

                        while (accumulator > updateRate)
                        {
                                update_state.DeltaTime = 1.0f / 60.0f;

                                accumulator -= updateRate;

                                Update(update_state);
                        }

                        Render(draw_state);

                        dt = clock.restart();

                        // calculating FPS
                       
                        fpsTime += dt;

                        static unsigned frameCounter = 0;

                        if (fpsTime >= seconds(1.0f)) // calculate FPS only one time per second
                        {
                                m_FPS = frameCounter;
                                fpsTime = Time::Zero;
                                frameCounter = 0;
                        }
                        else
                        {
                                ++frameCounter;
                        }
                }
 

3
General discussions / A few questions to main developers.
« on: March 01, 2015, 09:10:59 am »
Hello, I'm new user of SFML and have few questions..
1. Will SFML internals be rewritten to OpenGL Next(when it is released)?
2. Will SFML get DDS(Direct Draw Format) support for images ?
3. The core API will get changes or it is frozen for backward compatibility forever(like whole C++)?
4. Will basic math routines such as clamp function be implemented or its not "simple" ?

Pages: [1]
anything