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

Pages: [1]
1
Graphics / probably problem with linux nvidia driver
« on: August 27, 2013, 12:32:04 pm »
Hello i have problem with sprite movement which is imho connected with poor nvidia support for linux. When im moving sprite in any direction it looks like every few seconds sprite moves a bit faster and then it moves normally and then again bit faster. It seems like redrawing few frames is skipped. Additionally at the top of screen some tearing can be seen.

In windows any of that issues are not existant. I tried "windows.setFramelimit" and changing position of sprite accordingly to time elapsed in previous frame. Tried also syncing to vblank and moving with constant speed. None of this works. Its additionally a bit strange that when i check time elapsed in previous frame they are almost identical to each other but sprite still moves not smooth.

Im posting to ask other linux users if they have simmillar issues and maybe they solved it somehow. I tried with Ubuntu 12.04,12.10,13.04 and nouveau drivers and closed nvidia drivers. Now im trying with Manjaro linux with compton compositor and nvidia drivers version 325.15.1 its maybe a bit better but still issue is visible.

I cant believe that with all that recent buzz about linux gaming (steam, humble bundle etc.) there are still such stupid, unsolved  problems . To sum it up here is a question:

Is anybody have simmilar problem with stuttering sprite and is anybody solved it ?

2
Graphics / vertical sync does not seems to work (maybe ubuntu problem)
« on: December 28, 2012, 09:46:15 am »
hello all, i have problems with vertical syncing and screen tearing when running my app on PC with Ubuntu 12.10 installed, GPU is nvidia gtx 275 card, drivers are 304.41. I cant get rid  of excessive screen tearing, using window.setVerticalSyncEnabled(true); changes nothing at all. i red that ubuntu have some problems with nvidia drivers so it may be ubuntu issue not sfml but the only place where it happens is my sfml app. Here is minimal code sample, niebo.png resolution is 2048x2048:
#include <SFML/Audio.hpp>
#include <SFML/Graphics.hpp>
#include <sstream>

 int main()
 {
     float czas1;
     float klatki;
     sf::Vector2f vfklatki;
     sf::Vector2i viklatki(0,0);
     sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window",sf::Style::Fullscreen);
     window.setVerticalSyncEnabled(true);
     sf::Clock clock1;
     sf::Texture texture;
     texture.loadFromFile("niebo.png");
     sf::Sprite sprite;
     sprite.setTexture(texture);
     sf::View view;
     view.reset(sf::FloatRect(800,600,800,600));
     window.setView(view);
     sf::Font font;
     font.loadFromFile("FreeMono.ttf");
    while (window.isOpen())
     {
         sf::Event event;
         while (window.pollEvent(event))
         {
             if ((event.type == sf::Event::KeyPressed)&&(event.key.code==sf::Keyboard::Escape))
                 window.close();
         }
         clock1.restart();
         window.clear();
         window.draw(sprite);
         if (sf::Keyboard::isKeyPressed(sf::Keyboard::Left))
            view.move(-1000.0f*czas1,0.0f);
            if (sf::Keyboard::isKeyPressed(sf::Keyboard::Right))
            view.move(1000.0f*czas1,0.0f);
            if (sf::Keyboard::isKeyPressed(sf::Keyboard::Up))
            view.move(0.0f,-1000.0f*czas1);
            if (sf::Keyboard::isKeyPressed(sf::Keyboard::Down))
            view.move(0.0f,1000.0f*czas1);
        window.setView(view);
        vfklatki = window.mapPixelToCoords(viklatki);

        klatki = 1/czas1;

        std::stringstream ss;
        ss << klatki;
        std::string myString = ss.str();
        sf::Text text(myString,font,50);
        text.setPosition(vfklatki);
        window.draw(text);
        window.display();
        sf::Time time1 = clock1.getElapsedTime();
        czas1 = time1.asSeconds();
     }

     return EXIT_SUCCESS;
 }

 

btw, there is no change in documentation about changing convertCoords function to mapPixelToCoords.
 I would be very grateful for confirming or denying if on your Ubuntu installations there is the same issue.

3
System / sf::Vector problem (probably)
« on: October 08, 2012, 09:19:42 pm »
Hello all, im not sure if that problem is connected with SFML but it appears when im using one of SFML classes so maybe ill try to ask here :) First some code:

sf::Vector2f *gridpoints = new sf::Vector2f[15];
sf::Vector2f *bfn = new sf::Vector2f[15];
for (i=0; i<16; i++)
{
 bfn[i].x=sf::Randomizer::Random(-1.0f,1.0f);
 bfn[i].y=sf::Randomizer::Random(-1.0f,1.0f);
}

when i execute this code im getting error:
glibc detected *** malloc(): memory corruption

im using ubuntu precise pangolin but under windows program crashes also but without any error message, i cant see anything wrong in above code and im fairly sure that that fragment of code is a reason for application to crash. Any help will be really appreciated :)

Kuba

Pages: [1]
anything