Default speed of android devices

Previous topic - Next topic

Kitty Hello

QuoteGL_OES_framebuffer_object
This indicates, that the createscreen stuff should work.

can you test this:
Code (glbasic) Select

SETTRANSPARENCY 0x000000
CREATESCREEN 1, 1, 256,256
USESCREEN 1
DRAWRECT 0,0,256,256,0x000000
DRAWRECT 0,0,32,32,0xff0000
DRAWRECT 1,1,30,30,0xffffff
USESCREEN 0
CLEARSCREEN 0xff8080
WHILE TRUE
    DRAWSPRITE 1, 32,32
    SHOWSCREEN
WEND


You should see a light blue background with a white rectangle, that has a blue frame.
What do you see?





ketil

It works as it should on my htc legend.

On the asus eee pad transformer ...
Nothing but a blue screen.
Grabsprite gives monocolor sprites.
On this platform (honeycomb 3.2) loadsprite seems to be the only way.
Perhaps the nvidia tegra drivers has someting to do with it ?
"Sugar makes the world go 'round. Caffeine makes it spin faster."

Kitty Hello

oh my.
Try some drawsprite instead of the drawrect. It might be, that the pad does not support glColour attributes.

I think I should provide a fallback for drawing colored rectangles.

AlienMenace

#18
I have a similar tale of woe. First, everything works fairly well on my 7" HTC Flyer tablet... there are some speed issues and there really shouldn't be considering it has a 1.5GHz CPU and it has handled every game I have tried from the Market with ease. It is running Android version 2.3.3.

My Toshiba Thrive is a 10.1" tablet, running the Tegra 2 1.0GHz dual-core cpu running Android version 3.1. This tablet is dog slow.. like pathetically slow running the same code as the Flyer. To add insult to injury, sprite collisions (SPRCOLL) are working for some sprites but not for others. Great.

This same code runs perfectly on my iPad2.
It seems there are some pretty serious problems with the Android stuff.

Frustrating. Very, very frustrating.

Anyhow, here is my log:

Code (glbasic) Select

I/glbasic (15153): onCreate
I/glbasic (15153): Updating media files
I/glbasic (15153): done with updating
I/glbasic (15153): external files dir is /data/data/com.xxxxx.xxxxx/files
I/SDL     (15153): pixel format RGB_565
I/SDL     (15153): SDL_Android_Init()
I/glbasic (15153): debug works at all
I/glbasic (15153): preplic
I/glbasic (15153): lic done
I/glbasic (15153): timer
I/glbasic (15153): rbow
I/glbasic (15153): rbow init
I/glbasic (15153): SDL_init video
I/glbasic (15153): SDL_GetVideoInfo = 800x1232 @ 16 bpp
I/glbasic (15153): Setting video mode: 800x1232x16 fl=4800000
I/SDL     (15153): [STUB] GL_LoadLibrary
I/SDL     (15153): Starting up OpenGL ES 1.1
I/glbasic (15153): SDL_SetVideoMode seems to be 1
I/glbasic (15153): get accurate timer - 1st call
I/glbasic (15153): flip - 1st call
I/glbasic (15153): BGRA ext supported
I/glbasic (15153): Texture size limit: 2048
I/glbasic (15153): init fbo
I/glbasic (15153): 2D VP
I/glbasic (15153): OGRB init [OK]
I/glbasic (15153): Cptn
I/glbasic (15153): Network
I/glbasic (15153): Input
I/glbasic (15153): Window mode
I/glbasic (15153): Create DXin
I/glbasic (15153): sdl_grab
I/glbasic (15153): reptr
I/glbasic (15153): getexe
I/glbasic (15153): cd
I/glbasic (15153): set cdir to: /data/data/com.xxxxx.xxxxx
I/glbasic (15153): exepath=curdir= /data/data/com.xxxxx.xxxxx
I/glbasic (15153): set cdir to: files
I/glbasic (15153): Init Finalized
I/glbasic (15153): set cdir to: Media
I/glbasic (15153): fail StartRendering on tex 300=45
I/glbasic (15153): fail StartRendering on tex 122=10
I/glbasic (15153): fail StartRendering on tex 121=9
I/glbasic (15153): fail StartRendering on tex 301=46
I/glbasic (15153): fail StartRendering on tex 120=8
I/glbasic (15153): fail StartRendering on tex 501=55
I/glbasic (15153): fail StartRendering on tex 302=47
I/glbasic (15153): fail StartRendering on tex 253=40
I/glbasic (15153): fail StartRendering on tex 123=11
I/glbasic (15153): fail StartRendering on tex 303=48
I/glbasic (15153): Shut down GLB
I/glbasic (15153): glb is shut down
I/SDL     (15153): [STUB] GL_UnloadLibrary
Apps published: 3

