• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Is there a way to remove vertex_position_3d() from a buffer?

I'm using vertex buffers to draw grass sprites around the room, and I want to be able to remove triangle positions for specific grass sprites, effectively removing specific grass sprites form the room. This data is held in a "vertex_buffer" so I'm trying to find a way around removing vertex positions without having to create a new vertex buffer each time I want a sprite to disappear, because I imagine that would cause the game to freeze each time.

I obviously have very minimal knowledge when it comes to vertex buffers and I feel like there are no functions to make changes to vertex buffers looking at docs.yoyogames.com. I just want to remove individual grasses from the room.
I did a little reading and assume I could use buffer_create_from_vertex_buffer but there's no certainty this code will work since I assume vertex buffers have more / less data than ordinary buffers,
and how would I delete vertex_position() of the specific grass sprite inside this vertex buffer?
I'm basically working with this code:


Any advice would be very much appreciated :3


Previous thread when I had different vertex buffers for instances at each room tile, then just drawing vbuffers at each x y without instances (both methods impacting performance greatly, hence why I'm trying to keep it as one vbuffer):
 
Last edited:
Top