<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.18.2">
</HEAD>
<BODY>
Hello all,<BR>
<BR>
&nbsp;&nbsp;&nbsp; Something occurred to me right about now.<BR>
<BR>
&nbsp;&nbsp;&nbsp; The original problem with the Firefox Blender Web Plug-in is that there was a dirty lock for rendering with OpenGl in the plugin Window. That's solved with xembed. What just occurred to be is that, with xembed, there is no real need for forking the process.<BR>
<BR>
&nbsp;&nbsp;&nbsp; Even though forking the process gives us more stability, as if blender crashes the browser keeps going, it's a lot slower than threads (simply because for each plugin instance there will be needed to initialize the entire game engine - load the engine code into the memory and running it's main - and harder to script - even using dbus.<BR>
<BR>
&nbsp;&nbsp;&nbsp; If we work with threads that's solved. And we also gain something that's quite important: the ActiveX plugin work with threads and there is no locking in the opengl context (there is a data locking for something I didn't quite understand yet, but I've seen some examples over the web where people render OpenGL into the control's window without locking anything!<BR>
<BR>
&nbsp;&nbsp;&nbsp; We could have then a common code in both web plugins. But there is also another problem. The game player uses some global variables (I know only about one, the G variable - which has gave me some headaches in the past plugin code), so refactoring is needed in order to implement this approach. But, once it's achieved we'd have a code that's easier to maintain - as the plugin and the stand alone player would be different applications, sharing a great part of the code.<BR>
<BR>
&nbsp;&nbsp;&nbsp; Those are only initial thoughts. I might come up with some testing code so I can make sure it'll work as expected. <IMG SRC="cid:1222375865.5983.12.camel@isidori.escritorio.ydeasolutions.com.br" ALIGN="middle" ALT=":)" BORDER="0"><BR>
<BR>
<BR>
Regards,<BR>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<IMG SRC="cid:1222374967.5983.3.camel@isidori.escritorio.ydeasolutions.com.br" ALIGN="bottom" BORDER="0"><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#0090ff">Marcelo Cora&#231;a de Freitas </FONT></FONT><BR>
<FONT SIZE="2"><FONT COLOR="#0090ff">Gerente de TI </FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#0090ff">Ydea Desenvolvimento de Software LTDA. </FONT></FONT><BR>
<FONT SIZE="2"><FONT COLOR="#0090ff">Av. Adolfo Pinheiro, 2338 - Alto da Boa Vista </FONT></FONT><BR>
<FONT SIZE="2"><FONT COLOR="#0090ff">CEP.:04734-004 - S&#227;o Paulo - SP </FONT></FONT><BR>
&#65279;<FONT SIZE="2"><FONT COLOR="#0090ff">Tel.: 55-11-5523-0333</FONT></FONT><BR>
&#65279;<FONT SIZE="2"><FONT COLOR="#0090ff">Tel.: 55-11-8685-1429</FONT></FONT>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>