• Advertisement

Archived

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

Modifying Textures

This topic is 5151 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 like messing around with cellular automaton things, but I don''t know any efficient way to change the lattice each time around. The way it''s done now is that I have a big array the size of the grid, and I do all the cellular automaton stuff on that, then at the end of the iteration I create a texture using the lattice. Obviously, this is a horrible waste of memory since I''m creating a new texture each iteration. I need a way to modify the original texture, so I don''t have to keep making new ones and sucking up my memory. I''m pretty sure this is possible, I just don''t know how. Any helpw ould be great, and if this post is a big incoherent, well I''m sorry. If you need more information or don''t know what I''m talking about just ask, I''ll explain it better.

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by benjamin bunny
glTexSubImage2D is probably what you need. You should find it''s a lot faster than creating new textures all the time.

[edited by - benjamin bunny on January 19, 2004 1:30:44 AM]


How does that function know which texture to edit though?

Share this post


Link to post
Share on other sites
Since OpenGL is a state machine it will edit the currently bound texture.

Enigma

Share this post


Link to post
Share on other sites

  • Advertisement