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

Re: [pygame] getting setup to use PyOpenGL for 2D



> Learning to use it for 2d, takes a whole nother set of work on top of that,
> and that was mostly sample source code to learn that for me. The one part in
> particular that I don't find hard to understand, but very annoying to have to
> deal with is texture management (not really specific to 2d though), since most
> OpenGL implementations only support certain sizes of power of 2 textures (i.e.
> 1024x1024), you've got to pack all your 2d images into some larger gl buffer,
> then to draw them you make the texture coords of your quads mapped into the
> right offsets in the gl buffer... It basically just sucks - in 3d it can be
> easier because the artists tools can do the texture packing for them for a
> specific model, but for 2d packing textures isn't a normal part of art
> production... I'm just now getting into writing Python code to hide all this
> ugly detail from me, and it seems harder to grasp and do than it seems like it
> should be...
I totally feel your pain Brian!

Now I sucked with SDL surfaces for my tank game I decided to write an
intermediate graphic layer in OpenGL to make it easier to use for 2D.
But it's just suxx. GL is really for 3D. In the past I used OpenGL to
write some tiny screensaver for me and that's all my knowledge about GL.
Not so much, but enough to feel that GL just suxx for 2D.

In the future the only ): way for my game is to code it in OpenGL. But
to do that without pulling my hair I should write a module that effects
SDL-like, higher-level drawing tools.

It seems to be the only way if I want to use multiple alpha-blended
layers in my game without performace decrease.

-- 
DÃme

        Home: http://dgyimesi.uw.hu