Jump to content
  • Advertisement
Sign in to follow this  
jmaupay

Texture R then G then B ?

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

I would like to use RGB textures as an array of R values then G values then B values. I mean not standard organization by pixel, but by component: standard: R0 G0 B0 R1 G1 B1 R2 G2 B2 ... Ri Gi Bi wanted: R0 R1 R2 ... Ri G0 G1 G2 ... Gi B0 B1 B2 ... Bi Is it possible ? I tried to find in PixelStorei but nothing seems to do that ? Is there an extension or something ? (should be very nice especially for procedural textures)

Share this post


Link to post
Share on other sites
Advertisement
Not possible to upload data to OpenGL in that format. However, maybe you could use some render to texture technique, and render the three channels individually to combine the final texture that way?

Share this post


Link to post
Share on other sites
Ok Thanks all.

It's only for convenience: I have 3 functions that writes 3 separate arrays of float. I send them to fragment program on 1 RGB texture. And I'm not happy in my function to take into account the number of channels in the merged texture (somedays I could decide to send it in a RGBA texture or only a luminance texture !).

Thanks again.

J.


Share this post


Link to post
Share on other sites
Yes, that's what I'm doing, and what I call "to take into account the number of channels".

I was just checking if I didn't miss a trick in PixelStorei and others OpenGL texture parameters.

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!