SFML community forums
Help => Graphics => Topic started by: xarxer on March 04, 2011, 04:00:46 pm
-
Hello, I have an exact copy of the QT-integration tutorial source code and I'm trying to run it.
The application starts and all, but I cannot see the SFML-widget, and this is the output:
Starting: /home/ftp4/cpp/projects/qsnake/build/qsnake
X Error: BadWindow (invalid Window parameter) 3
Major opcode: 2 (X_ChangeWindowAttributes)
Resource id: 0x5c0000a
X Error: BadWindow (invalid Window parameter) 3
Major opcode: 2 (X_ChangeWindowAttributes)
Resource id: 0x5c0000a
X Error: BadWindow (invalid Window parameter) 3
Major opcode: 8 (X_MapWindow)
Resource id: 0x5c0000a
X Error: BadWindow (invalid Window parameter) 3
Major opcode: 2 (X_ChangeWindowAttributes)
Resource id: 0x5c0000a
X Error: RenderBadPicture (invalid Picture parameter) 175
Extension: 153 (RENDER)
Minor opcode: 7 (RenderFreePicture)
Resource id: 0x15a
X Error: BadWindow (invalid Window parameter) 3
Major opcode: 4 (X_DestroyWindow)
Resource id: 0x5c0000a
*** Exited normally ***
And if I try to run a simple non-qt SFML app such as
#include <iostream>
#include <SFML/Graphics.hpp>
int main(int argc, char **argv) {
sf::VideoMode Vid = sf::VideoMode::GetDesktopMode();
Vid.Height = 600;
Vid.Width = 400;
sf::RenderWindow App(Vid,"Test", sf::Style::Close);
sf::Event Event;
while(App.IsOpened())
{
while(App.GetEvent(Event)) {
if(Event.Type == sf::Event::KeyPressed && Event.Key.Code == sf::Key::Escape)
App.Close();
}
App.Clear(sf::Color::Black);
}
return 0;
}
it just freezes (not really freezes, it takes all CPU power there is in the universe).
Any ideas what might be wrong?
Graphics drivers are up to date and all necessary libraries for X is installed.
Same problem in SFML 1.6 and SFML 2 :(
-
The application starts and all, but I cannot see the SFML-widget
I have no idea, sorry.
it just freezes (not really freezes, it takes all CPU power there is in the universe
This simply reflects what your code does: an endless loop with no pause. So this one is normal, and has nothing to do with your bug.
-
Yeah you're right. I corrected the simple SFML-app and it works fine.
From this I draw the conclusion that the problem is X-related in some way.. have to do some research, thanks! :)
-
Where's your App.Display() call?