[squeak-dev] OpenGL (better drivers) on Win32

Kevin kevin at kelleysoft.com
Sun Feb 8 17:45:06 UTC 2009


> From: Igor Stasenko 
> 
> you could replace a .dll name using single swift blow:
> 
> ExternalLibraryFunction allInstancesDo: [:fn |
>   (fn module = 'opengl32.dll') ifTrue: [ fn setModule: 
> 'yourdll.dll' ] ]. this is a little dangerous, because VM is 
> caching these pointers. Save before doing it, and expect that 
> your update may not work unless you restart the VM.

Thanks for the suggestion! ...using that allInstancesDo: with
a Transcript show: fn module. shows that my change to 'opengl.dll'
is incorporated into the methods' bytecodes; browsing the methods
and looking at bytecode view confirms it.  So, okay; now to find
out if I'm actually getting the new dll.

...Okay, weird; I'm seeing 'opengl.dll' as the module name in the
OpenGL methods; I've renamed my opengl.dll to hide it; and restarted
Squeak.  And the OpenGL calls are still working!  (slowly, and 
hardware accelation still fails; see below).  Now to figure out about
this cache of which you speak.  :-)


> Concerning the speed.. i don't think that you will gain much 
> from replacing a library. :) I suspect you got slooow numbers 
> because you rendering in software mode, without hardware acceleration.

Yes... in fact what started me down this path was that when trying out
the B3DSceneExplorerMorph (rotating cube) there's an 'Enable hardware
acceration' checkbox; selecting it gives a walkback:  'Error: a primitive
has failed'.  Looking at it closer now, the primitive failing is
b3dInitializeRasterizerState in module Squeak3D; and since I'm doing 
this in a Croquet(cobalt) VM that I loaded Balloon3D back into, I'm 
guessing that Croquet breaks Balloon3D and that's why it was unloaded
in the first place.


So anyway... I've got some experimentin' to do.  A thing I really like
about Squeak and smalltalk in general is the possibility of having all
the code I've got always available, live, in the development environment.
And there is a lotta, lotta code in all the various squeak packages.  The
only trouble sometimes is figuring out how to get all the pieces to play
well together.  


Thanks,

--kevin





More information about the Squeak-dev mailing list