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

Pages: [1] 2 3 ... 27
1
General / Re: GPU usage permanently jumps up after a while
« on: July 09, 2020, 02:55:56 pm »
Have you tried the same experiment with a blank game loop? Just pollEvents() followed by clear/display.

Does you CPU go into a lower power state when the increase in utilization occurs? Maybe the CPU just lowers its clock speed and therefore the utilization goes up. I am not sure if the windows task manager takes the clk speed into account when calculating the %.

2
General / Re: sf::PrimitiveType is unscoped warning in VS 2k19
« on: June 25, 2020, 08:47:33 am »
In C++11 "enum class" was introduced to fix some problems of traditional enums. Type safety and scoped identifiers polluting the global namespace but now has some problems of its own  :P. Here is an example.

SFML was written before C++11 and it still does not uses features of it for backwards compatibility. So you cannot really fix the warning without rewriting SFML, which I do not recommend. Maybe there is a compiler switch to turn off this warning since you now know about "enum classes"  :D


3
General discussions / Re: Build with arm64-v8a and link in CMAKE
« on: May 04, 2020, 07:25:44 pm »
I am not familiar to the firebase stuff (crashlytics), but the error message does not really give any information abrout the crash, apart from it being a SEGFAULT (nullptr access).

Have you tried a debug build and launching the application with the debugger? This should give you more information about where the crash is happening.

4
General discussions / Re: Build with arm64-v8a and link in CMAKE
« on: May 03, 2020, 02:17:10 pm »
What error messages do you get in the logcat output when running your app?

Which android ndk version do you use?

Unzip the .apk and check if the shared libraries (.so files) are included under libs/abi/

5
General / Re: cannot build sfml for android
« on: March 25, 2020, 05:53:34 pm »
ndk ver. 21

The ndk had some breaking changes in version 21 or 20, not sure which one. So the SDK manager does also provide an older NDK version which you can use for now, which works for SFML. It seems like they changed the paths findPackage looks for and therefore older cmake code breaks.
To fix this you could remove the findPackage call for android and just link gles directly, since it is guaranteed to be provided by the NDK anyway.

This problem is caused by the lack of "GLES" directory in /usr/include.
This path should not matter since the android toolchain should not look at your host system's header files which may/will be different to the one the actual GLES shared library was created from.

6
Graphics / Re: Shaking the Camera
« on: January 24, 2020, 12:32:35 pm »
You can try something like this: https://gamedev.stackexchange.com/a/47565

7
Graphics / Re: Crash after using sf::Text
« on: January 23, 2020, 11:06:00 am »
Probably you are accessing a variable through pointer/reference which is not "alive" anymore. Difficult to guess without seeing your new code.

8
Graphics / Re: Crash after using sf::Text
« on: January 21, 2020, 09:53:57 pm »
Maybe you are mixing debug/release binaries? Make sure you link against the *-d sfml libs for debug builds and the non post-fixed ones for release builds.

A general C++ advice : use std::array<sf::Text, 3> instead of a C-style array. Makes your life easier since you can use .size() etc. to make your code less bug prone.

9
Graphics / Re: Crash after using sf::Text
« on: January 21, 2020, 02:35:19 pm »
Could you post a minimal working example showing your error? This way we can make sure it is not a coding mistake  :)

10
Based on the SFML example used in the wiki post you have to make the following adjustments:

  • Adding your source files here
  • Compiling Box2D for android and installing it into the third party lib of your NDK installation. I have not done it, but Box2D provide a cmake script which should make this easier. You can try the same cmake command as for building sfml from the wiki post you have posted.
    Another possibilty can be found here, this may be outdated since it is from 2013.
  • Link Box2D like sfml is linked here. This is not needed for the tutorial I linked in the previous step.

Best,
Alex

11
General discussions / Re: Android x64 support
« on: April 22, 2019, 09:34:14 pm »
Yes the dependencies are missing for 64bit, there is already a github issue: https://github.com/SFML/SFML/issues/1507

12
General / Re: Compiling SFML program with CMake on windows
« on: October 30, 2018, 09:52:40 am »
target_link_libraries(${PROJECT_NAME} sfml-system sfml-window sfml-graphics sfml-network sfml-audio)

You should link the sfml-*-s targets and define the symbol SFML_STATIC to get static linkage.
set(SFML_USE_STATIC_STD_LIBS TRUE)

I think this has no effect (cmake should give you a warning), since SFML is already compiled and therefore you cannot change this behavior afterwards.


AlexAUT

13
Feature requests / Re: Support for blend color
« on: October 12, 2018, 11:38:31 am »
I thought he is trying to add a constant amount to each channel.  ::)

14
Feature requests / Re: Support for blend color
« on: October 12, 2018, 10:39:53 am »
Out of curiosity, which blend mode does reproduce that behaviour? List

I would do it with a very simple shader, just add one uniform (vec3 or vec4) to the vertex shader and add it to the color of the vertex. I can post a working example if you are not familiar with shaders.


AlexAUT

15
General / Re: resolution independant movement?
« on: October 11, 2018, 09:19:26 am »
That is exactly the usecase for sf::View, have a look here for an nice explanation .

Set the view at the beginning of the game to some hard coded value, lets say 800x600. Now the "internal resolution" will be exactly 800x600, the view will then map during rendering your values between 0-800 to 0-Window.getSize().x and the same for y.

When the window changes its size do not change the view. However keep in mind that this will stretch your game based on the aspect ratio of the window. Depending on your game you might want to show some black bars to avoid the stretching or allow the user to see further in one axis.


AlexAUT

Pages: [1] 2 3 ... 27