On Wed, Jun 11, 2008 at 2:19 PM, KwangYul Seo <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Recently I am fiddling with pyglet and directpython. DirectPython is an open
> source C++ extension to the Python programming language which provides basic
> access to DirectX(9.0c) API. To put it another way, we can call DirectX
> functions from Python.
>
> directpython has its own window for rendering, but it lacks many features
> provided by pyglet.window.Window. So I decided to use pyglet.window with
> directpython's d3d module.
>
> Fortunatley, d3d.createDevice takes hwnd as its argument, so I could
> initialize DirectX because pyglet.window.Window in Windows has _hwnd as an
> instance variable.
>
> However, d3d APIs did not work because the pyglet's window had a OpenGL
> context by default. After manually removing some OpenGL related code from
> pyglet.window.win32, I finally could use directpython with pyglet.
>
> Why don't you add NullConfig or NullContext class in the next version of
> pyglet, so by passing config=NullConfig() or context=NullContext() as an
> argument to pyglet.window.Window, the created window won't have a OpenGL
> context and can be used with other libraries. We providing hwnd in Windows
> or xwindow id in Linux, pyglet can integrate easily with many exisiting
> libraries. GStreamer's gstxoverlay.

Pyglet provides a thin layer over OpenGL via ctypes for writing OpenGL
applications.  Trying to integrate pyglet with d3d seems to being
against what I think the pyglet developers have tried so hard to
achieve - a "cross-platform" multimedia library.  My vote is against
providing hooks for other non-OpenGL contexts (if that can really even
be done sanely) for this very reason.

-- 
\\\\\/\"/\\\\\\\\\\\
\\\\/ // //\/\\\\\\\
\\\/ \\// /\ \/\\\\
\\/ /\/ / /\/ /\ \\\
\/ / /\/ /\ /\\\ \\
/ /\\\ /\\\ \\\\\/\
\/\\\\\/\\\\\/\\\\\\
 d.p.s

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
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