[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Using PyOpenGL for 2D graphics



On Sunday 08 July 2007 09:09:23 pm Dave LeCompte (really) wrote:
> "Greg Ewing" <greg.ewing@xxxxxxxxxxxxxxxx> wrote:
> > Making lots of calls to glVertex() from Python will
> > be inefficient, even more so than it would in C, due to the
> > slowness of Python function calls.
>
> And it's not just the Python function calls (which we know are slow) - the
> PyOpenGL wrapper actually does error checking for you on every call, so it
> can raise an assertion if something goes wrong. The overhead of this error
> checking adds to the function call slowness.
>
> Even more reason to use display lists or otherwise group your data.
>
>
> -Dave LeCompte

All of this information is very helpful! I'm glad I asked you guys ;)

I've downloaded the Python version of NeHe 1-10,  and I'll take a look at it 
soon.

One of the reasons I wanted to get into OpenGL, although I probably won't be 
learning it until A LOT later, is things like particle effects and other 
types of visual effects (I know a lot of people who used Direct3D in their 2D 
games to do such things), and plus I had assumed that OpenGL draws more 
things much quicker if you have Direct Rendering and code it properly.

Plus, I'm learning 3D modeling and, although 3D graphics for games don't seem 
as good as well polished 2D graphics to me, I'd like to at least experiment 
with the idea as soon as I stop sucking at Blender. Plus, if I ever want to 
make that Tetris Attack clone (in the far future) with the 3D mode, well, it 
has to be in 3D :P

Also, kinda off-topic, I've found an idea for my first game that is so simple, 
that even I can't screw it up.
...I think. (Plus, the game is awesomely addictive)
http://jayisgames.com/archives/2007/05/speed_cluster_2.php

A simple game concept, yes? I think I could do it. I'm positive, in fact. I 
could practice all sorts of simple concepts, like randomization, 2D graphics, 
simple logic, and different types of input, like keyboard and mouse. Oh, and 
I can finally learn how to make a menu. I still have no clue how to do that 
(or make any other screens, scenes and popup menus in games).