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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - madcat

Pages: [1] 2
1
Graphics / Re: SFML Android - RenderTexture Problem
« on: September 28, 2017, 04:25:49 pm »
What settings do you get when you call getSettings() on the window?

result when run in Android Studio emu.

depthBits=0x18
stencilBits=0x8
antialiasingLevel=0
majorVersion=0
minorVersion=0
attributeFlags=0x0
sRgbCapable=0
 

bonus dump from Android emu Monitor

[ 09-28 16:42:41.889 11728:11768 W/         ]
                                                                   Unrecognized GLES max version string in extensions: ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1
09-28 16:42:41.891 11728-11768/sfml.example.app D/EGL_emulation: eglCreateContext: 0xaa032b80: maj 1 min 0 rcv 1
09-28 16:42:41.891 11728-11768/sfml.example.app D/EGL_emulation: eglMakeCurrent: 0xaa032b80: ver 1 0 (tinfo 0xaa00b3e0)
09-28 16:42:41.892 11728-11768/sfml.example.app E/eglCodecCommon: glUtilsParamSize: unknow param 0x0000821b
09-28 16:42:41.892 11728-11768/sfml.example.app E/eglCodecCommon: glUtilsParamSize: unknow param 0x0000821c
09-28 16:42:41.893 11728-11768/sfml.example.app E/eglCodecCommon: glUtilsParamSize: unknow param 0x0000821e
09-28 16:42:41.893 11728-11768/sfml.example.app E/eglCodecCommon: glUtilsParamSize: unknow param 0x00009126
09-28 16:42:41.893 11728-11768/sfml.example.app E/eglCodecCommon: glUtilsParamSize: unknow param 0x0000821b
09-28 16:42:41.899 11728-11768/sfml.example.app D/EGL_emulation: eglMakeCurrent: 0xaa032b80: ver 1 0 (tinfo 0xaa00b3e0)
09-28 16:42:41.902 11728-11768/sfml.example.app D/EGL_emulation: eglCreateContext: 0xaa032be0: maj 1 min 0 rcv 1
09-28 16:42:41.902 11728-11768/sfml.example.app E/libEGL: call to OpenGL ES API with no current context (logged once per thread)
09-28 16:42:41.902 11728-11768/sfml.example.app I/sfml-error: Warning: The created OpenGL context does not fully meet the settings that were requested
09-28 16:42:41.902 11728-11768/sfml.example.app I/sfml-error: Requested: version = 1.1 ; depth bits = 0 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false ; sRGB = false
09-28 16:42:41.902 11728-11768/sfml.example.app I/sfml-error: Created: version = 0.0 ; depth bits = 24 ; stencil bits = 8 ; AA level = 0 ; core = false ; debug = false ; sRGB = false
09-28 16:42:41.902 11728-11768/sfml.example.app I/sfml-error: Failed to activate the window's context
09-28 16:42:41.902 11728-11768/sfml.example.app I/sfml-error: Failed to activate the window's context
09-28 16:42:41.902 11728-11768/sfml.example.app I/native-activity: depthBits=0x18, stencilBits=0x8, antialiasingLevel=0, majorVersion=0, minorVersion=0, attributeFlags=0x0, sRgbCapable=0
09-28 16:42:41.904 11728-11768/sfml.example.app D/EGL_emulation: eglMakeCurrent: 0xaa032b80: ver 1 0 (tinfo 0xaa00b3e0)
09-28 16:42:41.924 11728-11768/sfml.example.app I/chatty: uid=10085(u0_a85) sfml.example.app identical 4 lines
09-28 16:42:41.924 11728-11768/sfml.example.app D/EGL_emulation: eglMakeCurrent: 0xaa032b80: ver 1 0 (tinfo 0xaa00b3e0)
09-28 16:42:41.930 11728-11768/sfml.example.app D/EGL_emulation: eglCreateContext: 0xaa032ca0: maj 1 min 0 rcv 1
09-28 16:42:41.932 11728-11768/sfml.example.app D/EGL_emulation: eglMakeCurrent: 0xaa032ca0: ver 1 0 (tinfo 0xaa00b3e0)
09-28 16:42:41.932 11728-11768/sfml.example.app E/eglCodecCommon: glUtilsParamSize: unknow param 0x0000821b
09-28 16:42:41.939 11728-11768/sfml.example.app E/eglCodecCommon: glUtilsParamSize: unknow param 0x0000821c
09-28 16:42:41.941 11728-11768/sfml.example.app E/eglCodecCommon: glUtilsParamSize: unknow param 0x0000821e
09-28 16:42:41.941 11728-11768/sfml.example.app E/eglCodecCommon: glUtilsParamSize: unknow param 0x00009126
09-28 16:42:42.000 11728-11768/sfml.example.app D/EGL_emulation: eglMakeCurrent: 0xaa032be0: ver 1 0 (tinfo 0xaa00b3e0)

