WTB: OpenGL for linux!

Discussion in 'Feature Suggestions' started by stokkes, Nov 20, 2007.

  1. stokkes

    stokkes Member

    Messages:
    27
    I'd love (and I'm sure I'm not the only one) some basic support for OpenGL in Linux under Parallels for mac. I don't want it for games, but more for certain apps.

    I'm sure with 3D accel working in windows, this shouldn't be too difficult to accomplish.

    Can any Parallels rep chime in on this one?

    Thanks!
     
  2. jennil

    jennil Bit poster

    Messages:
    2
    I’m not a parallels rep. but I develop opengl apps for windows, linux and os x. To run opengl stuff on my linux/parallels installation I have installed X11 on my Mac and just exports the display from linux to OS X. It works quite well.

    I don’t know if this is a solution for you but it solved my problems. So now I can do all my development on a single laptop.
     
  3. stokkes

    stokkes Member

    Messages:
    27
    Hmmm.. how do you do this? And how would the app recognize to use OSX's OGL when the host OS has no OGL support?

    I have X11 running on leopard, and would love to know how to do this.
     
  4. jennil

    jennil Bit poster

    Messages:
    2
    I quite simple:

    1. Start your Linux in Parallels
    2. Start X11 and xterm in OS X

    -- all the typing from now on is int the OS X xterm --

    3. Type "xhost +" to allow other computers to connect to X11 in OS X
    4. ssh (ssh user@ip) in to the parallels linux os requires that you have sshd running on linux
    5. type "export DISPLAY=ip:0.0" where ip is the ip number your mac has in the parallels virtual network (10.211.55.2 in my case)
    6. test by typing "glxgears"

    If it works you can run X11 GL apps that will run on linux but display on OS X by simply starting it from the xterm.

    It works because X11 sends all OGL commands to the displaying OS so the host that runs the app don't need any support.

    I guess all this could be done much nicer by using the -X or -Y switch in ssh lika I normally do in linux. I did however not get this to work right away and i really didn't care spen any time on it. But i guess you can find alot on net about it if requre higher security.

    I hope this help
     
  5. lechium

    lechium Bit poster

    Messages:
    2
    jennil,

    I followed your instructions, but couldn't get this to work.

    I did a standard install of sshd in the recent Ubuntu 8.10,
    running in Parallels Desktop 4.0.3810 on Mac OS X 10.5.6
    on a MacBook Pro.

    I also checked the sshd config file to see if it allows X-
    forwarding, and it does.

    And I also tried the X11 that came with 10.4 tiger (followed
    instructions from Apple discussions on how to install it).

    I would appreciate if you could provide me with any hints
    on how I could get this to work. All I get is "Error: couldn't
    get an RGB, double-buffered visual" when I try to run
    glxgears or glxinfo. X applications that do not require
    OpenGL (like xclock) work fine using the method you described.

    Thank you very much,

    Max.
     
  6. John@Parallels

    John@Parallels Forum Maven

    Messages:
    6,333
    ssh -X user@hostname
    and gnome-terminal
    glxgears
    it is working
     
  7. lechium

    lechium Bit poster

    Messages:
    2
    I got it to work in the meantime, but not with Ubuntu 8.10...
    it looks like they changed something in their XServer-Conf
    that breaks the ability to do this.

    With a fresh install of 7.10 it is working fine. In 10.5, you don't
    even have to run X11 first and change the DISPLAY variable
    later on, just type SSH -Y user@ip in a regular OS X Terminal
    and it will launch an X11 window after authenticating.

    Thank you anyways.
     
  8. TaminoD

    TaminoD Bit poster

    Messages:
    1
    LIBGL_ALWAYS_INDIRECT=yes

    I've been struggling with this problem for weeks, and today I finally investigated deeply and found the solution.

    If all you get from glxinfo is "couldn't find RGB GLX visual or fbconfig", and glxgears says "couldn't
    get an RGB, double-buffered visual", try setting LIBGL_ALWAYS_INDIRECT:

    I'm posting this for everyone searching this forum with the same problem.
    See also my post on apple discussions: http://discussions.apple.com/thread.jspa?threadID=2145255&tstart=0
     
  9. Kevin C. Krinke

    Kevin C. Krinke Junior Member

    Messages:
    12
    Just a note that not all OpenGL applications support indirect rendering very well and that this X-Forwarding solution is a hack at best. The only real solution is for Parallels to support Linux OpenGL natively (which to my understanding was supposed to be part of 4.0 but isn't for whatever reason).

    Parallels is a vital part of my workflow these days and it truly is indispensible.
     

Share This Page