Files |  Tutorials |  Articles |  Links |  Home |  Team |  Forum |  Wiki |  Impressum

Aktuelle Zeit: Fr Jul 18, 2025 00:06

Foren-Übersicht » English » English Programming Forum
Unbeantwortete Themen | Aktive Themen



Ein neues Thema erstellen Auf das Thema antworten  [ 9 Beiträge ] 
Autor Nachricht
 Betreff des Beitrags: Can you use OpenGL with Lazarus?
BeitragVerfasst: Sa Jan 22, 2005 18:03 
Hi, I am a 14 year old programmer that has experience in 6 computer
languages. I have recently started Pascal by using Lazarus. Is it possible
to use OpenGL with it? How would I do that? Do you need a DLL or
anything? And if so, how would I put it in my project?

Thanks in advance,
theduck


Nach oben
  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Sa Jan 22, 2005 23:01 
Offline
Fels i.d. Brandung
Benutzeravatar

Registriert: Sa Mai 04, 2002 19:48
Beiträge: 3830
Wohnort: Tespe (nahe Hamburg)
Uff... in fact we are currently not really supporting dglOpenGL Headers for FPC. However some guys and me have already some pretty successfull experience with it. So have a try at this http://www.delphigl.com/forum/download.php?id=548 headers. It might work, it might not ;) However the JEDI OpenGL Headers shall work greatly, sadly only with OpenGL 1.2 support. http://www.delphigl.com/do_download.php?f=9001 Here you can a template demonstrating how a SDL window with OpenGL support can be created with FPC. Hope this will give you an idea how it might work. Sadly we don't have people currently how make the headers completly supported for FPC (and Linux). Or I am not up to date currently... O_o

_________________
"Light travels faster than sound. This is why some people appear bright, before you can hear them speak..."


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: So Jan 23, 2005 21:15 
Offline
DGL Member

Registriert: So Aug 29, 2004 01:27
Beiträge: 3
Does anyone feel the urge to update the JEDI-SDL OpenGL headers so that they are 1.5 compatible?


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mo Jan 24, 2005 00:41 
Offline
Guitar Hero
Benutzeravatar

Registriert: Do Sep 25, 2003 15:56
Beiträge: 7810
Wohnort: Sachsen - ERZ / C
Programmiersprache: Java (, Pascal)
May you ask the Jedi guys. Thy should know it best.

_________________
Blog: kevin-fleischer.de und fbaingermany.com


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Di Jan 25, 2005 16:25 
Offline
DGL Member
Benutzeravatar

Registriert: Mo Sep 23, 2002 19:27
Beiträge: 5812
Programmiersprache: C++
Our current headers are working with FPC (several users are using them).

@savage :
Could you please E-Mail me and tell me what needs to be changed to get our headers into the JEDI-Project? I'd be glad to convert/change them.

_________________
www.SaschaWillems.de | GitHub | Twitter | GPU Datenbanken (Vulkan, GL, GLES)


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Di Feb 01, 2005 11:34 
Offline
DGL Member

Registriert: Sa Sep 21, 2002 21:32
Beiträge: 346
Wohnort: Eilsum (Nahe Emden)
Using OpenGl (dglopengl) with FreePascal / Lazarus is quite Simple ... there only some minor changes needed while implementing OpenGl in Lazarus comparing it to Delphi (I tested Lazarus just in a Win 32 environment ... not testet under Linux yet):

- Lazarus doesn't include the "windows" unit by default, but it's needed
- Lazarus doesn't know the OnIdle-Event ... or I don't know how to use it ^^ In my little Programm I just usere a timer
- Lazarus resizes it's Form the first time before the code in the OnCreate-Event is executed. If you wish not to get an error you'll have to pay attention to this ^^
- Lazarus doesn't call up the Resize-Event after the Oncreate-Event by default, so you have to do this manually if you want to see anything :)

But except of this four things there are no differences between opengl in Delphi or in Lazarus.

I just added the source of a simple opengl-programm written in Lazarus here to this Post. I'm sorry I am not able to add the Executable, but Lazarus Executables are somthing about 5 MB big ^^


PS: I am sorry of my bad english ... I've got only 5 (of 15 ^^) ioints in it (@school), so there might be some bigger mistakes in my post here ^^


Dateianhänge:
Dateikommentar: The source itself
Simple_Lazarus_Project.zip [76.06 KiB]
355-mal heruntergeladen
Dateikommentar: A Screenshot of the simplke programm ... a rotating Cube ^^
lazarus_compiled_project.jpg
lazarus_compiled_project.jpg [ 13.9 KiB | 6744-mal betrachtet ]

_________________
Es sind immer die guten,
welche zu früh von uns gehen müssen...

Meine bislang 13 Open Gl - Tuts findet ihr auf www.dcw-group.net
Neu! Ein großer Teil der Demos nach Kylix übersetzt!
Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Di Feb 01, 2005 13:04 
Offline
DGL Member
Benutzeravatar

Registriert: Fr Dez 13, 2002 12:18
Beiträge: 1063
You can use the BaseGraph OpenGL headers, which support Delphi, FreePascal (Lazarus) and VPascal directly. In fact you can even use Carad to generate a FreePascal project to import into Lazarus.
Sadly the Lazarus IDE isn't too stable, so that I'd rather use another editor and the Free Pascal command line compiler at the time being.

_________________
Viel Spaß beim Programmieren,
Mars
http://www.basegraph.com/


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Fr Feb 11, 2005 17:31 
Last time i checked FreePascal had it's own headers similar to those from Delphi3D.
Recently GLScene has been ported to Lazarus and works both in Windows and Linux, if i'm right GLScene uses the DelphiGL headers.
You a need a little more calls to get an X11 handle then you need to get a Win32 handle, but it's not that hard (see GLScene initialisation).
As for Lazarus stability... hmmm, it's quite stable lately, doesn't crash like it used to, also the number of components is increasing :)


Nach oben
  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Di Mär 01, 2005 23:42 
Offline
DGL Member

Registriert: Di Mär 01, 2005 23:21
Beiträge: 7
As guest said, making OpenGL work in Linux on a Lazarus window (or a panel) takes more work than it does in Windows. You have to know quite a bit about the XWindows functions and API. You have to know how to extract a PDisplay and a GLXDrawable from a Lazarus windowed control. Good luck. Of course, stick with JEDI-SDL and you don't have to worry about those things.


Nach oben
 Profil  
Mit Zitat antworten  
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 9 Beiträge ] 
Foren-Übersicht » English » English Programming Forum


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 2 Gäste


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Gehe zu:  
cron
  Powered by phpBB® Forum Software © phpBB Group
Deutsche Übersetzung durch phpBB.de
[ Time : 0.011s | 18 Queries | GZIP : On ]