Reputation: 343
I compiled glxgears.c demo code by linking it with libGL.so provided by mesa.
This compilation is for ubuntu guest in virtual box and host is windows 7.
I am running my demo code in ubuntu, during run time it is accessing VBoxOGL.so provided by virtual box guest additions and using 3D hardware acceleration of host.
If I rename VBoxOGL.so to some other name my demo code is not using hardware acceleration but uses software rendering.
Can you tell me how my demo code is connected to VBoxOGL.so.
I need the flow from democode->libGL.so->how ? ->VBoxOGL.so->h/w. As these 2 libraries are not linked together during compilation am not sure how libGL calls are directed to VBoxOGL.so.
Help me to understand the flow and which library or module is doing this redirection.
Upvotes: 2
Views: 490
Reputation: 162164
I don't know the internals of Virtual Box, but my best guess would be that they either LD_PRELOAD that .so instead of libGL.so, or that it's been implemented as a Mesa state tracker and acts on the backside of Mesa as other DRI2 based GPU drivers do.
Upvotes: 1