I made a simple JOGL application where you can switch between the shaders I made. I thought I would introduce some FPS stats just to see how efficient the shaders were. I am just rather puzzled why the FPS would increase instead of stay the same when I switch between shaders.
I first run the program going through each shader starting with Shader1 and get the average FPS:
Shader1 Avg. FPS = 75
Shader2 Avg. FPS =150
Shader3 Avg. FPS =115
Shader4 Avg. FPS =300
Then I got back to shader 1 and read the average FPS again:
Shader1 Avg. FPS = 220
Shader2 Avg. FPS = 450
Shader3 Avg. FPS = 120
Shader4 Avg. FPS = 350
I am simply using gl.glUseProgram(shaderProgram) to switch between the shaders nothing else.
Any ideas why I am getting this behaviour?
Edit: I am currently double checking my code to make sure I am not doing something silly otherwise would there be any other reason that this would happen?