<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7232.77">
<TITLE>RE: [vtk-developers] extension wrangler</TITLE>
</HEAD>
<BODY>
<DIV id=idOWAReplyText9245 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>That's an interesting idea,
but I don't think I want to implement it. I can think of several potential
problems.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>1. It forces you to use a shared object /
dynamic library for OpenGL. That might not always be desirable or
possible.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>2. It complicates portability. A
lot. We basically have to ensure that we duplicate the method for finding
and linking to the OpenGL library. I have a feeling we would get a lot of
users complaining about VTK not finding OpenGL.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>3. It "ickifies" any OpenGL code.
Every single OpenGL call would need to be changed to use a loaded
function. Not a super hard problem, but if we miss anything or any
developer in the future forgets, everything is going to break in weird
ways. Furthermore, all code using VTK would have to be changed to conform
similarly. That may not even be possible for some
applications.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>-Ken</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> David C. Thompson
[mailto:dcthomp@sandia.gov]<BR><B>Sent:</B> Thu 11/17/2005 11:30
AM<BR><B>To:</B> Moreland, Kenneth<BR><B>Cc:</B> Jeff Lee;
vtk-developers<BR><B>Subject:</B> RE: [vtk-developers] extension
wrangler<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>> The problem is, it is hard to accurately pick exactly which
library<BR>> file a linker is going to link against. We were running
into problems<BR>> where we identified a shared OpenGL library that probably
should have<BR>> been used, but the linker was using a different
library. And if the<BR>> binaries are moved to a different machine, the
whole thing can break<BR>> down.<BR>> <BR>> If there was a way to
query at runtime what shared objects were<BR>> loaded, identify which one was
OpenGL, and then call dlopen on that,<BR>> that would probably work.
However, I don't know of any way to do that<BR>> query.<BR>What if, instead,
you don't link to OpenGL at all at compile time? There<BR>would be a class full
of static function pointers that rendering classes<BR>could use. At run time you
could dlopen OpenGL and populate the function<BR>pointers with valid addresses.
That might alleviate some gl.h header<BR>file inconsistencies as
well.<BR><BR>
David<BR><BR><BR></FONT></P></DIV>
</BODY>
</HTML>