Kitty Hello

oh dear!
the "fail StartRendering on tex 303=48" stuff indicates that I could not read the pixels of some sprites. That's why SPRCOLL will not work.
I have to investigate this a bit further. Also, if the speed is horribly, I think something might be wrong in my setup, yet.
When you render everything to an offscreen-surface and then paste this to the real screen -> do you get speed improvements?

AlienMenace

Hi Kitty,

I'll try that as soon as I can and will let you know what I find out.

Thanks
Steve
Apps published: 3

AlienMenace

Using:
GETSCREENSIZE screenx, screeny
CREATESCREEN 0, 0, screenx,screeny
WHILE TRUE
USESCREEN 0
{draw stuff}
USESCREEN -1
DRAWSPRITE 0, 0,0
WEND

Had the following results:

HTC Flyer - Framerate probably 50% or so slower than before.
Toshiba Thrive - Black Screen.
Windows - Ran pretty much as before.
Apps published: 3

Kitty Hello

OK, so it's not a problem with the bit depths.
Very strange why it would be so slow. Are you using polyvector for the drawings? Are you surely _not_ using a colour value in polyvector (other than RGB(255,255,255) ) and no DRAWRECT?

AlienMenace

Hi Kitty,

Not using polyvector or anything other than the standard sprite drawing commands.
I am wondering if this is a Tegra 2 or a Honeycomb issue? My HTC Flyer with the SnapDragon is not
lightning fast but it runs decently with some of the particle effects turned off and does not have
any of the sprite collision issues.

Cheers.
Apps published: 3

Kitty Hello

ah. That's the issue then. The drivers are optimized for drawing large batches of triangles at once. You really should use a polyvector drawing routine as shown in the forums.

AlienMenace

#25
Wow. So you are saying that all the sprite drawing commands in
GLB are useless on Tegra 2 tablets? What about the texture
loading errors? Does using polyvector solve that issue as well?

Thanks.
Apps published: 3

Kitty Hello

what texture loading errors?

AlienMenace

#27
Uh, these...

I/glbasic (15153): fail StartRendering on tex 300=45
I/glbasic (15153): fail StartRendering on tex 122=10
I/glbasic (15153): fail StartRendering on tex 121=9
I/glbasic (15153): fail StartRendering on tex 301=46
I/glbasic (15153): fail StartRendering on tex 120=8
I/glbasic (15153): fail StartRendering on tex 501=55
I/glbasic (15153): fail StartRendering on tex 302=47
I/glbasic (15153): fail StartRendering on tex 253=40
I/glbasic (15153): fail StartRendering on tex 123=11
I/glbasic (15153): fail StartRendering on tex 303=48

To which you replied...
the "fail StartRendering on tex 303=48" stuff indicates that I could not read the pixels of some sprites. That's why SPRCOLL will not work.
I have to investigate this a bit further.

I think you need to take a look at your code and how it handles Tegra 2 stuff as the sprite loading issues only crops up on my Tegra 2 device and not my other droid tablet, my PC, or either of my iPads running the exact same code.
Apps published: 3

Kitty Hello


AlienMenace

Thanks for checking into this, really appreciated.
Apps published: 3