Jump to content
  • Advertisement
Sign in to follow this  
ChinaShrimp

OpenGL A simple question about the format of texture

This topic is 4940 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

Advertisement
I never used it...I presume you use a float texture in the same manner you use a byte texture (see TexImage).
For example if format is RGB you have every pixel described by three floats instead of three unsigned char.

r0|g0|b0|r1|g1|b1|... where ri,gi,bi are in [0,1] instead of [0,255]

And I'm sure that every OpenGL driver cast the float to an unsigned char for internal usage...and I dont know a format that supports floats so you must write your own.

Share this post


Link to post
Share on other sites
if you've got the floating point texture support extension they you can load floating point textures directly into OpenGL, however aside from the NV6800 cards they currently cant be filtered very well

Share this post


Link to post
Share on other sites
Sorry, what I mean is that I can load a float type texture by setting GL_FLOAT using OpenGL, whose scope is inside 0 and 1. But how can I do the same thing using DirectX?
Thank you!

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!