| high CPU usage |
| Re: high CPU usage |
|
MBrening
|
I think the drivers are going to be your issue. Mesa3d is the software rendering version of OpenGL. So when you are using Mesa, the processor has to do all of the graphic processing. When you can use true opengl, then it gets moved to the graphics card. It still seems high to me, but that would be my first guess. |
|||||||||||||
|
|
||||||||||||||
| Re: high CPU usage |
|
Gekoncze
|
yes, but when I am drawing blank scene, it uses 33% of CPU... why? |
|||||||||||||||
|
|
||||||||||||||||
|
Gekoncze
|
I also found out that when I comment out SDL_GL_SwapBuffers(); then the cpu usage of gnome-shell is about 4%. (but of course nothing is then displayed)
|
|||||||||||
|
|
||||||||||||
| do what you need to when you need to |
|
necron
|
Here is a look at what i do to ensure that things work at a given rate and that I know how many frames per second I'm getting, cycles per second, and when to update what game data or animation.:
//time tracking td1=time|cycletime|ftime=time since last frame/snapshot td1=SDL_GetTicks(); timeNow=td1; cycletime=((float)(td1-td2)); td2=td1; ftime=ftime+cycletime; //stime=how long between snapshots sum_frames++; //find out if it's snapshot time if(ftime>snaptime) {take_snapshot = 1; ftime = 1.666;} //find out the frames per second if(td1-td3>1000) { td3 = td1; display_fps = sum_frames; sum_frames = 0; } |
|||||||||||
|
|
||||||||||||
| Easy fix |
|
takide
|
Give your system some CPU! put a small delay in there to regulate framerate
|
|||||||||||
|
|
||||||||||||