2
Graphics / Re: SFML Android - RenderTexture Alpha Problem - It gets weirder.
« on: September 28, 2017, 03:43:08 pm »
I had a friend run the .apk on his mobile - Android 7.0 (5 février 2017)
and the result is even more dumbfounding!

the RenderTextured Sprite doesn't even appear:o

3
Graphics / Re: SFML Android - RenderTexture odd behaviour?!
« on: September 27, 2017, 09:05:49 pm »
Ok, I expected to get the same result for drawing the Sprite set with the RenderTexture
and the Shapes directly.

It seems to be specific to Android.

I tried on OSX/IOS, no problemo, see attached pic (OSX screenshot).

btw, this is the result I expected for Android (draw(Sprite(RenderTexture)) = Draw(direct))
 :'(

4
Graphics / SFML Android - RenderTexture Problem
« on: September 27, 2017, 08:40:20 pm »
Why do I have two different visual results for
  • the Shapes
  • the RenderTexture dump with a Sprite

the screenshot is taken from the Android Emulator (API 26), app launched through Android Studio
using SFML 2.4.2

not the difference of blending of the top (white, alpha = 50%) square on the grey square (grey 50% alpha=100%)
  • the left group is drawn using a RenderTexture applied to a Sprite
  • the right group is drawn directly
min code
void App::loop()
  {
    // FULLSCREEN mode + autoRotate ON
    sf::RenderWindow window(sf::VideoMode::getFullscreenModes().front(), "Alpha-WeirdAlpha", sf::Style::Fullscreen | sf::Style::Resize);

    // simple
    sf::RectangleShape rbg(sf::Vector2f(400.f, 400.f));
    rbg.setFillColor(sf::Color(0x808080FF));
    rbg.setPosition(50.f, 50.f);
    sf::RectangleShape rfg(sf::Vector2f(200.f, 200.f));
    rfg.setFillColor(sf::Color(0xFFFFFF80));
    rfg.setPosition(25.f, 25.f);

    // create render texture
    sf::RenderTexture rt;
    rt.create(500, 500);
    rt.clear(sf::Color(0x00000000));
    rt.setSmooth(true);

    rt.draw(rbg);
    rt.draw(rfg);

    rt.display();

    sf::Sprite sprRT(rt.getTexture());

    rbg.move(500.f,0.f);
    rfg.move(500.f,0.f);

    sf::View view = window.getDefaultView();

    while (window.isOpen())
    {
      sf::Event event;

      while (window.pollEvent(event))
      {
        switch (event.type)
        {
          case sf::Event::Closed:
            window.close();
            break;
          case sf::Event::Resized: {
            view.setSize(event.size.width, event.size.height);
            view.setCenter(event.size.width / 2, event.size.height / 2);
            window.setView(view);
          } break;
          default: break;
        }
      }

      window.clear(sf::Color(0x80a0f0ff));
      window.draw(rbg);
      window.draw(rfg);
      window.draw(sprRT);
      window.display();
    }
  }

source code here http://github.com/MoVoDesign/SFML_Android_RenderTexture.git

5
General / Re: SFML and Android how to get internalDataPath?
« on: September 09, 2017, 10:31:29 pm »
well... I missed it  ;D
it was right there in front of me in SFML/System/NativeActivity.hpp

  ANativeActivity* na = sf::getNativeActivity();
  LOGI("[PATH]=[%s]", na->internalDataPath);
 

6
General / SFML and Android how to get internalDataPath?
« on: September 09, 2017, 05:25:15 pm »
Hi everyone,

