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

Author Topic: going slow when use GUI library  (Read 3042 times)

0 Members and 1 Guest are viewing this topic.

luqsthunder

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
going slow when use GUI library
« on: April 04, 2016, 02:30:51 am »
Hi guys, I am trying to use a GUI library for my game, like cegui, but for some reason it runs too slow, I tested with some examples, one which uses cegui https://github.com/ghtyrant/SFML_CEGUI, it is the same from sfml github wiki but already updated to cegui 0.8 and sfml 2.1. Also I tried another library called libRocket.
Bellow is the example: https://github.com/libRocket/libRocket/tree/master/Samples/basic/sfml2/src
It is fast to compile and it also uses cmake.

Here is what occurs:



Maybe I am being too fussy (as this message is shown but nothing went wrong) but in a professional game that message should not appear.

This is the first example I've seen: https://skyr.at/sfml-and-cegui-083.html.

I need help to figure out how to get my code fast or why this message is showing up and also to figure out a workaround if possible.

Mr_Blame

  • Full Member
  • ***
  • Posts: 192
    • View Profile
    • Email
Re: going slow when use GUI library
« Reply #1 on: April 04, 2016, 08:46:10 am »
If app doesn't respond that doesn't respond that doesn't mean that it slowed down, It may be crashed.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
AW: going slow when use GUI library
« Reply #2 on: April 04, 2016, 01:03:59 pm »
Are you processing the SFML events? You have to otherwise the OS marks your application as unresponsive.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Mr_Blame

  • Full Member
  • ***
  • Posts: 192
    • View Profile
    • Email
Re: going slow when use GUI library
« Reply #3 on: April 04, 2016, 04:21:31 pm »
I looked at example and... I don't like this part of code:
static sf::Event

Mr_Blame

  • Full Member
  • ***
  • Posts: 192
    • View Profile
    • Email
Re: going slow when use GUI library
« Reply #4 on: April 04, 2016, 04:23:49 pm »
I think that rocketLib "debugger" may slowdown your program.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
AW: going slow when use GUI library
« Reply #5 on: April 04, 2016, 06:19:32 pm »
Please stop throwing random thoughts around. Either be certain (and really be correct) or keep it to yourself. Wrong/misleading information is more annoying and time wasting than no answer at all...
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Satus

  • Guest
Re: going slow when use GUI library
« Reply #6 on: April 04, 2016, 06:29:18 pm »
Why don't you stop your program in debugger and see where it hangs?
Or you can use profiler. Or logging.

luqsthunder

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: going slow when use GUI library
« Reply #7 on: April 05, 2016, 09:06:27 pm »
If app doesn't respond that doesn't respond that doesn't mean that it slowed down, It may be crashed.

it respond, only show this message.

Why don't you stop your program in debugger and see where it hangs?
Or you can use profiler. Or logging.

Its a good thing use a debug, but I could not figure out while using a debugger, because the only this message appears and nothing changes, so like eXpl0it3r said is a thing of treating window events

Are you processing the SFML events? You have to otherwise the OS marks your application as unresponsive.

So if I do something that takes a long time and forget to treating events this message will appear?
Like loading many things to the game and/or making random procedural generation content.

I solved creating the window just after loading everything, and functions / methods that require a valid OpenGL context, I put a sf :: Context, then that means solved, thanks :)

now i will try to make a loading screen and see how deal without using threads, or just ignoring the window events.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: going slow when use GUI library
« Reply #8 on: April 06, 2016, 08:13:33 am »
So if I do something that takes a long time and forget to treating events this message will appear?
Like loading many things to the game and/or making random procedural generation content.
Yes.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything