Closed anton-johansson closed 7 years ago
This page has really good explanations. I decided to go for two enumerations, to separate read/write-hint from frequency-hint.
I went with GL_STATIC_DRAW
for the indices and GL_STREAM_DRAW
for the vertices. I had ~3800 FPS before the hints and ~3900 FPS after. Could be coincidence, but either way, it's nice to give the correct hints.
Currently, we're always using
GL_STATIC_DRAW
. However, we're uploading vertex data for the map tiles every frame, and there's a better hint for that (maybeGL_DYNAMIC_DRAW
?).Try to check if we get any FPS increase, or if OpenGL already optimizes it anyway.
Use an enumeration for the hints.