Results 1 to 7 of 7

Thread: SDL 1.2 and OpenGL 3

  1. #1

    SDL 1.2 and OpenGL 3

    Hello everyone,

    I have created a small add-on that allows creating OpenGL 3 context for SDL 1.2. It uses dglOpenGL.pas header and, for now, is Windows only. So if you don't want to wait for a SDL 1.3 conversion, do give it a try.

    Attached zip file contains add-on (sdl_gl3.pas) and an example (source and exe). I have only FPC, so I would be grateful if someone could test it with Delphi.

    The code itself is heavily based on examples by Noeska.
    Attached Files Attached Files

  2. #2
    Thanks for this.

    I'd love to see it work on other platforms aswell. Would that be possible in the future?

    I'll have a look at it when I have more time.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  3. #3
    I am planning to add support for linux as soon I have it installed. I don't have access to a mac machine, so I am not able to make macosx version.

  4. #4
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Runs great on wine 1.2.1 on my ubuntu 10.10 box... Gave compiling a shot, and apart from the specific windows code and that block of c#### := 0; //comment there seemed to be no problems elsewhere, although that was expected. You might want to know that the dglOpenGl.pas compiled 100% first time round. Apart from that good code, and if it works on linux, chances are (correct me here if I am wrong mac users) it will run without too many hiccups on mac.
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  5. #5
    Runs great on wine 1.2.1 on my ubuntu 10.10 box...
    Thanks for checking it with wine.
    Quote Originally Posted by code_glitch View Post
    if it works on linux, chances are (correct me here if I am wrong mac users) it will run without too many hiccups on mac.
    I think that it depends if the x11 system is present and if SDL will use its x11 code.

  6. #6
    PGD Staff / News Reporter phibermon's Avatar
    Join Date
    Sep 2009
    Location
    England
    Posts
    524
    HAHA! I was going to do this, but then I thought a full SDL 1.3 translation would be more worth my time. But for various reasons that's taking a back burner right now (check my other posts)

    Thanks for your work but I'm hoping that in the next month or so this won't be required, I'm replacing SDL with somthing a lot better, Stay tuned!
    When the moon hits your eye like a big pizza pie - that's an extinction level impact event.

  7. #7
    Junior Member
    Join Date
    Jan 2011
    Location
    Hobart, Australia
    Posts
    2

    Where is the dglOpenGl unit ?

    Hi all,

    I cannot find the dglOpenGl unit. Help please.

    unit sdl_gl3;

    {$IFDEF FPC}
    {$MODE DELPHI}
    {$ENDIF}

    interface

    uses
    sdl, dglOpenGl;

    Best Regards,
    pew

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
  •