tag:blogger.com,1999:blog-10460112.post4770989905943515991..comments2007-03-10T18:41:02.566+01:00Comments on Dr. Bert Freudenberg: OpenGL in a WorkspaceBerthttp://www.blogger.com/profile/05353637548899091553noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-10460112.post-82816626287685710322007-03-10T18:41:00.000+01:002007-03-10T18:41:00.000+01:00Thank you! The Sensor hack is what I was looking ...Thank you! The Sensor hack is what I was looking for. I actually have the COpenGlPlayer code already, although when I tried to backtrack to find where I had gotten it, I looked everywhere except the Tweak list. Thanks again. dafAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-10460112.post-42243520279501570492007-03-10T15:28:00.000+01:002007-03-10T15:28:00.000+01:00There is no official way to convert Tweak coordina...There is no official way to convert Tweak coordinates to absolute Squeak Display coordinates. Here is a hack involving <A HREF="http://impara.de/pipermail/tweak/2006-January/000947.html" REL="nofollow">Sensor</A>.<BR/><BR/>Besides, you might find this useful: <A HREF="http://permalink.gmane.org/gmane.comp.lang.smalltalk.tweak/198" REL="nofollow">COpenGLPlayer</A>CroqueTweakerhttp://www.blogger.com/profile/05353637548899091553noreply@blogger.comtag:blogger.com,1999:blog-10460112.post-52399166544458716832007-03-10T14:59:00.000+01:002007-03-10T14:59:00.000+01:00I'm looking for a way to do this cleanly within a ...I'm looking for a way to do this cleanly within a Tweak project, but I can't seem to find the right offset(s) to put the OGL area in the project window. Any ideas?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-10460112.post-25336670981535138402007-02-18T12:14:00.000+01:002007-02-18T12:14:00.000+01:00This is called "positional arguments", Andreas all...This is called "positional arguments", Andreas allowed this syntax in Croquet. The actual selector in this case is #'glClearColor()/4'.<BR/><BR/>The reason is that this is the syntax that is used in any piece of OpenGL documentation. You can alternatively write<BR/><BR/>ogl glClearColor: 0 with: green with: 0 with: 1<BR/><BR/>which I find even less readable. These are FFI methods, so they directly call out to the corresponding C function. Personally I like this, it reminds me that this is a C call rather than a Smalltalk method.<BR/><BR/>A "cool" hack is to use cascades, which allows you to copy C code almost verbatim:<BR/><BR/>ogl<BR/>glClearColor(0, green, 0, 1);<BR/>glClear(16r4000);<BR/>yourself.CroqueTweakerhttp://www.blogger.com/profile/05353637548899091553noreply@blogger.comtag:blogger.com,1999:blog-10460112.post-47373658805054205732007-02-18T03:35:00.000+01:002007-02-18T03:35:00.000+01:00...ogl glClearColor(0, green, 0, 1).ogl glClear(16......<BR/>ogl glClearColor(0, green, 0, 1).<BR/>ogl glClear(16r4000).<BR/>...<BR/><BR/>I'm sure I don't get that. Most of the syntax here in the snippet looks like Smalltalk syntax. But then there's this mixed in? It's amazing, because immediately I have no idea what the glClearColor arguments mean. Or the glClear. Is this one of these "on beyond Smalltalk" things I keep hearing some of the spring-from-Squeak projects talking about?Anonymousnoreply@blogger.com