Reputation: 115
I ported a basic OpenGL C++ project, which used the OpenGL API directly from C++ to create vertexes and textures (glBegin,glEnd), to a new computer with a reasonable good Nvidia Titan GPU board, but a little bit slower CPU. Program's FPS actually went down, and quite a lot. Hence, I was wondering how much is the plain old OpenGL using the GPU.
Upvotes: 0
Views: 239
Reputation: 162164
If you got a GPU with OpenGL support, then also the older versions of the API (fixed function pipeline) are GPU accelerated.
What you're observing is the direct impact of the huge CPU overhead, that old API style had. Each and every call begin glBegin
and glEnd
does something; in certain circumstances that might be a lot.
Besides the introduction of shaders, the driving force behind changes toward the modern API(s) is, to reduce the amount of work done on the CPU side as far as possible. The mantra is: "Reduce your draw calls!"
Upvotes: 1
Reputation: 585
The reason why immediate-mode rendering with glBegin/glEnd was deprecated and eventually removed is exactly what you are observing: the overhead on the CPU-side of the calls and getting the data in a timely fashion to the GPU is just too much. Modern GPUs are very fast and have been for some time - but they have a high latency. So if your CPU cannot provide the GPU with enough work fast enough (which can be difficult even with modern OpenGL), then the GPU will idle and you won't see FPS improvements or, if the CPU is slower, even slowdowns.
Upvotes: 3