<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt;"><div>Quick update. (remember, this is a side project of mine, I am not on this full time, just on "wind-down" time from the PEG grammar I am working on)</div><div><br></div><div>Taking Bert's advice<br></div><div><br></div><div>Step 1: verify working on 32 bit machines.  Well, I do not have a 32 bit machine that can run squeak (old pentium laptop --the kind that catches on fire) and I tried running side-by-side on Ubuntu.<br></div><div>64 bit runs fine, 32 bit tries to launch and cannot find the display driver.  I could install 32 bit compat libs on my Slackware distro boot, but I prefer to keep that pristine.<br></div><div>I don't care for fighting with Ubuntu, so if anybody knows a quick fix, much appreciated. I can get the exact error if needed, just need to reboot and retry.<br></div><div><br></div><div><br></div><div>step 2: Make it work on 64 bits.<br></div><div><br></div><div>FFI calls crap out with the Croquet install so I attempted going from first principles as described here: <a href="http://pharo.gemtalksystems.com/book/LanguageAndLibraries/3DGraphicsAndOpenGL/" target="_blank">http://pharo.gemtalksystems.com/book/LanguageAndLibraries/3DGraphicsAndOpenGL/</a><br></div><div>.<br></div><div><br></div><div>This example:<br></div><div><br></div><blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245);"><div><div>| ogl green canvas fade |<br></div><div>ogl := OpenGL newIn: (0@0 extent: 300@300).<br></div><div>canvas := OGLCanvas new initialize: ogl.<br></div><div>fade:= 0.<br></div><div><br></div><div>1000 timesRepeat: [<br></div><div>ogl glClearColor:0 with: fade with: 0 with: 1.<br></div><div>ogl glClear: 16r4000.<br></div><div>ogl swapBuffers.<br></div><div>fade := fade \+ 0.001.<br></div><div>].<br></div></div></blockquote><div><br></div><div>after up a black square, dies here:<br></div><div><br></div><blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245);"><div><div>glClear: mask<br></div><div>"This method was automatically generated."<br></div><div>"void glClear(GLbitfield mask);"<br></div><div><apicall: void 'glClear' (ulong) module: 'opengl32.dll'><br></div><div>^self externalCallFailed<br></div><div><br></div></div></blockquote><div>with the externalCallFailed. (why is it looking for a freaking .dll?)<br></div><div><br></div><div>My thought process is now:<br></div><div><br></div><div>1. Write a c openGL program and verify it works. (the mesa-gears linux example works fine)<br></div><div>2. Work through FFI in Squeak so I can debug at that level.<br></div><div><br></div><div><br></div><div><br></div><div><br></div><div data-zbluepencil-ignore="true" style="" class="zmail_extra"><div><br></div><div id="Zm-_Id_-Sgn1">---- On Wed, 11 Mar 2020 18:57:39 -0400 <b>Bert Freudenberg <bert@freudenbergs.de></b> wrote ----<br></div><div><br></div><blockquote style="border-left: 1px solid rgb(204, 204, 204); padding-left: 6px; margin: 0px 0px 0px 5px;"><div><div dir="ltr"><div dir="ltr"><div style="font-family: arial, helvetica, sans-serif;font-size: small;color: rgb(0,0,0);" class="x_103617130gmail_default">I'd suggest to get OpenGL working outside of Croquet first:<br></div><div style="font-family: arial, helvetica, sans-serif;color: rgb(0,0,0);" class="x_103617130gmail_default"><br></div><div style="font-family: arial, helvetica, sans-serif;color: rgb(0,0,0);" class="x_103617130gmail_default"><a target="_blank" href="http://www.squeaksource.com/CroquetGL.html">http://www.squeaksource.com/CroquetGL.html</a><br></div><div style="font-family: arial, helvetica, sans-serif;color: rgb(0,0,0);" class="x_103617130gmail_default"><br></div><div style="font-family: arial, helvetica, sans-serif;color: rgb(0,0,0);" class="x_103617130gmail_default">Step 1: Verify this works in 32 bits. (assuming you are doing this on Linux, you can run 32 bit Squeak side-by-side with the 64 bit one)<br></div><div style="font-family: arial, helvetica, sans-serif;color: rgb(0,0,0);" class="x_103617130gmail_default">Step 2: Make it work in 64 bits.<br></div><div style="font-family: arial, helvetica, sans-serif;color: rgb(0,0,0);" class="x_103617130gmail_default"><br></div><div style="font-family: arial, helvetica, sans-serif;color: rgb(0,0,0);" class="x_103617130gmail_default">The second step requires that you understand how FFI works, and how it handles e.g. pointers and integer sizes.<br></div><div style="font-family: arial, helvetica, sans-serif;color: rgb(0,0,0);" class="x_103617130gmail_default">I am assuming we do have a working 64 bit FFI, at least for x86_64 machines.<br></div><div style="font-family: arial, helvetica, sans-serif;color: rgb(0,0,0);" class="x_103617130gmail_default"><br></div><div style="font-family: arial, helvetica, sans-serif;color: rgb(0,0,0);" class="x_103617130gmail_default">E.g. the OGLUnix>><span class="font" style="font-family: Arial, Helvetica, sans-serif; text-align: justify;">glExtGetProcAddress: method returns a pointer. On a 32 bit system, that fits into a 'ulong' which is 32 bits. On a 64 bit system, a pointer is 64 bits wide so it would not fit into a 32 bit word. Now I don't know how many bits 'ulong' has in our 64 bit FFI, but that declaration may have to change. Etc. pp.</span><br></div><div style="font-family: arial, helvetica, sans-serif;color: rgb(0,0,0);" class="x_103617130gmail_default"><span class="font" style="font-family: Arial, Helvetica, sans-serif; text-align: justify;"><br></span></div><div style="font-family: arial, helvetica, sans-serif;color: rgb(0,0,0);" class="x_103617130gmail_default"><span class="font" style="font-family: Arial, Helvetica, sans-serif; text-align: justify;">If you have questions about FFI then those are best directed at the vm-dev list since it is dealing with VM-level interfaces. CC'ing, please follow up there.</span><br></div><div style="font-family: arial, helvetica, sans-serif;color: rgb(0,0,0);" class="x_103617130gmail_default"><br></div><div style="font-family: arial, helvetica, sans-serif;color: rgb(0,0,0);" class="x_103617130gmail_default">- Bert -<br></div></div><div><br></div><div class="x_103617130gmail_quote"><div class="x_103617130gmail_attr" dir="ltr">On Wed, Mar 11, 2020 at 2:54 PM gettimothy via Squeak-dev <<a target="_blank" href="mailto:squeak-dev@lists.squeakfoundation.org">squeak-dev@lists.squeakfoundation.org</a>> wrote:<br></div><div><br></div></div></div></div><blockquote style="margin: 0.0px 0.0px 0.0px 0.8ex;border-left: 1.0px solid rgb(204,204,204);padding-left: 1.0ex;" class="x_103617130gmail_quote"><div><u></u><br></div><div><div style="font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10.0pt;"><div>Okey dokey,<br></div><div><br></div><div>Poking along, there is a stray glyph in OGLUnix openGLLibraryName after<br></div><blockquote style="border: 1.0px solid rgb(204,204,204);padding: 7.0px;background-color: rgb(245,245,245);"><div><div>openGLLibraryName<br></div><div>^Smalltalk osVersion = 'linux'<br></div><div>ifTrue: ['libGL.so.1']<br></div><div>ifFalse: ['GL']<br></div></div></blockquote><div>I removed it in my install and got past that error.<br></div><div><br></div><div>Working exclusively with Croquet(Master)...<br></div><div><br></div><div><br></div><div><br></div><div>My next error is in OGLUnixX11LE(OpenGL)>>glMatrixMode: <br></div><blockquote style="border: 1.0px solid rgb(204,204,204);padding: 7.0px;background-color: rgb(245,245,245);"><div><div>glMatrixMode: mode<br></div><div>"This method was automatically generated."<br></div><div>"void glMatrixMode(GLenum mode);"<br></div><div><apicall: void 'glMatrixMode' (ulong) module: '#openGLLibraryName'><br></div><div>^self externalCallFailed<br></div></div></blockquote><div>The <apicall:...> fails<br></div><div><br></div><div>How to think about this?<br></div><div><br></div><div>Is Croquet behind OpenGL latest?<br></div><div>Would teaching myself OpenGL programming be of use to the Croquet project?<br></div><div><br></div><div>cheers,<br></div><div><br></div><div>tty<br></div></div><div><br></div></div><div><br></div></blockquote></blockquote></div><div><br></div></div><br></body></html>