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

Pages: [1]
1
General / Custom cursor has low fps
« on: March 05, 2009, 04:11:05 pm »
I was searching this forum for a while but still didn't find answer to this question. I made simple program that has custom cursor(sprite moved to mouse position every frame) and when i move mouse it laggs(refreshes slowly). What am I doing wrong?

Code: [Select]

#include "SFML/Graphics.hpp"


int main(int charc, char* argv[])
{
    sf::RenderWindow screen(sf::VideoMode(800, 600, 32), "asd");
    sf::Event event;

    screen.SetFramerateLimit(60);
    screen.ShowMouseCursor(false);

    sf::Sprite cur;
    cur.SetScale(10.f, 10.f);
    cur.SetColor(sf::Color::Red);

    while (screen.IsOpened())
    {
        while (screen.GetEvent(event))
        {
            if (event.Type == sf::Event::Closed) screen.Close();
        }
        cur.SetPosition(screen.GetInput().GetMouseX(), screen.GetInput().GetMouseY() );

        screen.Clear(sf::Color::Black);

        screen.Draw(cur);

        screen.Display();
    }


    return 0;
}

2
General discussions / Problems with 1.4
« on: February 25, 2009, 03:23:48 pm »
yes, MOMO Wheel. Now i unpluged it and now it works...why it is that?

3
General discussions / Problems with 1.4
« on: February 25, 2009, 01:41:34 pm »
I have just returned to work on my project, when i saw 1.4 version of sfml availible. So I downloaded it and set up with tutorial, but when i tried to check how it works i used sf::RenderWindow tutorial. Compiles, so far so good, then i picked up dll's and tried to launch it, but screen is not opening... What is wrong?

here is link to programm
http://www.box.net/shared/nighj1n4hr

Pages: [1]