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

Author Topic: Shaders on Android  (Read 2116 times)

0 Members and 1 Guest are viewing this topic.

r_y_n_o

  • Newbie
  • *
  • Posts: 2
    • View Profile
Shaders on Android
« on: March 25, 2016, 09:28:08 pm »
I'm making a game, and I'm using shaders.
Today I tried to compile for android and everything crashed.
After a lot of debugging with the logcat, I noticed that shaders were failing to be loaded.
So I went to the source code of SFML and notice that when SFML_OPENGL_ES is defined, all the shaders functions just return false, and nothing else.

Why is that? I mean, shaders are supported since 2.0, shouldn't it be supported by sfml? Online I've seen examples of people using shaders on android with sfml, so I guess there is a way....

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Shaders on Android
« Reply #1 on: March 26, 2016, 09:13:55 am »
SFML uses OpenGL ES 1.1 on Android, which doesn't support shaders. So no there's no way, and you can't have seen SFML apps using shaders on Android ;)
Laurent Gomila - SFML developer

r_y_n_o

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Shaders on Android
« Reply #2 on: March 26, 2016, 02:53:23 pm »
You should at least document it...

I spent a day trying to figure out the problem, it is not mentioned anywhere in the docs... I mean, it's probably the most relevant information you should give...

Also I had to figure out by myselft that QUADS are not supported by looking at the source code

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Shaders on Android
« Reply #3 on: March 26, 2016, 04:35:47 pm »
Yeah, sorry for the lack of support. Mobile ports are still experimental (or even unmaintained, for iOS), so they have no official documentation yet.
Laurent Gomila - SFML developer