_arts_
03-25-2011, 07:46 AM
Hi,
I'm facing a little problem. I think it must be an easy thing, but I really can't figure it out.
I have, for my internship, to copy what's rendered on the screen into textures (here cubemap textures).
When I use gluBuild2DMipmaps the data is copied into the texture (I then use glReadPixel before). When I use glTexImage2D (with same glReadPixel before), no data are copied.
The same, and was my first try: glCopyTexImage2D does not copy data to the texture.
I've did this many times before (including glCopyTexImage2D) without issues at all. But here, I can't figure out to make glCopyTexImage2D to work.
I use GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB+i (with i an integer between 0 and 5) as format for all tested functions, GL_RGB8 as internal format.
Something says me it might be the mipmap level since gluBuild2DMipmaps works but not the others ones but I can't understand why.
Any hints ?
I'm facing a little problem. I think it must be an easy thing, but I really can't figure it out.
I have, for my internship, to copy what's rendered on the screen into textures (here cubemap textures).
When I use gluBuild2DMipmaps the data is copied into the texture (I then use glReadPixel before). When I use glTexImage2D (with same glReadPixel before), no data are copied.
The same, and was my first try: glCopyTexImage2D does not copy data to the texture.
I've did this many times before (including glCopyTexImage2D) without issues at all. But here, I can't figure out to make glCopyTexImage2D to work.
I use GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB+i (with i an integer between 0 and 5) as format for all tested functions, GL_RGB8 as internal format.
Something says me it might be the mipmap level since gluBuild2DMipmaps works but not the others ones but I can't understand why.
Any hints ?