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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - aFictitiousForce

Pages: [1]
1
Graphics / Extending the Sprite class?
« on: May 21, 2010, 05:50:14 am »
I have a question about tile-based systems in general.  How do you know which tiles you should draw?  Does SFML automatically cull things that aren't within view?

I can't find a way to get the position of an sf::View so I wasn't too sure of the "correct" way to do this.

2
General / [SOLVED] Fullscreen and sf::VideoMode::GetMode problems
« on: May 11, 2010, 08:51:26 pm »
Turns out it's a Xinerama/XRandr issue.  Whenever I start nvidia-settings I get this warning:

Quote

Xlib:  extension "RANDR" missing on display ":0.0".


In short, I just needed to disable Xinerama.  Any other method of dual-screening works fine.[/quote]

3
General / [SOLVED] Fullscreen and sf::VideoMode::GetMode problems
« on: May 11, 2010, 11:59:18 am »
According to Synaptic I have both libxrandr2, and libxrandr-dev packages installed.  My driver is slightly out of date, but I believe it's the version that came with the distro.  I'll try updating in the morning and report what I find[/i]

4
General / [SOLVED] Fullscreen and sf::VideoMode::GetMode problems
« on: May 11, 2010, 11:45:59 am »
So, I've basically copy and pasted the code from the Graphics tutorial:

Code: [Select]

#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:

Quote

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:

Code: [Select]

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?

Pages: [1]
anything