× Third party announcements.
If you want to share with others your project or applications, build with CT, you can do it here.

Question sdl2 windows and android

  • luis santos
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 3 months ago - 7 years 3 months ago #4748 by luis santos
sdl2 windows and android was created by luis santos
hello friends,
in recent months I have worked with in sdl2 with freepascal on android compiled from (codetyphon) this way came to the conclusion that Native give me better results than java.
I compiled sdl2 sdl2_image sdl2_mixer and sdl2_ttf all in one dll for Windows and separate (.so) for android.
the next step is to compile for Ubuntu .
on this pack i have one demo using sdl2 sd2_image and sdl2_ttf on my experia x8 have 55 fps ;)
and 20 on BlueStacks.

(DOWLOAD)
(windows dll with demo) app.box.com/s/wcvfaw1huwpa011t9re8
(andoid bin demo) app.box.com/s/906nasyoewfk6x96dpq4

File Attachment:

File Attachment:



my game (sdl + glEs) (200 particles and tile map) on my device i have 45 fps
File Attachment:
Attachments:
Last edit: 7 years 3 months ago by luis santos.

Please Log in or Create an account to join the conversation.

More
7 years 3 months ago #4751 by kenlee
Replied by kenlee on topic sdl2 windows and android
I ran your android version on a Tegra 2 phone and a Tegra 4 tablet. Attached are screenshots.
The Tegra 2 phone gives 59 FPS. It's surprising that the Tegra 4 machine, which I suppose to have a much better performance than Tegra 2, gives just 60-61 FPS.

BTW, did you try getting a GLScene sample running on Android?

Attachments:

Please Log in or Create an account to join the conversation.

More
7 years 3 months ago #4752 by Marius
Replied by Marius on topic sdl2 windows and android
The Android GPU is capped at 60 FPS to save battery. You will not get above this results without disabling vsync.

Please Log in or Create an account to join the conversation.

More
7 years 3 months ago #4754 by kenlee
Replied by kenlee on topic sdl2 windows and android
thanks mdalacu for the note. I'm new to android development. I quickly look up on the web and did this change in a terminal as root user on my phone (I installed a custom ROM, and there's already a terminal installed):

sys/module/dc/parameters/no_vsync
Change from 0 to 1.

FPS went up slightly from 59 to 61. Not sure if that change really did that or not.

The tablet is not mine so I do not want to mess with root access on it.

Please Log in or Create an account to join the conversation.

  • 4aiman
  • 4aiman's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Comix creator
More
7 years 2 months ago #4787 by 4aiman
Replied by 4aiman on topic sdl2 windows and android

ideabrush wrote: BTW, did you try getting a GLScene sample running on Android?

I'm interested about that too. :)

コンソールマニアック

Please Log in or Create an account to join the conversation.