So, I've basically copy and pasted the code from the Graphics tutorial:
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include <iostream>
int main()
{
// Create the main rendering window
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics", sf::Style::Fullscreen);
// Start game loop
while (App.IsOpened())
{
// Process events
sf::Event Event;
while (App.GetEvent(Event))
{
// Close window : exit
if (Event.Type == sf::Event::Closed)
App.Close();
}
// Clear the screen (fill it with black color)
App.Clear();
// Display window contents on screen
App.Display();
}
return EXIT_SUCCESS;
}
I've simply added the fullscreen parameter in the sf::RenderWindow declaration. However, on execution, I keep getting the following output or something similar:
Failed to get the list of available video modes
Failed to get the list of available video modes
Failed to get the list of available video modes
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 1 (X_CreateWindow)
Value in failed request: 0x0
Serial number of failed request: 98
Current serial number in output stream: 103
Similar messages occur whenever I use sf::VideoMode::GetMode(int) in any capacity, fullscreen or otherwise.
Creating a VideoMode with every other sf::Style works fine. That is, I can do this:
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "AAAA", sf::Style::Resize);
and it compiles and runs just fine.
I'm using Ubuntu 10.04, GNOME. My video card's an NVIDIA 8500GT using driver 195.36.15. Any idea what could be wrong?