Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Android and iOS ports available for testing  (Read 300282 times)

0 Members and 1 Guest are viewing this topic.

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Android and iOS ports available for testing
« Reply #150 on: April 19, 2014, 08:00:41 pm »
sf::VertexArray should work, I've been using it myself. You just can't use Quads. Is it possible that you're using them?

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: Android and iOS ports available for testing
« Reply #151 on: April 19, 2014, 08:21:06 pm »
No, i'm using all sorts of Triangles.

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: Android and iOS ports available for testing
« Reply #152 on: April 20, 2014, 10:23:02 am »
I tested sf::Font in  "example" - it does not work, i don't know why yet. Transparency in test sprite does not work too. Just clear window with non-white color - it is immediately obvious.

    loadLibrary("sfml-system", lJNIEnv, ObjectActivityInfo);
    loadLibrary("sfml-window", lJNIEnv, ObjectActivityInfo);
    loadLibrary("sfml-graphics", lJNIEnv, ObjectActivityInfo);
    loadLibrary("sfml-audio", lJNIEnv, ObjectActivityInfo);
    loadLibrary("sfml-network", lJNIEnv, ObjectActivityInfo);
In debug build this code is incorrect.

Retrived sf::Err() output:
sf::Quads primitive type is not supported on OpenGL ES platforms, drawing skipped
Indeed, Mario, somewhere i'm using quads. But this is only part of render problems.
« Last Edit: April 20, 2014, 04:12:40 pm by ChronicRat »

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Android and iOS ports available for testing
« Reply #153 on: April 20, 2014, 04:09:58 pm »
Yes, fonts are broken for me as well.

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: Android and iOS ports available for testing
« Reply #154 on: April 20, 2014, 04:48:54 pm »
Fonts and transparency, Mario! No transparency everywhere, in all gfx objects.

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Android and iOS ports available for testing
« Reply #155 on: April 20, 2014, 04:52:13 pm »
Ah, didn't use transparency so far. That might actually be the same issue then (didn't check whether it's glyph rendering to textures or the rendering to screen). At least glyph dimensions are correct.

Sonkun

  • Full Member
  • ***
  • Posts: 241
    • View Profile
Re: Android and iOS ports available for testing
« Reply #156 on: April 20, 2014, 06:27:51 pm »
I fixed sf::Font.

For the transparency issue, in file src/SFML/Graphics/GLExtensions.hpp line 37, you can replace "GL_OES_blend_func_separate" with "false". It shoudl fix your issue. I don't know yet the proper fix.
Interested in using SFML with Python ? Try out its Python binding!

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: Android and iOS ports available for testing
« Reply #157 on: April 20, 2014, 07:29:05 pm »
Thanks, now it's much better:


Now i have two questions: what to do with notification zone? Iit eats part of screen, where i have buttons. How to react on screen rotation? Need i to do it myself or it will be SFMLES's job?

But first of all it is necessary to LostFocus/GainedFocus events.
« Last Edit: April 20, 2014, 07:39:16 pm by ChronicRat »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Android and iOS ports available for testing
« Reply #158 on: April 20, 2014, 07:56:01 pm »
Screen rotation should be nothing more than a resize event. If Jonathan did it like on iOS, it should work out of the box.
Laurent Gomila - SFML developer

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: Android and iOS ports available for testing
« Reply #159 on: April 20, 2014, 08:02:58 pm »
Oh, i was not tested game with single threaded mode. It can't active RenderContext after resize, so if in single threaded will be ok then it is my fault.
upd: Nope, single threaded can't activate context too.
« Last Edit: April 20, 2014, 08:10:12 pm by ChronicRat »

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Android and iOS ports available for testing
« Reply #160 on: April 20, 2014, 08:45:58 pm »
Screen rotation should be nothing more than a resize event. If Jonathan did it like on iOS, it should work out of the box.
It worked before, but with the latest version my screen freezes sometimes (with the example app). Going to standby and back on the phone reacts again but the SFML screen stays black. Doesn't seem to happen all the time though. Didn't have time to try to track it down so far.

But yes, overall, rotation should be a resize event and it worked before.

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: Android and iOS ports available for testing
« Reply #161 on: April 21, 2014, 01:12:11 pm »
Must sf::RenderTexture work in SFMLES?

Sonkun

  • Full Member
  • ***
  • Posts: 241
    • View Profile
Re: Android and iOS ports available for testing
« Reply #162 on: April 21, 2014, 01:31:20 pm »
sf::RenderTexture works for me.

As for the resize event bug, I'm working on it :)
Interested in using SFML with Python ? Try out its Python binding!

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: Android and iOS ports available for testing
« Reply #163 on: April 21, 2014, 01:37:17 pm »
Ok, and by the way VirtualKeyboard works only for latin text.

If i'll catch bug with sf::RenderTexture - i'll inform.
« Last Edit: April 21, 2014, 06:47:30 pm by ChronicRat »

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: Android and iOS ports available for testing
« Reply #164 on: April 22, 2014, 09:23:32 am »
After merging ios_and_android with master fonts are broken again.
And AKEYCODE_DEL must be returned as backspace.