problem regarding glut

Discussion in 'CellPerformance@B3D' started by Shai, Oct 18, 2007.

  1. Shai

    Newcomer

    Joined:
    Oct 9, 2007
    Messages:
    12
    Likes Received:
    0
    Hi,

    I'm trying to run a boids implementation on the Cell processor and want to visualize the results. So right now I'm trying to run OpenGL on the PPU. However I can't seem to get to link to the glut library. I always get the following error:

    "skipping incompatible /usr/lib/libglut.so when searching for -lglut"

    Does anyone have any experience with this problem? Or could anyone tell me how they visualize stuff using the Cell processor?
     
  2. OzzyBC42

    Newcomer

    Joined:
    Jul 8, 2007
    Messages:
    25
    Likes Received:
    0
    Seems to be some 32-Bit/64-Bit incompatability, try using the 32-Bit Compiler or
    try recompiling the GLUT Libs from MESA or freeglut.

    The second option would be to use the virtual Framebuffer, see Mike's Frame Buffer Utilities on http://www.cellperformance.com for this.
     
  3. Shai

    Newcomer

    Joined:
    Oct 9, 2007
    Messages:
    12
    Likes Received:
    0
    I switched the project to 32 bit and tried linking the 32 bit library, I switched it to 64bit and tried adding the 64bit library, but nothing works. I keep getting the same error.

    Now, I really don't care about GLUT, I just need a way to get OpenGL working on the PPU. So could anyone please tell me how they got OpenGL to work on the PPU? Or post some example code showing the OpenGL window initialization process?

    Many thanks in advance.
     
  4. OzzyBC42

    Newcomer

    Joined:
    Jul 8, 2007
    Messages:
    25
    Likes Received:
    0
    Like I said, try downloading and recompiling Mesa with the proper ppc switch (./configure linux-ppc or linux-ppc64), that way I got my OpenGL stuff working.

    Try glxinfo to see if you have a OpenGL driver installed and then try glxgears to see it working.

    As for the initialization process you can pretty much try any sample in the Mesa package or http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=02.
     
  5. Shai

    Newcomer

    Joined:
    Oct 9, 2007
    Messages:
    12
    Likes Received:
    0
    Sorry for being so bothersome, but I'm new to Linux. I'm only using it because I can't develop for the Cell on windows. Having said that, I'm having some problems trying to compile the Mesa library.

    Could you please give me a step by step layout of the stuff I have to do? I realise I must seem like a total idiot to me, but Linux is still a strange land for me.
     
  6. OzzyBC42

    Newcomer

    Joined:
    Jul 8, 2007
    Messages:
    25
    Likes Received:
    0
    Sure thing. Here goes:

    1.) Download MesaGLUT and MesaLib from http://sourceforge.net/projects/mesa3d/.

    If you like you can get the Demos too, but they're not essential.

    2.) Open up a terminal, cd into the directory where your files are and type:

    For *.tar.gz:

    tar zxf MesaLib-7.0.1.tar.gz
    tar zxf MesaGLUT-7.0.1.tar.gz

    and else, if you downloaded the *.tar.bz2 archives:

    tar jxf MesaLib-7.0.1.tar.gz
    tar jxf MesaGLUT-7.0.1.tar.gz

    Optional, if you downloaded the Demos:

    tar zxf MesaDemos-7.0.1.tar.gz

    or

    tar jxf MesaDemos-7.0.1.tar.bz2


    3.) cd into the Mesa-7.0.1 directory (created in step 2)

    cd Mesa-7.0.1

    4.) Type:

    make linux-ppc

    This will compile everything that you downloaded. Note: As far as I can tell, there is no ppc64 switch.

    5.) Now you need to move the libraries and headers to their destinations:

    The default path is /usr/local/include/GL and /usr/local/lib.

    However, if you want them to be in /usr/include/GL and /usr/lib (I did),
    you need to make little adjustment:

    Open the default file in you favorite texteditor. It's in the configs
    directory.

    At the bottom of the file you'll see:

    # Installation directories (for make install)
    INSTALL_DIR = /usr/local
    DRI_DRIVER_INSTALL_DIR = /usr/X11R6/lib/modules/dri

    change the INSTALL_DIR line to

    INSTALL_DIR = /usr

    save the file and go back to the Mesa-7.0.1 directory in your terminal.

    Type

    make install

    (You need root access for this, if you changed the the path like I suggested).


    6.) That's it.

    You can type glxinfo now, it should display some information about the driver
    and it's capabilities, if everything worked out.
     
  7. Shai

    Newcomer

    Joined:
    Oct 9, 2007
    Messages:
    12
    Likes Received:
    0
    Thank you so much for your help so far.

    Unfortunately I get a bunch of errors. When I type 'make linux-ppc' I get the following.


    Could you perhaps mail me your ppc compiled library? My mail address is at gmail dot com. Many thanks in advance.
     
    #7 Shai, Oct 22, 2007
    Last edited by a moderator: Aug 12, 2008
  8. Shai

    Newcomer

    Joined:
    Oct 9, 2007
    Messages:
    12
    Likes Received:
    0
    I hope I'm not spamming, but do you by any chance know what's wrong? According to the forum you've been online for several hours now.
     
  9. Shai

    Newcomer

    Joined:
    Oct 9, 2007
    Messages:
    12
    Likes Received:
    0
    at this point I'm seriously considering the Virtual Framebuffer thingie. Does anyone perhaps have some example code handy?
     
  10. Shai

    Newcomer

    Joined:
    Oct 9, 2007
    Messages:
    12
    Likes Received:
    0
    Alright, the virtual framebuffer object isn't any help either. I'm running my PPU program on the system simulator, so writing to /dev/fb0 is the same as writing to the Xserver of the simulated Cell environment (which isn't there) instead of writing to the screen of the computer I'm actually running it on.

    Com'on guys, atleast one of you must have tried to get graphical output on your computer screen using the cell simulator. Even if you don't know, feel free to post something. That way I know that people have had the same problem and are watching this thread.
     
  11. Shai

    Newcomer

    Joined:
    Oct 9, 2007
    Messages:
    12
    Likes Received:
    0
    Alright, apparently the only way to get graphical output from the Cell system simulator is by using a bogus net connection and transferring data to an x11 client or something. Does anybody have any experience with this?
     
Loading...

Share This Page

  • About Us

    Beyond3D has been around for over a decade and prides itself on being the best place on the web for in-depth, technically-driven discussion and analysis of 3D graphics hardware. If you love pixels and transistors, you've come to the right place!

    Beyond3D is proudly published by GPU Tools Ltd.
Loading...