Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Window acting extremely glitchy on Ubuntu  (Read 1135 times)

0 Members and 1 Guest are viewing this topic.

somerandompiggo

  • Newbie
  • *
  • Posts: 3
    • View Profile
Window acting extremely glitchy on Ubuntu
« 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/y0Pb484.png

Tutorial: https://www.sfml-dev.org/tutorials/2.5/graphics-text.php

Code: https://nekobin.com/hepunuwayu

Arcade

  • Full Member
  • ***
  • Posts: 229
    • View Profile
Re: Window acting extremely glitchy on Ubuntu
« Reply #1 on: February 05, 2021, 03:43:42 pm »
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.