Sign in to follow this  

read values from a texture

This topic is 4546 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

if there is a function for it, i cant find it. Is there a way to read the values from an openggl texture into an array? Specifically, a floating point texture into an array of floats. I can do it if i render the texture to the color buffer then use glReadPixels(), but the results are clamped from 0..1 :( Cheers for any help Muncher btw, using C++ ;)

Share this post


Link to post
Share on other sites
Try glGetTexImage(). One thing to note: if you don't plan on storing the width and height of the texture somewhere in your program, you may want to read that page for information on how to get the texture width and height.

Share this post


Link to post
Share on other sites

This topic is 4546 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this