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

Author Topic: Problem using SFML 2.0 Ubuntu VirtualBox (black screen)  (Read 3625 times)

0 Members and 1 Guest are viewing this topic.

jkalmeij

  • Newbie
  • *
  • Posts: 8
    • View Profile
Problem using SFML 2.0 Ubuntu VirtualBox (black screen)
« on: August 09, 2011, 10:59:19 pm »
Hey,
I built the latest version of SFML 2.0 on both Windows 7 and Ubuntu.

On Windows 7 I am able to properly run SFML programs. Linking is done dynamically.

On Ubuntu (virtual box; host Windows 7) I have a problem. The RenderWindow will remain black, no matter what I draw.
I tried both linking dynamically and statically, but got the same result.

I have an ATI videocard but it works on the Windows 7 host, and I read this was fixed in 2.0.

Any suggestions what I can do?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Problem using SFML 2.0 Ubuntu VirtualBox (black screen)
« Reply #1 on: August 10, 2011, 07:50:00 am »
Can you show your code? Have you tried the SFML examples?

Are your drivers ok? Have you tried to run other OpenGL apps (like glxgears)?
Laurent Gomila - SFML developer

jkalmeij

  • Newbie
  • *
  • Posts: 8
    • View Profile
Problem using SFML 2.0 Ubuntu VirtualBox (black screen)
« Reply #2 on: August 10, 2011, 12:58:48 pm »
Quote
Have you tried the SFML examples?

Yes. The exact same code works under Windows but not under Ubuntu.

Quote
Are your drivers ok?

I was under the impression that I only had to install VirtualBox Guest Additions (more later*).

Quote
Have you tried to run other OpenGL apps (like glxgears)?

This is a good one. glxgears also gives me a black screen only (together with some terminal output; ~1000 FPS).
* After this I installed the ATI drivers: fglrx. Now I actually get segfaults when trying to execute glxgears, flgrxinfo, glxinfo (using gdb these trace back to fglrx, so I tried another fresh install, but no luck.).

I read conflicting stories about how OpenGL is / is not supported by VirtualBox. People report success when running a Windows guest in Linux host. My setup is the other way around (Windows host, Linux guest).

I have 3D acceleration enabled for the guest, together with 128MB graphical memory.

I guess the bottomline is, if anyone has a setup similar to mine and got it to work, could you please tell me what you did to achieve this?
Or if you know for a fact that it's not possible, please do tell :). In this case I will resort to installing Ubuntu alongside Windows.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Problem using SFML 2.0 Ubuntu VirtualBox (black screen)
« Reply #3 on: August 10, 2011, 01:02:33 pm »
You're lucky because I have the exact same setup. However I don't remember doing anything special to get OpenGL to work on my Linux guest. But I have an nVidia card...

I think this is a driver issue, but I can't help you sorry. Maybe you can try to install the free ATI driver instead of the proprietary one.
Laurent Gomila - SFML developer

jkalmeij

  • Newbie
  • *
  • Posts: 8
    • View Profile
Problem using SFML 2.0 Ubuntu VirtualBox (black screen)
« Reply #4 on: August 10, 2011, 02:39:12 pm »
I didn't do anything special but it 'works' now.

I always run the virtualbox in fullscreen mode. Running in any other mode will cause the display of both OpenGL and SFML programs to work properly... dang

Perhaps a trivial reply but just throwing this out there for those with similar problems.

 

anything