SFML community forums
Help => Graphics => Topic started by: somerandompiggo on February 05, 2021, 12:20:41 pm
-
I'm new to SFML! Coming from OpenGL to make smaller projects. I was following this tutorial, but when I got it semi-working, it looked like a strobe light:
It kept alternating between the result I actually wanted and this mess. My freind thinks its some kind of memory leak. I have no idea. Just to clarify, I'm new to SFML, but not other graphical APIs like GLFW. Thanks for your help!
Screenshots (it keeps alternating between these): https://i.imgur.com/ROqplyc.png (https://i.imgur.com/ROqplyc.png) | https://i.imgur.com/y0Pb484.png (https://i.imgur.com/y0Pb484.png)
Tutorial: https://www.sfml-dev.org/tutorials/2.5/graphics-text.php (https://www.sfml-dev.org/tutorials/2.5/graphics-text.php)
Code: https://nekobin.com/hepunuwayu (https://nekobin.com/hepunuwayu)
-
Check out the first drawing tutorial at https://www.sfml-dev.org/tutorials/2.5/graphics-draw.php , specifically scroll down to the first box with red text. See if your problem goes away if you move your clear window and draw text code to be inside of the main while loop.