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

Author Topic: Questions for Android platform  (Read 2694 times)

0 Members and 1 Guest are viewing this topic.

PadthaiFan

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Questions for Android platform
« on: September 03, 2015, 04:15:06 pm »
Hi all,

I want to make 3D games for Android but I need some of your advices. I have 3 questions :

1. Just for curiosity, I am wondering how the SFML example is working with pure native code without any Java code that I thought was mandatory for building an Android app.

2. I want to use OpenGL ES 2 or 3 for my games but I read that SFML uses OpenGL ES 1 to work. Can I use an SFML 2D interface on top of a OpenGL ES 2 or 3 scene without any risk of crashes ?

3. I sucessfully built the SFML example with Eclipse but I have problems with other IDEs. Does anyone have a fully functionnal Android Studio project with Gradle working or at least an Nvidia AndroidWorks project on Visual Studio ?

Thanks in advance

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Questions for Android platform
« Reply #1 on: September 03, 2015, 09:50:35 pm »
1. Android supports both, activities implemented in Java as well as "Native Activities" implemented in native code.

2. That should be possible, although I haven't tried it yet. Not sure whether you'd have to modify SFML's context creation.

3. You should be able to create an Nsight Tegra for VS project based on existing code (using the example app).

PadthaiFan

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: Questions for Android platform
« Reply #2 on: September 03, 2015, 10:26:25 pm »
Thank you for your reply  :D,

I tried importing the project in VS using Nsight Tegra, but I got include issues "SFML/System.hpp: No such file or directory" and so on for every includes. So I added an additional include directory but I still have include issues. I may be wrong but I thought that the Android.mk file loaded the SFML module including include files with this line :

$(call import-module,sfml)

but this doesn't seems to work in VS.

How can I solve this includes errors ?

Thanks a lot for your help ^^

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: Questions for Android platform
« Reply #3 on: September 04, 2015, 05:49:00 pm »
Well... Some time ago I began experiments with Android/VS/Gradle without SFML, but based on some ideas from it. I can share the sources, but there now broken Android build because I converted project to VS2015 but Nsight Tegra from Android Works does not suppot it yet (but will soon). So, if you want to see my variant of C++/VS/Android - write to pm.