On Saturday 17 March 2007 07:00, Nyad wrote:
> I am an opengl user. I recently considered designing a 3d engine in
> python using opengl and ctypes. I didn't get too far because the jump
> from ctypes to the api is rather slow using:
>
> from ctypes import *
> windll.opengl32.glColor3f(c_float(1),c_float(1),c_float(1))

The calls to c_float are unnecessary. Just pass Python floats.


> This is just an example. I wrote a program in assembler that does all
> the drawing code.
> Then I called the dll file with ctypes but it didn't run too
> spectacularly. Just acceptably.
> My code was not written badly. It was ctypes fault.

That is a bold statement. Consider that ctypes has a known overhead (function 
calls are slow), then ask yourself whether you could optimise your use of 
ctypes to minimise that overhead.


> Anyway. I want to join and become a developer. You said that it is
> fast enough for 3d games.
>
> I looked at the subversion repository but I think that you should at
> least have a zip file version so that the whole thing can be
> downloaded in one go.

We are never going to release a downloadable file of the entire subversion 
repository. Files including parts of the repository may appear in the future, 
but there are no firm dates for those releases. Please just install a 
subversion client and check out the repository as per the instructions on the 
pyglet website. Tortoise SVN is a reasonably good Windows SVN GUI client if 
you need that sort of thing.

What components of pyglet would you be most interested in contributing to?


> How do _you guys_ call the opengl api with ctypes? is it different
> from my method above?

We avoid unnecessary overhead where possible. We minimise the number of calls 
from Python to OpenGL.


     Richard

--~--~---------~--~----~------------~-------~--~----~
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