On Tue, Nov 22, 2011 at 08:42:34 UTC+1 anatoly techtonik wrote:
>
> On Tue, Nov 22, 2011 at 1:43 AM, Richard Jones <[email protected]>wrote:
>
>> On 22 November 2011 08:52, anatoly techtonik <[email protected]> wrote:
>> > Shouldn't pyglet provide cross-platform API?
>>
>> Could you be more specific about what you mean here? I thought that
>> the API exposed by pyglet was cross-platform.
>
>
> Specifically this check doesn't look good to me:
>
> http://code.google.com/p/pyglet/source/detail?r=44f25d6bb97be0c89688f9d265b1b39fb24e0308
>
 
Yeah, it's a bit ugly. But this script is not part of the public pyglet 
API, more something like a low level debugging tool. So I think it's not a 
big deal to make this somewhat ugly check there (for such low level code 
you have to somewhere decide which API to use).

Regarding the cross-platform API, the high level API of pyglet is of course 
cross-platform. In normal code you don't have to fiddle with GLX or WGL 
directly, pyglet provides the Window, Context and Config classes for that. 
If you want to, you can of course use the low level API to GLX or WGL, but 
then you have to use basically the same API as if you were coding in C.

If you want to use some GLX or WGL extensions, then you already have to 
know the platform you use, because the extensions are specific to a 
platform and cannot be abstracted away.


Andy

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/pyglet-users/-/9Xh2C2oPcJkJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en.

Reply via email to