Horde3D

Next-Generation Graphics Engine
It is currently 04.06.2024, 14:13

All times are UTC + 1 hour




Post new topic Reply to topic  [ 33 posts ]  Go to page Previous  1, 2, 3
Author Message
PostPosted: 13.02.2010, 13:53 
Offline

Joined: 15.06.2008, 11:21
Posts: 166
Location: Germany
Quote:
In all implementations I am aware, the OpenGL extension mechanism is just a thin wrapper around dlsym. I am not quite clear what you expect to gain by double indirection here?


Quote:
Or maybe the dynamic linker is loading in the wrong order and not correctly patching up the earlier symbol table entries?


By using dlsym to load the libGL.so functions *after* everything was loaded, we might be able work around this? At least that might help with tracking down the problem.


Top
 Profile  
Reply with quote  
PostPosted: 30.03.2010, 15:52 
Offline

Joined: 24.03.2010, 10:17
Posts: 55
Hi guys.

I stumbled upon the same problem in Linux and unfortunately the link order trick will do for standalone executables like the Knight app.
In our case we use Horde3D inside a shared object and libGL is already in the runtime environment when we dlopen the shared object which links against Horde3D.
I thinkt the whole problem stems from the fact the Horde3D defines its own glCreateShader / glDrawBuffers / ... functions, basically all functions which are not part of OpenGL 1.1. That's no problem for Win32 as symbols don't clash here, because MS OpenGL does not export any functions beyond OpenGL 1.1.
On Linux, however, when linking against libGL we suddenly have symbol clashes, because glCreateShader is defined within libGL (from NVIDIA or ATI or MESA or whatever) and inside libHorde.
So to make a long story short: the trick which worked for us is to put all of Horde's own GL functions (= function pointers) in its own namespace (glExt). Using a hacky "using namespace glExt" within utOpenGL.h one doesn't have to change the gl calls in egRendererBase.cpp.

I already talked about this with Marciano, so you might want to give it a try. The attached patch is against SF SVN rev. 228 and changes utOpenGL.[cpp|h] in a minimal way and works for me both on OSX (where no problem occured anyway) and on Linux (openSUSE 11.2, gcc3/4)

Alex


Attachments:
patch-opengl-namespace.txt [502 Bytes]
Downloaded 609 times
Top
 Profile  
Reply with quote  
PostPosted: 31.03.2010, 01:01 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
Hi Alex,

thanks for the patch! It is great to have a simple solution to that problem.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 33 posts ]  Go to page Previous  1, 2, 3

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 50 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group