1
Graphics / [Solved] Why are my VertexArray graphics so much slower when zoomed in?
« on: March 18, 2015, 05:50:47 am »
Hey all, I've recently been working on a map generator as an experiment with VertexArrays. Originally I had been working with sprites, but at higher zoom levels I found that the rendering process was so resource intensive there was no way I could implement anything else.
As a result, I switched to VertexArray drawing which initially seemed to work quite well. However, if I am to zoom in the rendering seems even slower than before (!?). Unless I'm doing something wrong, this seems completely counter-intuitive to me. Could someone point me in the right direction?
The code in question (The RenderArray work is in this branch).
The offending code is probably in Tilemap.cpp
Thanks.
EDIT: This was due to textures being loaded every draw cycle. Higher zoom = larger images. Who knew texture loading was so resource hungry?
As a result, I switched to VertexArray drawing which initially seemed to work quite well. However, if I am to zoom in the rendering seems even slower than before (!?). Unless I'm doing something wrong, this seems completely counter-intuitive to me. Could someone point me in the right direction?
The code in question (The RenderArray work is in this branch).
The offending code is probably in Tilemap.cpp
Thanks.
EDIT: This was due to textures being loaded every draw cycle. Higher zoom = larger images. Who knew texture loading was so resource hungry?