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

Author Topic: Draw function problem.  (Read 1344 times)

0 Members and 1 Guest are viewing this topic.

Wuwus1

  • Newbie
  • *
  • Posts: 4
    • View Profile
Draw function problem.
« on: September 14, 2017, 08:22:45 pm »
First im sorry for my english i know it's not very good but let's go to the topic. I was writing my new game and one day i was trying to start it on my sister's pc. The game was very slow and cpu usage went up to 30% on this particular app. The next day i brought it to school and the same happened cpu usage was very high and the game was slow. I was thinking what is causing that problem and i disable the overloaded draw function for the background and it worked, the cpu usage was now 6%, then i disable the overloaded draw function for the player sprite and the cpu usage went down to 0.2%. I noticed one more thing https://imgur.com/H1PEx24. By the way on my own pc the game is fine the cpu usage is 0,1%. Ps i used the Window.setFramerateLimit(60) function.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10998
    • View Profile
    • development blog
    • Email
Re: Draw function problem.
« Reply #1 on: September 14, 2017, 08:49:42 pm »
The error message already gives it away:

Quote
The current OpenGL implementation is not hardware-accelerated.

Your sister's PC and the PC in your school have no OpenGL driver installed, so you get a software renderer which is really slow.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Wuwus1

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Draw function problem.
« Reply #2 on: September 14, 2017, 08:52:48 pm »
So i can't run it on a potato pc?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10998
    • View Profile
    • development blog
    • Email
Re: Draw function problem.
« Reply #3 on: September 14, 2017, 08:55:58 pm »
You can, you just need to install a GPU driver.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/