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

Pages: [1]
1
General / Re: Stutter Occurs In Application
« on: March 17, 2021, 08:34:35 pm »
Sorry for the bump, but does anyone else have an idea on how to solve this issue by chance? 

2
General / Re: Stutter Occurs In Application
« on: March 13, 2021, 08:21:42 pm »
Yeah, that is something else I have tried but forgot to mention, on or off doesn't seem to make a difference, it is left as off for now though.

3
General / Stutter Occurs In Application
« on: March 13, 2021, 07:53:48 am »
Hello SFML community,

I've had an annoying bug in my program since I began it months ago.  So, my program randomly "stutters", below is a video demonstrating what I mean:

http://streamable.com/9ajq63

Here is my source code, that validates the issue:

#include <SFML/Graphics.hpp>

// This is for multi-graphics cards in a laptop, bug happens with or without this
#ifdef _WIN32
extern "C" {
__declspec(dllexport) unsigned long NvOptimusEnablement = 0x00000001;
__declspec(
                dllexport) unsigned int AmdPowerXpressRequestHighPerformance = 0x1;
}
#endif

int main () {
        sf::ContextSettings settings;
        settings.antialiasingLevel = 0;

        sf::RenderWindow renderWindow(
                        { 2560, 1440 },
                        "FunTitleForForum",
                        sf::Style::Default,
                        settings
        );
        renderWindow.setVerticalSyncEnabled( true );

        sf::Texture textureTEMP;
        textureTEMP.loadFromFile("../Source/TextureManager/TileMap/atlas_48x.png" );

        sf::Sprite spriteTEMP { textureTEMP };

        sf::View gameView;
        gameView.setSize( renderWindow.getDefaultView().getSize());

        renderWindow.setView( gameView );

        sf::Event event {};
        while ( renderWindow.isOpen()) {

                while ( renderWindow.pollEvent( event )) {
                        if ( event.type == sf::Event::Closed ) {
                                renderWindow.close();
                        }
                }
                if ( sf::Keyboard::isKeyPressed( sf::Keyboard::D )) {
                        gameView.move( 10, 0 );
                } else if ( sf::Keyboard::isKeyPressed( sf::Keyboard::A )) {
                        gameView.move( -10, 0 );
                }

                renderWindow.clear();
                renderWindow.setView( gameView );
                renderWindow.draw( spriteTEMP );
                renderWindow.display();

        }
        return 0;
}

 

Here is what I have tried (not in any order):
    Set all textures to smooth
    Implement timestep manually
    Use kairos timestep library
    Making sure compiler version and sfml version match
    Rebuilding sfml
    Statically linking sfml instead of dynamically linking

One note is that I have a 144hz screen output, and if you need any more additional info please let me know!

Pages: [1]
anything