|
2009-12-16
, 10:46
|
|
Posts: 84 |
Thanked: 212 times |
Joined on Nov 2007
@ Oulu, Finland
|
#2
|
Another question comes up when comparing the output of 'top' when running my test app to the output when running bounce: While my app is running, I get about 10% CPU usage from Xorg and 4% from hildon-desktop (even in fullscreen mode), while bounce is running, I only see about 4% Xorg and no hildon-desktop at all.
Could this mean that bounce is somehow bypassing the window manager (at least in fullscreen mode) and rendering to the screen directly? Any chance of getting some information on how to do this myself?
|
2009-12-16
, 11:07
|
Posts: 236 |
Thanked: 223 times |
Joined on Oct 2009
@ NE UK
|
#3
|
|
2009-12-16
, 11:32
|
Posts: 6 |
Thanked: 12 times |
Joined on Dec 2009
|
#4
|
|
2009-12-16
, 11:53
|
Posts: 236 |
Thanked: 223 times |
Joined on Oct 2009
@ NE UK
|
#5
|
static int donesetup=0; if(!donesetup) { XGetWindowAttributes(dpy, win, &gwa); glViewport(0, 0, gwa.width, gwa.height); glClearColor(0, 1, 0, 1); glClear(GL_COLOR_BUFFER_BIT); donesetup = 1; }
|
2009-12-16
, 12:21
|
Posts: 6 |
Thanked: 12 times |
Joined on Dec 2009
|
#6
|
The Following User Says Thank You to exoticorn For This Useful Post: | ||
|
2009-12-16
, 12:33
|
Posts: 236 |
Thanked: 223 times |
Joined on Oct 2009
@ NE UK
|
#7
|
|
2009-12-16
, 12:51
|
|
Posts: 2,355 |
Thanked: 5,249 times |
Joined on Jan 2009
@ Barcelona
|
#8
|
Could this mean that bounce is somehow bypassing the window manager (at least in fullscreen mode) and rendering to the screen directly? Any chance of getting some information on how to do this myself?
|
2009-12-16
, 13:08
|
|
Posts: 2,355 |
Thanked: 5,249 times |
Joined on Jan 2009
@ Barcelona
|
#9
|
Btw: While mose GL tutorials tell you to call glViewport in the resize event handler, you can be pretty sure (as long as the GL(ES) implementation isn't completely broken) that a glViewport call per frame isn't the cause for any performance issues. In fact, there are very valid reasons to call glViewport multiple times per frame - think of split screen games or rendering to textures.
|
2009-12-16
, 13:45
|
Posts: 6 |
Thanked: 12 times |
Joined on Dec 2009
|
#10
|
I have played around with getting a simple GLES app running on my N900 last weekend through the combination of Xlib and EGL, and I got it running ok, although only using an ugly hack.
The thing is, if I simply render as fast as I can, I am rendering about 30 frames per second, of which only 10 or so actually end up being displayed. My assumption is that the window manager simply doesn't get enough time on the GPU to display all my rendered frames.
I was able to improve this situation by putting a usleep() into my mainloop, but that is hardly a satisfying solution.
Does anyone have any pointers on how to wait for the window manager to catch up more cleanly? (I had some hope for eglWaitNative(), but it didn't seem to help when I tried it.)
(For those interested, the source can be found at http://exoticorn.de/simplegl.tgz)
Another question comes up when comparing the output of 'top' when running my test app to the output when running bounce: While my app is running, I get about 10% CPU usage from Xorg and 4% from hildon-desktop (even in fullscreen mode), while bounce is running, I only see about 4% Xorg and no hildon-desktop at all.
Could this mean that bounce is somehow bypassing the window manager (at least in fullscreen mode) and rendering to the screen directly? Any chance of getting some information on how to do this myself?
As soon as I can get the basics figured out, I would like to port my game 'spidr' (http://pouet.net/prod.php?which=53019) to the N900.
Cheers,
Dennis