Re: [PyOpenGL-Users] no blue in texture
Brought to you by:
mcfletch
From: Dave P. <da...@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. e.g. 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, > 128,128,0,GL_RGB,GL_UNSIGNED_BYTE, > glReadPixels( 0,0,128,128, > GL_RGB, GL_UNSIGNED_BYTE )) > -- Dave Pape Assistant Professor dav...@ac... Department of Media Study http://resumbrae.com/ University at Buffalo |