Skip to main content
gamedev.net
🔒 Locked

Access Bound Textures

Started by keyofrassilon 1 reply 400+ views
Original Post
keyofrassilon
keyofrassilon
Normally if one were to access color or pixel information this would be done using a data buffer/array...Now if I wanted to access the actual texture that is set up by glTexture2D and bound to an object...how would I go about doing this? Is there a command that would allow me to access the texture resident in video memory pixel by pixel and return color information? My reason for something like this is having both a resident texture as a GL object and a data buffer takes up too much memory...I think it would be more efficiant to access the GL texture object...
absriram
absriram
I guess thats when you use pbuffers, the texture is still in the video memory when it is rendered to pbuffer and you can access it without having to waste the bandwidth.

Sriram
hplus0603
hplus0603
You can read back the data of a texture using glGetTexImage2D() and friends.
enum Bool { True, False, FileNotFound };

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.