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

Author Topic: [Solved] Problem about integrating SFML 2.0 into Qt (Mac OS X)  (Read 2516 times)

0 Members and 1 Guest are viewing this topic.

ccleung6

  • Newbie
  • *
  • Posts: 22
    • View Profile
[Solved] Problem about integrating SFML 2.0 into Qt (Mac OS X)
« on: December 15, 2013, 06:18:33 am »
I follow this tutorial http://sfml-dev.org/tutorials/1.6/graphics-qt.php to integrate SFML 2.0 into Qt 4.7.4

Problem:
I need to cast the winId() into void pointer:
sf::RenderWindow::create((void *)winId());

I am not sure this is correct or not.

On Mac, SFML failed to create the context.
The render window is blank, and debug output always gives:

invalid drawable

Any solution?

Thanks.
« Last Edit: December 21, 2013, 07:18:51 am by ccleung6 »

ccleung6

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Problem about integrating SFML 2.0 into Qt (Mac OS X)
« Reply #1 on: December 21, 2013, 07:18:33 am »
I changed to use Qt 5.2.
It can create the SFML context successfully.
And the winId() should be casted into sf::WindowHandle

sf::RenderWindow::create((sf::WindowHandle)winId());

 

anything