[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] open gl blit



RE: [pygame] open gl blit> your code doesn't work for me for some reasons. One might be
> that there is a typo in your code (see below): I assume it
> should read pixels rather than pix. After that it runs but I
> don't see anything, though the Opengl Demo itself works.

ugh, i have some working code put together, i thought it
would be "nicer" to just cut and paste only what was needed
(and clean it up a little). here's a link to the .PY file
that works for me.
http://www.pygame.org/ftp/contrib/glblit.zip

if you are using pyopengl 1.5.6 or older, add a line "careful()"
after importing opengl, this will cause an exception to be
raised if any of the GL calls fail (rather than failing
silently as opengl does) if you are using one of the newer
SWIG version of pyopengl this does this by default.

anyways, the code should work for you as it does for me :]


> What would be nice: if one could render the opengl output
> to a surface, and a surface to a texture map. 

yeah, that would be good. unfortunately SDL only supports
rendering opengl to the display surface. there's no way
to get an opengl context to an offscreen surface under SDL.
(although it sounds like a broken record, SDL2 is planned
to have support for this)



____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org