ClassiCube icon indicating copy to clipboard operation
ClassiCube copied to clipboard

Investigate using vertex array objects for web client

Open UnknownShadow200 opened this issue 4 years ago • 3 comments

With the web client on NA2's main (phobia), the performance is rather dreadful, only reaching around 25-30 FPS.

I ran a performance profiler test for 200,000 ms - and it reported that 85,000 ms was spent just drawing the map, which is rather terrible performance wise. image So need to investigate whether using vertex array objects to reduce more expensive draw setup calls would be beneficial

UnknownShadow200 avatar Oct 22 '20 11:10 UnknownShadow200

Isn't it called "vertex buffer objects" or is "vertex array objects" an alternate name?

TheAwesome98-Real avatar Nov 13 '20 16:11 TheAwesome98-Real

Vertex buffer objects (object with arbitrary data) are different to vertex array objects (object with attribute bindings) - see here and here (compare OpenGL 2.0 to 3.0 way)

Because the overhead of GL function calls in WebGL is quite high, in theory, using vertex array objects should mean that all the overhead that happens per frame with glVertexAttribPointer instead only need to happen once when the vertex array object is created.

UnknownShadow200 avatar Nov 13 '20 21:11 UnknownShadow200

Ah, I understand now

TheAwesome98-Real avatar Nov 22 '20 10:11 TheAwesome98-Real