View Full Version : glCopyTexSubImage2D
06-10-2003, 03:07 AM
My problem is that when I use
to copy a texture from the frame buffer to update it, the new texture is greather than the original.
somebody knows why it happens?
06-10-2003, 07:21 AM
If the original texture is smaller that the sub one, it's normal.
06-10-2003, 08:00 AM
The original texture and the final texture are the same.
Iīm trying to render a texture using glCopyTexSubImage2D or glCopyTexImage2D, but the new updated texture is bigger than the original.
I donīt know what happens :'( with my code.
I have a 300x300 window and my texture is 256x256. I show my texture first and itīs ok. Then, I try to render it. I do this:
It wont shring your 300*300 window into a 256*256 texture. its just going to take the lower 256*256 pixels and transfer them to the texture, and it will look bigger
06-10-2003, 11:35 AM
Try this :
32,32 ==> The position to add the texture
glTexSubImage2D(GL_TEXTURE_2D, 0, 32, 32, pTextureImage->sizeX,
pTextureImage->sizeY, GL_RGB, GL_UNSIGNED_BYTE, pTextureImage->data);
06-10-2003, 11:43 AM
Thanks for your replies, itīs just fixed!!!
I change the window size to 256x256 and it works jjjj.
06-10-2003, 12:14 PM
Now I have two textures:
texture and texture
With glCopyTexSubImage2D(GL_TEXTURE_2D,0,0,0,0,0,256,25 6), I change the texture previously selected with the function glBindTexture(GL_TEXTURE_2D, texture)
I want my texture was the original texture.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.