the problem that my CPU is not at full usage nor my GPU however the
game still lags. So I have decided to switch to VBO's and Shaders.
Maby the GPU-CPU bandwidth is causing the problem.
My target is to not use any deprecated functions.
I have been looking at the tutorials here:
Tutorial Series
However it seems it is alot of work to create the matricies, especially
considering these will keep changing.
I know that Sin and Cos are really labor intensive functions,
these calculations below are performed for every vertex right?
Wouldn't this be very slow?
const mat3 projection = mat3( vec3(3.0/4.0, 0.0, 0.0), vec3( 0.0, 1.0, 0.0), vec3( 0.0, 0.0, 1.0) ); mat3 rotation = mat3( vec3(1.0, 0.0, 0.0), vec3(0.0, cos(timer), sin(timer)), vec3(0.0, -sin(timer), cos(timer)) ); mat3 scale = mat3( vec3(4.0/3.0, 0.0, 0.0), vec3( 0.0, 1.0, 0.0), vec3( 0.0, 0.0, 1.0) ); gl_Position = vec4(projection * rotation * scale * position.xyz, 1.0); texcoord = position.xy * vec2(0.5) + vec2(0.5); fade_factor = sin(timer) * 0.5 + 0.5;
[/quote]
Here is a screenshot of a game I am going to try and change from OpenGL 1.1 to openGL 3.1:
Thanks
Overall:
Are VBO's faster then Vertex Arrays?
Are Vertex and Fragment Shaders faster than the Fixed Pipeline?
Are vertex shaders called for every vertex?
Is there a better way to do this than use sin() and cos()