PDA

View Full Version : Does OpenGL have limits on GPU usage?



vbtang
09-17-2015, 12:19 AM
this is the thread i posted yesterday.
https://www.opengl.org/discussion_boards/showthread.php/197614-Opengl-based-on-MFC-high-GPU-usage-of-DMW?p=1279409#post1279409

i tried to decrease the number of the point spirits to be drawed on one window, but when i create more windows (more than 6,the total number of point spirits is about 1 billion,nearly the same as the total number i want to draw). The usage of my GPU is more than 12%, my window start to lag.if i continue to increace the number of point spirits, the draging of these windows just like the by-frame animation.I really fell confused, does OpenGL have limits on GPU usage?

in the program,i render those point spirits to a FBO,and use glBlitFramebuffer to draw it to the back buffer of my window, then i use glReadPixels(2 PBOs,DMA copy) and glMapBuffer so that i can read the picture to my RAM.

mhagain
09-17-2015, 01:12 PM
An OpenGL program will quite happily use 100% GPU if you write your code to drive it efficiently.

Your code is not driving the GPU efficiently. You're drawing an absolutely huge dataset and bottlenecking on the CPU, so of course it performs badly.