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

Pages: [1] 2
1
I seem to have similar problem.
Rendering using RenderTexture just doesn't work from time to time. Seems like a concurrency issue.

UP:
Aha, looks like the problem was that texRender.clear(sf::Color::White); is a requirement. you can't draw on it before calling this function. event though it worked from laptop fine.

2
Feature requests / Re: Android text input other than english
« on: June 12, 2024, 08:49:23 pm »
I can post the code a little later.

What I mean that I don't get textEntered event in other layouts if the letter is not present in english asci code.
Chinese/Arabic/Cyrillic

But it works if I compile for desktop. So I assumed the issue has to be with Android.

***

So here I see if the event is from Keyboard.
On Ubuntu on non english layout I get
sf::Event::TextEntered  event with correct unicode that I can parse into right letter.

On Android on non english layout I get
sf::Event::KeyReleased event with _ev.key.code = -1, if I press any of non latin symbols.
so if the layout still has some latin chars like "abcde" all works, but if I press any of "абвгд" it will only trigger KeyReleased.

void TextInput::OnSFMLEvent(sf::Event const& _ev)
{
    if (_ev.type == sf::Event::KeyReleased)
    {
         *** handle Enter / Backspace ***
    }
    else if (_ev.type == sf::Event::TextEntered)
    {
         *** handle unicode ***
    }
}
 

3
Feature requests / Re: Android text input other than english
« on: June 12, 2024, 09:32:17 am »
seems like. if layout is eng, I get textEntered event.
but when I change layout, it only detects KeyReleased with code -1

4
Feature requests / Android text input other than english
« on: June 11, 2024, 11:39:58 pm »
the event _ev.type == sf::Event::TextEntered won't come on input attempt in another language.
the button code comes -1.

however in desktop version it works

5
General / Re: Android support
« on: May 09, 2024, 01:16:18 pm »
what about the vibration activation?

6
Feature requests / Re: export vertexes from the Shape class
« on: May 06, 2024, 01:14:33 pm »
hm yess. I also just realized that the triangles are in stripes mode, but I need a separate triangles.

another related question is. if I build my own shape using vertex array. then I see this issue.
whenever I set the position (which is 60 frames per second) I need to update all the array of vertexes to move them to a new position.

which could be avoided if I assign pointers. so that each vertex know it's position `*shapePos + shift`
is there a better way to move all the vertex positions rather than for loop?

7
Feature requests / Re: export vertexes from the Shape class
« on: March 25, 2024, 01:29:27 pm »
yes so far I think its an overkill. 1000 draw calls work just fine.
also calculating vertex again from shapes is cpu consuming.

8
Feature requests / export vertexes from the Shape class
« on: March 23, 2024, 01:28:47 pm »
The Shape class has this members. I assume it contains all the information required to draw basic sfml shapes.
But when you have too many shapes to draw, each shape require an individual draw call

Instead it would be possible to export memory to this vertexes of the shapes from the Shape class.
So that the user can build a huge array of vertexes from this shapes and just batch draw it in a single call.

VertexArray    m_vertices{PrimitiveType::TriangleFan};          //!< Vertex array containing the fill geometry
VertexArray    m_outlineVertices{PrimitiveType::TriangleStrip}; //!< Vertex array containing the outline geometry
 

9
General / Re: Android support
« on: November 22, 2023, 09:44:25 pm »
JNI undefined code indeed does crash.

Question: can sfml trigger input text on android system then?

10
General / Drawing out of screen
« on: November 22, 2023, 07:33:18 am »
Should I detect that the graphics is out of main view and therefor disable the draw code or it is done automatically?

11
System / Re: sf::Vector2f is unsigned?
« on: November 21, 2023, 12:07:41 pm »
ah sorry must be typecast error

12
System / sf::Vector2f is unsigned?
« on: November 21, 2023, 12:03:39 pm »
sf::Vector2f(100, -100);

will result into

{ 100, 2.14748e+09 }

13
General / Re: Android support
« on: November 20, 2023, 10:05:15 pm »
was able to configure and compile my project for android, all works!
SFML3 rulz!

14
General / Re: Android support
« on: November 20, 2023, 03:13:03 pm »
I see it did install into a different ndk folder. I just copied it from there to the path it wants and now it works!
Yay!

15
General / Re: Android support
« on: November 20, 2023, 02:55:49 pm »
Hm, this one I didn't follow. let me try. I tried to setup with android studio.

I did run this command additionally to install sfml to ndk
```
cmake -DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_NDK=/android-ndk-r25c -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a -DCMAKE_ANDROID_STL_TYPE=c++_static -DCMAKE_BUILD_TYPE=Debug ../..
```

Here what I get at the last command:
```
> Task :app:configureCMakeDebug[arm64-v8a] FAILED
C/C++: CMake Error at CMakeLists.txt:10 (find_package):
C/C++:   By not providing "FindSFML.cmake" in CMAKE_MODULE_PATH this project has
C/C++:   asked CMake to find a package configuration file provided by "SFML", but
C/C++:   CMake did not find one.
C/C++:   Could not find a package configuration file provided by "SFML" (requested
C/C++:   version 3) with any of the following names:
C/C++:     SFMLConfig.cmake
C/C++:     sfml-config.cmake
C/C++:   Add the installation prefix of "SFML" to CMAKE_PREFIX_PATH or set
C/C++:   "SFML_DIR" to a directory containing one of the above files.  If "SFML"
C/C++:   provides a separate development package or SDK, be sure it has been
C/C++:   installed.

```

Pages: [1] 2
anything