<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Hi,<DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>After failing with the latest subversion sources, I was finally successful in compiling a MacOS browser plugin based on the VMM38b4 sources.  However, I can't get OpenGL to work.  I've traced the problem to sqMacOpenGL.c.  The call to <FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">GetWindowGreatestAreaDevice()</SPAN></FONT> fails with an error code of -5600 ("Invalid Window Pointer").  I assume that this is because <FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">getSTWindow()</SPAN></FONT> doesn't work when Squeak is running in a browser plugin.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I hacked it by avoiding all the GDH stuff if we are in a browser, like so:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#683821" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">#ifdef BROWSERPLUGIN</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">swAttrib[</SPAN></FONT><FONT class="Apple-style-span" color="#0000FF" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">2</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">] = </SPAN></FONT><FONT class="Apple-style-span" color="#0000FF" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">32</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#683821" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">#else</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#683821" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">#ifdef INTERNAL</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">    </SPAN></FONT><FONT class="Apple-style-span" color="#683821" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">#if TARGET_API_MAC_CARBON</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">DPRINTF(</SPAN></FONT><FONT class="Apple-style-span" color="#0000FF" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">5</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">, (fp, </SPAN></FONT><FONT class="Apple-style-span" color="#891315" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">"Getting GDH (Carbon):</SPAN></FONT><FONT class="Apple-style-span" color="#891315" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">  </SPAN></FONT><FONT class="Apple-style-span" color="#891315" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">%d\n"</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">, getSTWindow(), flags));</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">        </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">stat = GetWindowGreatestAreaDevice(getSTWindow(),kWindowContentRgn,&amp;tempGDH,&amp;ignore);</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;"> </SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><FONT class="Apple-style-span" color="#760F50" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">if</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;"> (stat) DPRINTF(</SPAN></FONT><FONT class="Apple-style-span" color="#0000FF" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">1</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">, (fp, </SPAN></FONT><FONT class="Apple-style-span" color="#891315" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">"ERROR: failed call to GetWindowGreatestAreaDevice (code: %d)\n"</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">, stat, flags));</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">    </SPAN></FONT><FONT class="Apple-style-span" color="#683821" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">#else</SPAN></FONT><FONT class="Apple-style-span" color="#683821" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;"> </SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">DPRINTF(</SPAN></FONT><FONT class="Apple-style-span" color="#0000FF" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">5</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">, (fp, </SPAN></FONT><FONT class="Apple-style-span" color="#891315" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">"Getting GDH (non-Carbon)\n"</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">, flags));</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">        </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">tempGDH = getDominateDevice(getSTWindow(),&amp;ignore);</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">    </SPAN></FONT><FONT class="Apple-style-span" color="#683821" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">#endif</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">        </SPAN></FONT><FONT class="Apple-style-span" color="#760F50" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">if</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;"> (tempGDH == nil) {</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">DPRINTF(</SPAN></FONT><FONT class="Apple-style-span" color="#0000FF" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">1</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">, (fp, </SPAN></FONT><FONT class="Apple-style-span" color="#891315" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">"ERROR: tempGDH is nil (whatever that means)\n"</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">, flags));</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">            </SPAN></FONT><FONT class="Apple-style-span" color="#760F50" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">return</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;"> </SPAN></FONT><FONT class="Apple-style-span" color="#0000FF" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">-1</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">}</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">swAttrib[</SPAN></FONT><FONT class="Apple-style-span" color="#0000FF" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">2</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">] = (*(*tempGDH)-&gt;gdPMap)-&gt;pixelSize;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#683821" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">#else</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">swAttrib[</SPAN></FONT><FONT class="Apple-style-span" color="#0000FF" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">2</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">] = (*(*GetMainDevice())-&gt;gdPMap)-&gt;pixelSize;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#683821" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">#endif</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><FONT class="Apple-style-span" color="#760F50" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">if</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">(swAttrib[</SPAN></FONT><FONT class="Apple-style-span" color="#0000FF" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">2</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">] &lt; </SPAN></FONT><FONT class="Apple-style-span" color="#0000FF" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">16</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">) swAttrib[</SPAN></FONT><FONT class="Apple-style-span" color="#0000FF" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">2</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">] = </SPAN></FONT><FONT class="Apple-style-span" color="#0000FF" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">16</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#683821" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">#endif</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" color="#683821" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;"><BR class="khtml-block-placeholder"></SPAN></FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Obviously, this is crap, but I don't know the right thing to do.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Anyway, this allows me to successfully create an OpenGL context ("OpenGL newIn: aRect").  Adding an external FFI plugin to the  browser plugin directory lets me make OpenGL calls.  But something is still wrong: it seems like the OpenGL buffers are never swapped (although DPRINTF assures me that they are: "### Swapping renderer buffers"). </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I've had enough of this for tonight; I need some sleep.  But in the meantime, I'll take any advice I can get (eg: "stop working on that, the latest sources will do everything you need RSN").</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Thanks,</DIV><DIV>Josh</DIV><DIV><BR class="khtml-block-placeholder"></DIV></BODY></HTML>