In OpenGL is it possible to retrieve the pixel array from a previously created texture given only the texture ID?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes.
bind it again and call
glGetTexImage()If you don’t want to mess with the texture which is currently bound, you can bind it to a different texture unit. A texture unit is a container which hold a bound texture. you can have one texture bound to every texture unit. OpenGL 2.1 requires that an implementation will have atleast 2 texture units. The default texture unit which you regularly use is unit 0. to switch the current texture unit call
glActiveTexture():