Sign in to follow this  
Muncher

read values from a texture

Recommended Posts

Muncher    101
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
Gorax    202
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

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