destructible landscapes/terrains and glTexSubImage2D

Hi :slight_smile:

I’m currently trying to do some destructable landscape. For this I use a big(1024x1024px) texture.
There are some bombs which going to explode, so I wanted to remove a part of the texture(=set this round part transparent, so you can see the background).
The problem is, that I can’t really create a round image :slight_smile:

I mean, the image i give to glTexSubImage2D just replaces the pixels in the original texture, and that’s not really, what I want :wink:

I really hope, you know what I mean - and a way to do it :>

Im guessing its 2D?

If its only in regards to rendering and its openGL. I think you could probably use a texture with alpha channels (for exposive mark), make sure depth testing is on, draw with color(0, 0, 0, 0) or a blend function that would make the main color invisible (for explosive mark), when you draw the map and only pass if NOT_EQUAL, LESS or something like that

I just changed the technique to the second here: http://gmc.yoyogames.com/index.php?showtopic=44353 (5th post):

I’m currently at this point: http://planschkuh.pl.ohost.de/screen43.jpg
it works quite well, no texturing at this point and a little bit noobish and dirty code from me :slight_smile:
And it’s also a little bit slow with lots of quads(0.108s with 2000 quads). And some errors occur, but I’ll maybe write some article, tutorial or something about this technique :wink: