About the plOpenGL pack

50 views
Skip to first unread message

PV

unread,
Jul 24, 2018, 11:36:56 AM7/24/18
to swi-p...@googlegroups.com
Hi fellow swiprologers! *UPDATED*

I got interested to trying to get the plOpenGL to work on my Windows 10 Home laptop (64 bit). I have a 7.7.18 Swi-prolog 32-bit installed.

Well the pack_install/1 does work, but it doesn't have all the dlls etc. etc. etc. all sorts of problems.

The hacks:
Searched and found a missing a file, some gcc-compiler run-time dll :  libgcc_s_dw2-1.dll
I found it after I installed Qt 5.11.1 ( I made a guess about the Qt version)
This dll can be downloaded from (my Google Storage pages) https://storage.cloud.google.com/my002/libgcc_s_dw2-1.dll

glut32.dll
This old  dll can be found from elsewhere. I believe could be easily changed to freeglut.dll, freeglut is a modern dll. Freeglut and glut32 have some licensing issues, the freeglut has more relaxed license. Wikipedia has article on Freeglut-project

Freeglut.dll binary can be downloaded from https://www.transmissionzero.co.uk/software/freeglut-devel/
it is in the freeglut 3.0.0 MinGW Package.
Rename the freeglut.dll to glut32.dll and use the modern dll just like the old.

the glutInit/0
glutInit/0 uses some command line arguments from swipl.exe, but in Windows it doesn't require any.

To get a working example file, with original glut32.dll,  calls to glutInit/0 could be commented out from the examples, or swipl needs (on Windows) empty arguments as
swipl.exe -s helloworld.pl -- " "

The modern glut32.dll can handle a case where no command line arguments are not given. Also it complains if initGlut/0 is missing.

I was able to run the simplest 'hello world' example and the most complicated 'particles' The examples need to be run from the command line version of swipl.exe, because they exit swipl after they are ran, I am not sure, but this is what they are supposed to do... I am not familiar with using GLUT

I copied the libgcc_s_dw2-1.dll and (old/modern) glut32.dll to the swipl/bin-directory. If they would be in the pack, they would be installed to appropriate pack directories

Final words: I think the plOpenGL is great, but the pack needs some cleaning up.



Thanks.






GM Xu

unread,
Jul 30, 2018, 9:08:10 AM7/30/18
to SWI-Prolog
I think it is really Great 
Reply all
Reply to author
Forward
0 new messages