View Full Version : SDL 1.2 and OpenGL 3
grudzio
31-10-2010, 11:23 PM
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 (http://www.pascalgamedevelopment.com/showthread.php?6173-SDL-1.3-Mix-In-OpenGL-gt-3.0), 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 (http://www.pascalgamedevelopment.com/showthread.php?5613-OpenGL-3.x-with-Delphi) by Noeska.
chronozphere
01-11-2010, 09:48 AM
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.
grudzio
01-11-2010, 02:42 PM
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.
code_glitch
01-11-2010, 05:12 PM
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.
grudzio
01-11-2010, 06:55 PM
Runs great on wine 1.2.1 on my ubuntu 10.10 box...
Thanks for checking it with wine.
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.
phibermon
02-11-2010, 02:39 PM
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!
petethepoet
15-01-2011, 02:03 PM
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
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.