I currently can draw multiple chunks consisting of a lot of tiles which each only have a VertexArray bound and no buffer or VertexAttributes. I draw them with glDrawArraysInstanced and don’t pass any vertex data. The position and transform of the tiles are calculated by the shader based on some small uniforms that I can set. Each tile indexes an array of tilemap indices with its gl_InstaceID. The vertex shader then passes the calculated UV coordinates to the fragment shader to determine the texture of each tile. Currently, for testing purposes, I am passing the array of tileset indices as uniforms.
Is it possible to create an array on the GPU and just get a pointer to it if I want to change the texture of a tile(for example for animations)? Because uploading such big arrays every frame would be pretty slow and unnecessary since I only update a small number of tiles each frame.
Thanks for your answers