Re: [PyOpenGL-Users] Textures usage
Brought to you by:
mcfletch
|
From: Frédéric <fre...@gb...> - 2010-01-08 14:06:39
|
Le vendredi 8 janvier 2010 12:55, Frédéric a écrit :
> I'm still trying to made crossfade between 2 images, using opengl
> textures, but it does not work fine. Here is my code :
Ok, I found my mistake: the first texture is at z index 0, so I changed:
glOrtho(0., 1., 1., 0., 0., 10.)
to:
glOrtho(0., 1., 1., 0., -10., 10.)
and it now works.
Is there a way to optimize this code? On my old computer (P4 / GeForce FX
5200), it takes 100% of the CPU with only a 640x480 windows. If I resize it
to 320x200, it does not take more than 5%...
My next step will be to update the textures as the pictures change; what is
the best way to do this?
--
Frédéric
http://www.gbiloba.org
|