On Fri, Apr 6, 2012 at 1:08 PM, Sam Bull <sam.hack...@sent.com> wrote:

> On Thu, 2012-04-05 at 19:25 +0200, Santiago Romero wrote:
> > But in 3D-games rendered as "2D games" (2D opengl games), the sprite
> > images themselves (animation frames) are textures projected in a
> > cube-face, aren't they?
>
> If the sprite images are loaded from an external image such as through
> pygame.image.load(), then yes.
>
> At the moment, my design involves a Surface object just being a class
> containing information, there is no cube or anything. Then, when you
> call a draw function, it runs the appropriate OpenGL code to draw that
> shape, and attaches that information to the Surface object. When you
> blit the Surface object to the screen, it simply runs through those draw
> operations, drawing it all to the screen. So, the Surface object and
> draw modules are not using textures directly, only if you blit an image
> onto them, which again would go through pygame.image.load().
>
> I don't know if that's an efficient way of doing it (it has some serious
> problems at the moment), and I'll research into it more when I'm
> cleaning up my code.
>
>
If groups do the drawing, then it should be more efficient.  Rather than
sprites drawing individually.

Reply via email to