Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Create OpenGL window on X11

  1. #1

    Create OpenGL window on X11

    System: GNU/Linux (Ubuntu)
    Compiler/IDE: Free Pascal
    Libraries/API: OpenGL

    I'm trying to add OpenGL support to my Allegro.pas project. To do that I must create an OpenGL window and tell to Allegro the handler/function of that window.

    I can do it on MS-Windows but I have no idea about how to do it on X systems because I have almost no experience on X. I've looked on the Internet and everything I found is GLUT, GLX and SDL related, but I can't use that because Allegro must access to the window to intercept messages (keyboard, etc.). As I've seen in Allegro's sources it uses the lowest X11 level.

    I've read some C code about how to add OpenGL support to the original Allegro but I see it too much complex to translate it directly to Pascal.

    Can somebody help me?
    No signature provided yet.

  2. #2
    PGD Community Manager AthenaOfDelphi's Avatar
    Join Date
    Dec 2004
    Location
    South Wales, UK
    Posts
    1,245
    Blog Entries
    2

    Re: Create OpenGL window on X11

    Send me the source code and I'll look at it... see if I can translate it.
    :: AthenaOfDelphi :: My Blog :: My Software ::

  3. #3

    Re: Create OpenGL window on X11

    Thanks really. I'll send it to you as soon as I can.
    No signature provided yet.

  4. #4

    Re: Create OpenGL window on X11

    maybe this is of use also http://www.delphigl.com/do_download.php?f=9000

    its a basic opengl with x example.
    http://3das.noeska.com - create adventure games without programming

  5. #5
    PGD Community Manager AthenaOfDelphi's Avatar
    Join Date
    Dec 2004
    Location
    South Wales, UK
    Posts
    1,245
    Blog Entries
    2

    Re: Create OpenGL window on X11

    ?ëu?±o,

    I've not received the mail... I've been checking my spam filter and it's not been dumped in there. Can you send it to 'athena at outer hyphen reaches dot com'.


    Thanks
    :: AthenaOfDelphi :: My Blog :: My Software ::

  6. #6

    Re: Create OpenGL window on X11

    Thanks both.

    @Athena: I did send it to your MSN account.

    By the way, I've asked on other forums and mailing lists and it seems there's a problem with GLX. I mean Free Pascal doesn't links it and I don't know why. I did add "-klglx" to the compilation command but it says "/usr/bin/ld: lglx: No such file: No such file or directory". May be if I fix this then I can do the other.

    Which package is the GLX dev one? I can't find it on Synaptic.
    No signature provided yet.

  7. #7

    Re: Create OpenGL window on X11

    Try -k-lglx
    Peregrinus, expectavi pedes meos in cymbalis
    Nullus norvegicorum sole urinat

  8. #8

    Re: Create OpenGL window on X11

    Quote Originally Posted by JSoftware
    Try -k-lglx
    It results in "/usr/bin/ld: cannot find -lglx"
    No signature provided yet.

  9. #9
    PGD Community Manager AthenaOfDelphi's Avatar
    Join Date
    Dec 2004
    Location
    South Wales, UK
    Posts
    1,245
    Blog Entries
    2

    Re: Create OpenGL window on X11

    I could take a stab at a straight translation to Pascal, as I'm sure you can, but it depends on a whole bunch of stuff which is clearly defined in other headers/includes... without them, it really would be a stab in the dark.

    From what you've said in your mail, you may well be able to get better assistance from others.

    Was there a particular part of that function that was causing you problems or was it the whole thing?
    :: AthenaOfDelphi :: My Blog :: My Software ::

  10. #10

    Re: Create OpenGL window on X11

    Quote Originally Posted by AthenaOfDelphi
    Was there a particular part of that function that was causing you problems or was it the whole thing?
    I have this run-time error:

    Code:
    ./exbasic: symbol lookup error: /usr/local/lib/libagl.so: undefined symbol: glXQueryExtension
    "libagl.so" is an add-on for the original Allegro that adds OpenGL support.

    I did ask both Allegro developers and FPC developers and no one gives me an answer. They said it should work if I add "-l-kglx" option or similar but then I get a compilation-time error.

    If I can fix this then I can finish it by myself.
    No signature provided yet.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •