Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

extralongpants

Texture Data

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

Is there a way to retrieve a pointer a texture''s data in openGL after it has been created? I am currently rendering a scene to a texture and modifying the pixels then updating the texture. This requires a call to glTexImg2D() and glReadPixels(), so it is VERY slow. I would much rather just call glCopyTexImg2D(), then retrieve the data for that texture in openGL and modify it directly. Is there a way to do this? I would greatly appreciate any help. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
There''s none, which is a good thing.

You can use glTexSubImage2D that should be a bit faster.
Depending what you use your texture for, you could use RenderTexture...


-* So many things to do, so little time to spend. *-

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
try finding info on pbuffers, or pixel buffers. (same thing). Your current method sounds inferior, as does your second idea. Pixel buffers let you use textures in a similar manner that you''d use a regular display buffer (accelerated rendering to textures).

Share this post


Link to post
Share on other sites
Thanks for the help. I tried using glTexSubImg2D() and it didn''t work right and seeemed to run even slower (not what I expected). I will certainly look into pbuffers. Thanks again.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!