Using the NDK,
I'm trying to get the Activity's internal Data Path from main(arg, argv)

 

int man(int arg, char **argv)
{
  // here I want activity->internalDataPath
  string path( /* ??? */ );
  ...  
}
 
in main(argc, argv)

I've changed MainAndroid to send it as an argument to a mainAndroid(const char* s)
but it's sort of nasty...
is there any clean way?

I've seen this post as well https://en.sfml-dev.org/forums/index.php?topic=13716.240 but it's also a bit violent.

Anybody knows a way that doesn't require modifying the SFML source code?

 :o(power2)



7
General discussions / Re: SFML in Android Studio Example
« on: September 04, 2017, 09:14:49 pm »
All right! We are getting there! Thanks Alia5!!!  ;D

Just modified Template + HowTo (SFML + Android + OSX)
including building SFML for Android with c++_shared STL and ndk-r12b

you can find it here: https://github.com/MoVoDesign/SFML_Template

Added: use of symbolic links in HowTo, to avoid copying libs all over the place.

8
General discussions / Re: SFML in Android Studio Example
« on: September 04, 2017, 08:40:26 pm »
good one, I did, you'll find it at the top of my code

Meanwhile it hit me as I chatted with a friend about the absurdity of so many STL implementations:

STLPORT is from 2008... so NO smart pointers:o

I rebuilt SFML with GNUSTL instead

cmake -DANDROID_ABI=x86 -DCMAKE_TOOLCHAIN_FILE=$SFML/cmake/toolchains/android.toolchain.cmake -DCMAKE_FIND_FRAMEWORK="NEVER" -DANDROID_STL=gnustl_shared $SFML
 

and defined it in build.gradle (module: app) as well
defaultConfig {
  externalNativeBuild {
    cmake {
      cppFlags "-std=c++11 -fexceptions -frtti"
      arguments '-DANDROID_STL=gnustl_shared'
    }
  }
}
 

and TADA!  ;D

now back to TacWars

9
General discussions / Android / stlport_shared and C++11 unique_ptr<>
« on: September 04, 2017, 05:16:52 pm »
...Hello again.

Now that I've got SFML working, I realise that the android C++11 STL support is rather shoddynamely:
here is the trouble: unique_ptr

this is the minimal example I've been working on.
Can't compile this while linking with SFML.

#include <memory>
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>

int main(int argc, char *argv[]) {

  std::unique_ptr<sf::RenderWindow> upW(new sf::RenderWindow(sf::VideoMode::getDesktopMode(), "OMG!!!"));
  sf::RenderWindow& window = *upW;

  sf::View view = window.getDefaultView();

  while (window.isOpen())
  {
    window.clear(sf::Color::Black);
    window.display();
  }
}
 

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:externalNativeBuildDebug'.
> Build command failed.
  Error while executing process /Users/lio/Library/Android/sdk/cmake/3.6.4111459/bin/cmake with arguments {--build /Users/lio/StudioProjects/SFML_Template/app/.externalNativeBuild/cmake/debug/armeabi --target my-app}
  [1/2] Building CXX object CMakeFiles/my-app.dir/main.cpp.o
  FAILED: /Users/lio/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++  --target=armv5te-none-linux-androideabi --gcc-toolchain=/Users/lio/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/lio/Library/Android/sdk/ndk-bundle/sysroot  -Dmy_app_EXPORTS -I/Users/lio/StudioProjects/SFML_Template/app/src/main/cpp/../../../../sfml/include -isystem /Users/lio/Library/Android/sdk/ndk-bundle/sources/cxx-stl/stlport/stlport -isystem /Users/lio/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gabi++/include -isystem /Users/lio/Library/Android/sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi -D__ANDROID_API__=15 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security  -std=c++11 -fexceptions -frtti -O0 -fno-limit-debug-info  -fPIC -MD -MT CMakeFiles/my-app.dir/main.cpp.o -MF CMakeFiles/my-app.dir/main.cpp.o.d -o CMakeFiles/my-app.dir/main.cpp.o -c /Users/lio/StudioProjects/SFML_Template/app/src/main/cpp/main.cpp
  /Users/lio/StudioProjects/SFML_Template/app/src/main/cpp/main.cpp:18:8: error: no member named 'unique_ptr' in namespace 'std'
    std::unique_ptr<sf::RenderWindow> upW(new sf::RenderWindow(sf::VideoMode::getDesktopMode(), "OMG!!!"));
    ~~~~~^
 

