Igor Stasenko wrote:
On 15 April 2010 23:02, Lawson English <lenglish5@cox.net> wrote:
I tried to load Andreas Raab's ffi-based OpenGL packages into Pharo 1.0...
(Installer repository: 'http://source.squeak.org/FFI') install: 'FFI-Pools'; install: 'FFI-Kernel'; install: 'FFI-Tests'.
(Installer repository: 'http://www.squeaksource.com/CroquetGL') install: '3DTransform'; install: 'OpenGL-Pools'; install: 'OpenGL-Core'.
OpenGL example
I wasn't quite sure how to load them with Gofer so I did it manually with Monticello.
However, when I "doIt" with 'OpenGL example'
I get the error:
MessageNotUnderstood: SystemDictionary>>platformName OpenGL class>>new OpenGL class>>newIn: OpenGL example
No doubt its something totally trivial... Suggestions?
Select a #platformname selector with mouse , and then press alt-m to see who implements that message. Then try sending it from workspace until to make sure you found right implementor. Then modify the source code in OpenGL class>>new accordingly. ;)
Unfortunately lots of nested references to it, starting with Smalltalk platformName. I can get as far as changing it to SmalltalkImage current platformName but things get strange after that... new Smalltalk platformName = 'Win32' ifTrue:[^OGLWin32 basicNew initialize]. Smalltalk platformName = 'unix' ifTrue: [(Smalltalk windowSystemName = 'Quartz') "implicitly big endian" ifTrue: [^OGLUnixQuartz basicNew initialize]. "default to X11 window system" Smalltalk isLittleEndian ifTrue: [^OGLUnixX11LE basicNew initialize] ifFalse: [^OGLUnixX11BE basicNew initialize]]. Smalltalk platformName = 'Mac OS' ifTrue:[ Smalltalk osVersion asNumber < 1000 ifTrue: [^OGLMacOS9 basicNew initialize] ifFalse:[^OGLMacOSX basicNew initialize]. ]. ^self error:'Cannot identify platform'