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 - Kori

Pages: [1] 2
1
General / Re: android build c++11 features
« on: January 26, 2016, 10:23:04 pm »
I know that this is compiler issue, but i am using an android example. I don't really know at all how to change compiler on NDK or change default std/stl implementation on my own.

2
General / android build c++11 features
« on: January 26, 2016, 10:09:06 pm »
Working on android port of sfml i find two problems:

1. Why i have't function like std::bind (only bind1st) ot std::make_unique (make_shared is present).
2. Trying to implement SceneGraph structure from SFML Game Development book - unique pointer polymorphism:
class Base;
class Derived : public Base;
 
std::unique_ptr<Derived> der (new Derived);
 
std::unique_ptr<Base> bas (new Base);
 
 
bas = std::move(der);  
 
-- Works
 
void foo ( std::unique_ptr<Base> ptr);
 
foo(std::move(der));
 
-- this giving me error!

3
General discussions / Re: Android and iOS ports available for testing
« on: December 27, 2015, 12:07:00 am »
img.saveToFile("file.png");

not working for me. In LogCat is wrote "failed to save image". I am testing it on android.
If someone have time, pleas check it, because i don't know that this is my mistake or sfml bug.

4
Feature requests / Re: Output streams
« on: December 26, 2015, 09:43:58 pm »
I probably shouldn't post here (feel like mosquito between tigers), please delete this post after some time to keep topic clean, but imo Output stream is one of the most needed feature in sfml. It can be nice to have possibility of easy save edited in game texture,  however i think mostly about save states, especially on mobile devices. I personally spend over one month trying to make save function on android, using almost every tools in range (including editing whole library, to extract ANativeActivity <to get internal path> into main function). I really hope, that they will be available in near feature.

5
General / SFML android port debugger
« on: December 25, 2015, 09:04:04 pm »
Hi,
i am trying to debug my android-sfml application by over two weeks using eclipse and GDB. In result console give me usually:

" warning: Could not load shared library symbols for 137 libraries, e.g. /system/bin/linker. Use the "info sharedlibrary" command to see the complete listing. Do you need "set solib-search-path" or "set sysroot"? warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code. Could not AssignProcessToObject"

or error like "cannot acces to memory 0x1" etc.. The debug process in debug view is tagged as <terminated> with status -1. Here is my configuration:



Does anyone here use eclipse and have working debugger? If yes then i will be very thankful if he/she post her debug configuration. Maybe you prefer other IDE for making sfml-android game with easier to handle debugger?

6
General / Re: android - i/o file
« on: October 17, 2015, 04:16:41 pm »
No, hardcoded path is imo bad idea. After sleep on in, i can't figure all possibly path on all android devices. I just sit down and wait for commit or try to read value from /proc/pid/cmdline. Better be patient than loosing another week on google research.

@BIG EDIT
Sorry,your pain in neck back for a moment. I promise, it's last time in this month (probably).

IT'S ALIVE. It's looking awful but works. SFML code is more readable than I guess. Brutally added NativeActivity pointer solve the problem. But...
Now i can't run it on IOS, right? I need last simply/short answer, is it will be hard to recompile it for Iphone ?

7
General / Re: android - i/o file
« on: October 16, 2015, 10:16:36 pm »
I can't wait, you are doing awesome job (whole SFML team) :).

short (hope last) question:
Quote
You should be able to use usual file streams,
Now or using possibility of access to NativeActivity in future? If now, i just can't solve the right path.
Thank you for your help.

8
General / Re: android - i/o file
« on: October 16, 2015, 01:50:48 pm »
   
I already had something like that:
     
(click to show/hide)

Modifying code is out of range of my newbie skills, especially in NDK. Last thing which I do, will be rewrite code on other system. My Windows is pretty freakish.

9
General / Re: android - i/o file
« on: October 16, 2015, 12:03:17 pm »
It's a standard segfault, because i am trying to open non-existing file.

http://stackoverflow.com/questions/11294487/android-writing-saving-files-from-native-code-only
Yes, that's the answer, but i don't know how to implement it. Changing default int main with  void android_main(struct android_app* state) and moving this into NatwiveActivity.cpp throw
 "Description   Resource   Path   Location   Type
make.exe: *** [obj/local/armeabi-v7a/libsfml-example.so] Error 1   NativeActivity          C/C++ Problem"

If my logic is proper, android_app must be taken from main function, and is required to get file path.

So, easy fopen() won't be working? I must do it using NDK API? It's much harder than making game on PC....

10
General / Re: android - i/o file
« on: October 15, 2015, 09:53:14 pm »
Testing on 2.3.7 and 4.4.2.
I try both, with externalDataPath  and externalDataPath.
To combine the default path with my file name i write something like that:
strcpy(name,asset->internalDataPath);
strcat(name, "/cnf.png");

I also trying just "/data/data/com.example.sfml/cnf.png", "/sdcard/cnf.png" and other similar path.

.png extension is to prevent file from being compressed. Also tested with .mp3, .txt, and without any extension.

Next, I was trying to read using ">>" from c++ or fscanf(stream, "%s", var"); from C
Always result is same,  crash with lovely SIGSEGV when reading starts. My "cnf" file is in assets folder and in main project folder. Now, I have't any concept how write/read function should looks like.

I hope you understand me,really sorry if something sounds unfriendly/unkindly, I still don't operate English very well.


11
General / android - i/o file
« on: October 15, 2015, 08:56:20 pm »
I know, this is not android forum, but after three days and nights i want to try everything.

My sfml/android test game is almost done. Last thing is game save state. But i have totally no idea how to implement it. I already tried C stdio.h and c++ streams, getting path from ANativeActivity::externalDataPath
and much more. Is it possible at all to read/write a .txt file using only ndk? Thanks in advance.

12
General discussions / Re: Android and iOS ports available for testing
« on: October 13, 2015, 11:37:02 am »
I'm testing it on android 4.4.2. On newer (5.x) or older (2.3.3) with physical button it's working.
Adding sf::Style::Fullscreen doing nothing.

13
General discussions / Re: Android and iOS ports available for testing
« on: October 13, 2015, 10:48:00 am »
Excellent work, until now everything works fine. Only i don't know how to hide navigation bar (this on bottom) on tablet devices. Anyone help?

14
General / Re: SFML normal map lights shader, attribute input
« on: September 17, 2015, 10:49:22 pm »
I use @SpeCter version and works perfect. Now only implement it to drawing on my game Rendertexture and merge with something like ltbl. Anyway, thanks you very much!

15
General / SFML normal map lights shader, attribute input
« on: September 16, 2015, 11:23:25 pm »
Hi,
I am actually trying to implement a normal map lights into my project. Unfortunately, needful vert shader require some "attribute" variable. As far as i can see, SFML don't support it. Raw OpenGL can be good solution, but I stuck right after create "glCreateShader(GL_VERTEX_SHADER)" and fill it up with " shader.getNativeHandle()". My idea with drawing the dynamic lights on separate RendeTexture using OGL and these shaders, and next drawing this texture to my window is pretty difficult. Is it possible at all? If is, can anyone help me with this? Or maybe easier will be write my own shader using only uniform? 

this is the part of this shader:
//"in" attributes from our SpriteBatch
attribute vec2 Position;
attribute  vec2 TexCoord;
attribute vec4 Color;

Pages: [1] 2