On 2018-10-29, at 12:26 PM, Bert Freudenberg bert@freudenbergs.de wrote:
On Sat, Oct 27, 2018 at 4:42 PM tim Rowledge tim@rowledge.org wrote: Trying this out on a Raspberry Pi (obviously). First major problem is that
OGLUnix>>openGLLibraryName ^Smalltalk osVersion = 'linux' ifTrue: ['libGL.so.1'] ifFalse: ['GL']
It's actually a bit worse - the osVersion returned by Raspbian is 'linux-gnu' - so I tried changing that to openGLLibraryName ^(Smalltalk osVersion beginsWith: 'linux') ifTrue: ['libGL.so.1'] ifFalse: ['GL'] which got a bit further.
has a #'' (apparently a ByteSymbol with just char value 0 in it) at the end of the method ; which of course a BlockClosure does not understand.
[snip]
The" module: '#openGLLibraryName'>" looks a bit odd to me... shouldn't that have been recompiled to use the real library name?
Yes, but it doesn't change the source code. Follow the senders of openGLLibraryName to see the magic.
OK, so it's supposed to send #openGLLibraryName at some startup point. Very clever. Unfortunately it appears something else goes wrong pretty quickly and OGLExtManager>>#loadExtension: uses glExtGetProcAddress: which even decompiled says <cdecl: ulong 'glXGetProcAddressARB' (char*) module: 'GL'> Which doesn't seem right. Should it also use the #openGLLibraryName thing?
I'd love to see this working on a Pi but I'm going to need help with anything to do with making the opengl trickery work.
tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: FD: Failsafe Disarmed