any idea?

10
General discussions / Re: Android Studio 2.3.3 + SFML 2.4.2 - Hell again.
« on: September 03, 2017, 01:04:13 pm »
thanks.  ;D

You actually did it maybe 30 minutes before I completed my version.
So I started sniffing around your code and checked out what you did differently.

Short of the way we link libraries and a rather shorter and nicer way of linking sfml-main in your case it was about the same thing. So here is mine, and thanks a lot for your answer!

https://github.com/MoVoDesign/SFML_Template

 

11
General discussions / Re: SFML in Android Studio Example - Android on OSX
« on: September 03, 2017, 12:59:09 pm »
Well Done!

I've actually just released a template + Method for SFML for Android (With Android Studio) developing on OSX!

I tried to simplify the process to the core. Give it a check.
I had problems with link_directories it seems to be rather restrictive on OSX.
so I defined each and every external lib like the google dudes do in the Hello-libs example. Works nicely.

check out https://github.com/MoVoDesign/SFML_Template

and this is what I'm going to port to Android Now!!! http://www.movo-design.com

;) Lio

12
General discussions / Android Studio 2.3.3 + SFML 2.4.2 - Hell again.
« on: August 26, 2017, 02:26:03 pm »
Hi You All,

has anyone had any success building a minimal SFML example that can actually be built and run on the emulator?

I've tried the tutorial on GitHub (here: https://github.com/SFML/SFML/wiki/Tutorial:-Building-SFML-for-Android) - with no success since those **** people at Google decided to force you to go through their ugly IDE: Android Studio.

So I've spent so far 36h on the problem and I believe that I'm getting closer: the best lead I've found so far is here in the forum and t AlexAUT's SFML-AndroidStudio-Template (here: https://github.com/AlexAUT/SFML-AndroidStudio-Template).

There's also a this basic yet rather rich article on dev.android: https://developer.android.com/studio/projects/add-native-code.html#create-sources

So I started from these places and I am painfully trying to merge two of their examples
  • Native Activity - using <android_native_app_glue.h>
  • Native Lists (Hello libs)[/i]

from there I hope to find a way to bring in the static and shared libs for SFML.

did I mention that Java irks me?
Any clue is welcome!


13
SFML projects / Re: TacWars a puzzle/RPG
« on: August 23, 2017, 03:29:23 pm »
Timeline for a Windows port.
Good question. I'm presently spending most of my free time on he Android port.
I guess Windows will come after that and shouldn't be too difficult.
I must say that I haven't used Windows in 10 years... wondering if I can install it as an alt os on my mac.
so sorry... no fixed date!
thanks for your interest though!

14
General / Re: Extlibs sources?
« on: August 22, 2017, 05:22:25 pm »
Thanks, you all!
my mistake was to do the search on Git first and to end up with 9999+ clones of the jpeg libs...
it completely eluded me that I could go to the main websites.

It often takes a while to do thinks simply when you're in the midst of some tedious stuff!  ;D

15
SFML projects / TacWars a puzzle/RPG using SFML for IOS/OSX
« on: August 22, 2017, 04:25:19 pm »
TacWars
Armed with Axes, Bows and Magic, you lead an army of brave Dwarven Warriors to battle against ugly Goblins and spooky Skeletons in this addictive Puzzle/RPG. Steal Tactics from your Enemies and unleash their power on the battlefield for maximum impact!

key features:
- A Match 3 Puzzle Game. Use your skill to match tokens creatively to outwit your enemy.
- Collect up to 20 special attacks to destroy your opponents.
- RPG fans can gain experience from wins and strengthen their armies.
- Confront enemies with different levels of intelligence, from the daft to obnoxiously shrewd.
- Adorable characters with cartoony violence at every slash and turn!
- Option to play in story mode or in duel mode with an interesting array of baddies.

More on http://movo-design.com

Available now for MacOSX and IOS on iTunes App Store and Mac Apple Store

Android and Windows ports under development...

Pages: [1] 2
anything