Re: VBO Performance Misunderstanding
Posted by
alicana on
Apr 22, 2015; 6:33am
URL: https://forum.jogamp.org/VBO-Performance-Misunderstanding-tp4034319p4034359.html
Hi again, I did some improvements in my code. So, I wanted to share with you.
Main.javaChanges:
Firstly, as Gouessej adviced, jogl lib upgraded to newest one (2.3.1)
1) I used Animator instead of FPSAnimator.
2) Apparently, I made mistake by giving wrong COUNT parameter to glDrawArrays call.
3) pointOffset variable which holds how many vertices was also wrong. When updating offset value, it should be multiplied by SIZEOF_FLOAT.
4) I used glBufferSubData instead of glMapBufferRange. I believe this is the reason why performance improved. (by sense)
Thanks to Wade and Gouessej for their advices.
EDIT: FPS resultsFPS: 48
FPS: 61
FPS: 61
FPS: 59
FPS: 58
FPS: 56
FPS: 56
FPS: 55
FPS: 56
FPS: 53
FPS: 51
FPS: 51
FPS: 51
FPS: 50
FPS: 45
FPS: 47
FPS: 47
FPS: 46
FPS: 41
<- About 10 M points.