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.


Topics - Nafffen

Pages: [1]
1
General / Final answer for async loading texture ?
« on: March 25, 2024, 10:20:49 pm »
Hey,
I want to load textures while my application is still running (logic + rendering).
I have been looking for a clear answer and the best I could find was in this topic some years ago :
https://en.sfml-dev.org/forums/index.php?topic=20569.0
It's said it's not recommended. Is it the same in 2024 ?
I don't know much about OpenGL, I have seen topics about internal/external context but not really a clear answer.
What are the best practices ?
Thank you

2
Graphics / 2 questions about VertexArray / VertexBuffer
« on: December 21, 2023, 11:13:40 am »
1. With Primitives Triangles, is there a way to specify all points then specify index of points used for each triangles ? Or the API just allows passing triangles directly by coords ?

2. With other than Triangles, is there a way to "reset" the primitive, for example with sf::TriangleFan, start a new TriangleFan in another location, but they will be drawn from the same VertexArray

Thank you

3
Graphics / few questions about VertexBuffer on Android
« on: December 06, 2023, 10:08:26 am »
I know PrimitiveType::Quad is deprecated with OpenGL ES, what about the others ? Is everything else ok on Android ?

How many vertices do you think an average phone can handle per draw call if I use sf::VertexBuffer(sf::Triangles, sf::VertexBuffer::Usage::Static); ? Is 100_000 still manageable ?

4
General discussions / When will shaders supported for android ?
« on: October 27, 2023, 02:25:46 pm »
Sorry I know there are several other topics about that but I can't find precise answer.
Just want to know if you are planning to rewrite stuff to handle shaders for android, I understood it's a lot a work and backward compatibility breaking so maybe for SFML 3. ?
Can I fork SFML and do it for my personal use ? Does it seems relatively doable (I mean, will it be faster to wait for you to do it)?
There is already this project https://github.com/TheMaverickProgrammer/SFML_ANDROID_ES_2 which is a fork of 2.5.1 and use gles2. If I fork from 2.6., will the work be different ?

5
General / Android build error on launch
« on: August 15, 2023, 01:29:11 pm »
Hey,
I am trying to follow the guide with SFML 2.6 on android https://github.com/SFML/SFML/wiki/Tutorial:-Building-SFML-for-Android-on-Windows-with-Android-Studio
Build passed but on execution I have a fatal error :
Code: [Select]
2023-08-15 12:55:24.780 20653-20653 libEGL                  com.you.example.debug                E  validate_display:89 error 3001 (EGL_NOT_INITIALIZED)
2023-08-15 12:55:24.781 20653-20653 libc                    com.you.example.debug                A  C:\FactoryCapi\external_deps\SFML\src\SFML\System\Android\Activity.cpp:75: sf::priv::ActivityStates &sf::priv::getActivity(): assertion "states != NULL" failed
2023-08-15 12:55:24.781 20653-20653 libc                    com.you.example.debug                A  Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 20653 (u.example.debug), pid 20653 (u.example.debug)
I am using several libraries with SFML but I already made a simple project to check them and it was ok (launched as expected).
By simple project I mean a single main.cpp that calls some methods of each lib, so a very simple cmake.

But now I'm using my full source of my game with intermediate lib building and I have this error.
Just want to know if some of you already dealt with this, or have any idea about where the problem could come from.
The error occurred before the main is executed.

To give a little bit more information, here is my cmake lib dependency flow:
The example lib finally built relies on a custom lib FactoryCapi_flow
Code: [Select]
target_link_libraries(example PUBLIC
    FactoryCapi_flow
    log
    android
    sfml-graphics
    sfml-audio
    sfml-activity
    sfml-network
    -Wl,--whole-archive sfml-main -Wl,--no-whole-archive
    TGUI::TGUI
    TGUI::Activity
    EnTT::EnTT
    openal
    EGL
    GLESv1_CM
)
FactoryCapi_flow relies on FactoryCapi_core
Code: [Select]
target_link_libraries(
  FactoryCapi_flow PUBLIC
  FactoryCapi_core
)
FactoryCapi_core is built with those lib
Code: [Select]
target_link_libraries(
  FactoryCapi_core PUBLIC
  sfml-graphics
  sfml-system
  absl::flags
  absl::flags_parse
#  gRPC::grpc++_reflection
  gRPC::grpc++
  protobuf::libprotobuf
  quill::quill
)
In AndroidManifest.xml, I have
Code: [Select]
<meta-data android:name="android.app.lib_name" android:value="sfml-activity-d" />
<meta-data android:name="sfml.app.lib_name" android:value="tgui-activity-d" />
<meta-data android:name="tgui.app.lib_name" android:value="example" />
Thank you

6
Graphics / Blur WITHOUT shader
« on: May 14, 2023, 04:11:54 pm »
Hello,
What is the best and efficient way to apply gaussian blur without shaders ? (because I want to play on android later)
Is drawing on RenderTexture and CPU compute blur the best way ? It seems too expensive to me
Thank you

7
Window / MouseWheelEvent with Trackpad, delta = 0 ?
« on: August 20, 2022, 11:59:01 pm »
Hello everyone,

I'm using SFML on Windows 10 with my laptop and I use a trackpad to move my mouse.

When it comes to MouseWheelEvent (sliding two fingers on the trackpad), the delta member is most of the time 0 which is quite disturbing for me.
Btw if I slide quickly, the delta is about +-5 and there is an inertie towards 0 (I assume it's device/system dependent) and I'm ok with that.

Edit: I noticed when you zoom with trackpad (two fingers get closer) it triggers MouseWheelEvent with a decent delta as expected. The issue is really focused on sliding two fingers (up/down) on the trackpad

Why the delta stays at 0 if the user inputs natural movement ? How can I handle it ?

Thank you

8
Graphics / Alternative of shaders on Android
« on: July 24, 2022, 10:36:59 am »
Hello everyone,

I want to bring my sfml app on Android and I'm using a little shader to blend textures from multiple mask images (black and white, ex img: maskStone512x.png) into a VertexArray on my tilemap object (can see result with img: result.PNG).
I don't want to have a texture per tile but I want a smooth background. That's why I did it this way.

If I'm right, on Android, I can't use my personal shader because of gl es 2.0 which is not supported by sfml currently.  :'(

I need to find an alternative to this utilisation.

Actually, the tilemap texture is not changing afterwards so I thought a simple sprite/texture could be ok after the generation and transmission of the texture by the server. If I do this way, is there a maximum size of sprite/texture I should not exceed to keep a good performance on android ? Should I split the tilemap in different zone to control their draw matching the size and pos of the view ? If so what size each part ?

If you have another idea to workaround :D

Thank you very much for your help

Pages: [1]