Jump to content
  • Advertisement
Sign in to follow this  
Muncher

read values from a texture

This topic is 4712 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!