sfml-tmxloader icon indicating copy to clipboard operation
sfml-tmxloader copied to clipboard

Can't draw map properly if it wasn't the the first one the maploader loaded.

Open Tooni opened this issue 8 years ago • 4 comments

Huge apologies if this is me missing something obvious. I'm not sure if this is an issue or if I'm doing something wrong.

When I load a map in the program for the first time like ml.Load("first.tmx"); it loads the map and draws it fine. But later on in the program, when I load another map to the same maploader like ml.Load("second.tmx"); and draw it, it will only draw the first 10x10 tiles from the top left. e.g. first load: http://i.imgur.com/mS6lR3t.png?1 second load: http://i.imgur.com/SDJ0Noo.png?1

I'm not doing anything with SFML's views and the map is the same size as the window. Thanks for any help.

Tooni avatar Aug 04 '16 13:08 Tooni

:/

If I were to hazard a guess the layer chunks are not getting rebuilt properly (the layers are split in to smaller vertex arrays when drawn for easier culling) and you're only getting the first chunk. I'll take a look when I can (are you using the current or next branch? next has a few bug fixes in it already) as a temporary work around you can always create a new map objects and load from scratch - I can understand this might be a pita though

fallahn avatar Aug 04 '16 14:08 fallahn

Thanks for the response. I'm using the master branch. I'll try the next one tomorrow.

Tooni avatar Aug 04 '16 15:08 Tooni

Same thing happens in the next one too.

Tooni avatar Aug 05 '16 10:08 Tooni

OK thanks for letting me know

fallahn avatar Aug 05 '16 10:08 fallahn