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

Author Topic: The example for integrating SFML into Qt produces errors  (Read 1182 times)

0 Members and 1 Guest are viewing this topic.

pbortler

  • Newbie
  • *
  • Posts: 8
    • View Profile
The example for integrating SFML into Qt produces errors
« on: August 22, 2020, 04:26:51 pm »
I'm following some examples of using SFML in Qt, but they are producing errors.

Everything seems to work and the texture displays, but the console is producing the following error during the call to draw():

Quote
An internal OpenGL call failed in Texture.cpp(98).
Expression:
   glFlush()
Error description:
   GL_INVALID_OPERATION
   The specified operation is not allowed in the current state.

Is it okay to ignore these errors?

edit: Event polling isn't supported either. How do you poll events in a SFML render window hosted by a QWidget?I've found a project called QSFML which implements event polling, and I seem to have that working now. QSFML also seems to suffer from the GL_INVALID_OPERATION errors though.
« Last Edit: August 22, 2020, 04:42:15 pm by pbortler »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: The example for integrating SFML into Qt produces errors
« Reply #1 on: September 10, 2020, 03:43:27 pm »
Qt will interfere with the OpenGL states, so when SFML tries to make a glFlush call, OpenGL might not be in the expected state. You probably would need to figure out what calls Qt is making with a OpenGL debugger and then maybe you need to do some calls to ensure the interoperability...
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything