[Mono-devel-list] Getting Tao.OpenGl building with Mono and GTK# with gtkglext-sharp

Steven Brown swbrown at ucsd.edu
Wed Jul 7 21:18:23 EDT 2004


Hello, I've been poking on the Tao framework in Mono's CVS trying to get 
it to build with only Mono instead of depending on Microsoft's tools, 
and running in Linux with GTK#.  Almost everything works with a couple 
patches to Tao and Mono, and I can successfully do OpenGL with GTK#. 
Patches are included here and I'll give some instructions below.  I'm 
not sure who's the contact now for Tao since it moved into Mono's CVS; 
should discussion go to mono-devel, the GTK# list, or ..?


First you need to patch Tao's PostProcess project so it can read monodis 
-generated il code as well as ildasm il.  The attached patch 
'tao-monodis-regex-swb.patch' does this.  (Tao's PostProcess 
disassembles Tao dlls, does a regex to replace some il code in the 
IlasmAttribute and a couple other changes, and reassembles the dll.  See 
their FAQ).

To build the Tao.OpenGl project, compile the pre-processed dll:

mcs /d:LINUX /clscheck- /unsafe /t:library /out:Tao.OpenGl.dll *.cs

Build the PostProcessor:

mcs /t:exe /out:Tao.PostProcess.exe *.cs

Disassemble the pre-processed dll:

monodis Tao.OpenGl.dll --output=Tao.OpenGl.il

Run the PostProcessor:

mono PostProcess.exe Tao.OpenGl.il Tao.OpenGl.pp.il /R /Y

Re-assemble the post-processed il.  You will need the attached patches 
'mcs-ilasm-NumberHelper-float.swb.patch' and 
'mono-monodis-typing-swb.patch', as Mono's ilasm doesn't recognize 
floats like "1e+150", and monodis forgets to wrap it in a float64() 
cast.  There is still one bug left (but it's being looked at by jackson) 
that prevents Mono's ilasm from finishing this step, so you'll need to 
run it with Microsoft's ilasm for now:

ilasm /dll /output:Tao.OpenGl.dll Tao.OpenGl.pp.il


You can then use the resulting Tao.OpenGl.dll with gtkglext-sharp and 
GTK# to get OpenGL in GTK#.  Nifty. :)  Almost completely independent of 
Microsoft tools, now.  If you use gtkglext-sharp, you'll also need the 
two attached .config files to tell it what libraries to use on Linux.


I'll add these patches to bugzilla if it looks like they'll fall off the 
list.  These instructions should also really be CVSed into a README in 
the Tao module until it gets autoconfed.  What I'd like to see is the 
GTK# project absorb gtkglext-sharp as one of the optional dlls it 
builds, as I think its extension of GTK widgets to support OpenGL is a 
big win for GTK#, and it would prevent gtkglext-sharp from being lost to 
bitrot.  I'll probably need to ask the GTK# list about that, but what do 
y'all think about that idea?  It was the best solution to OpenGL with 
GTK# I could find.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tao-monodis-regex-swb.patch
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040707/ead74516/attachment.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mcs-ilasm-NumberHelper-float-swb.patch
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040707/ead74516/attachment-0001.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mono-monodis-typing-swb.patch
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040707/ead74516/attachment-0002.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gdkgl-sharp.dll.config
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040707/ead74516/attachment-0003.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gtkgl-sharp.dll.config
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040707/ead74516/attachment-0004.pl 


More information about the Mono-devel-list mailing list