From: Fulko van Westrenen <Fulko.vanW<estrenen@dt...> - 2003-12-24 07:29:45
After some hard work I have my textures working, but I noticed
something very funny: There is no blue in my textures
The code looke like this:
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB,
GL_RGB, GL_UNSIGNED_BYTE ))
I tried to use shorts (GL_UNSIGNED_SHORT), but then Python
runs out of memory. Using GL_RGBA makes no difference,
and PyOpenGL does not know GL_BGR or more fancy codings.
All is made on Debian GNU/Linux (Woody), with Python 2.2.1 and
PyOpenGL 1.5.7. I will try to upgrade to PyOpenGL 2.0, but
probably not this year. If it is of any interrest: GeForce2GTS
with the NVidia 1.0-4496 driver.
Does anyone know how to get all three colours?
Fulko van Westrenen
From: Dave Pape <dave@re...> - 2003-12-24 14:25:11
I don't have an answer for your color problem, but you ought to consider
using glCopyTexImage2D instead. It goes straight from the framebuffer
to a texture, without having to read the pixels back first.
glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, 128, 128, 0)
On Wed, 24 Dec 2003, Fulko van Westrenen wrote:
> After some hard work I have my textures working, but I noticed
> something very funny: There is no blue in my textures
> The code looke like this:
> glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB,
> glReadPixels( 0,0,128,128,
> GL_RGB, GL_UNSIGNED_BYTE ))
Dave Pape Assistant Professor
dave.pape@... Department of Media Study
http://resumbrae.com/ University at Buffalo