On 11-12-22 01:24 PM, DRC wrote: > On 12/22/11 11:26 AM, Nathan Kidd wrote: >> Trivia: I don't know why one would do this, but the way VGL hooks >> glXGetClientString, and _isremote is implemented, you technically could >> get away with passing in a bogus DPY, (though the API docs don't >> explicitly say that Xlib won't fall back to its error handler instead of >> just returning a NULL return value, in this case.) > > But if the goal is to detect VGL, you want the code to succeed in a > non-VGL environment as well, and it's not guaranteed that it would with > a bogus display handle.
(That's what I meant about the API docs not saying it was 100% safe. I suspect for most libGL implementations the non-hooked call simply returns NULL and you'd be able to test for that v.s getting "VirtualGL", but since it isn't documented, an implementation might do something unpleasant, like call the XErrorHandler. Therefore, this is just a silly aside and not something one should consider unless there are pretty strange constraints on X connections. -Nathan ) ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev _______________________________________________ VirtualGL-Devel mailing list VirtualGL-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/virtualgl-devel