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

Pages: [1]
1
Graphics / Re: Print text on texture in multi-thread mode
« on: November 10, 2017, 10:28:03 am »
Thanks for the detailed reply and for the hint.
I'll investigate the subject.
Didn't think that we need GPU (especially when CPU idling) to print two letters simultaneously).

Now I'm going to check everything (including stuff you've mentioned) more carefully.

Thanks once again for your time and attention! =)

2
Graphics / Re: Print text on texture in multi-thread mode
« on: November 09, 2017, 10:28:24 pm »
I didn't say anything about GPU and fail to see how it relates to the subject.
Also I'm not trying to solve magically everything with multi-thread and I know that when I'm using similar code without sfml-stuff it works perfectly.

I'm here to find out how to use sfml correctly and it should be possible. Can't believe that library like sfml works only single-threaded.

3
Graphics / Re: Print text on texture in multi-thread mode
« on: November 09, 2017, 04:54:56 pm »
Thanks! Now it works, but still, CPU load is like in single thread mode and program creates the same amounts of images per second in both modes.
Even if I remove image saving (to exclude thoughts that it is not possible to write them this way) still I can't run it multi-thread.

4
Graphics / Re: Print text on texture in multi-thread mode
« on: November 09, 2017, 02:28:44 pm »
Hello again.
Here is my program.
I'm running
--font /tmp/Arial.ttf --backgrounds /tmp/bck_lst.lst --output /tmp/demo

where bck_lst.lst is a file with paths to images.
It works fine in a single thread mode, but in multi thread mode it hangs spontaneously and doesn't load CPU anyway.
Can you please have a look?

I'm glad to assist you in any way I can.

5
Graphics / Re: Print text on texture in multi-thread mode
« on: November 06, 2017, 02:31:04 pm »
Thanks for the fast reply!
I'm glad to know that it is possible.
Will prepare an example of source code.

6
Graphics / Print text on texture in multi-thread mode
« on: November 06, 2017, 01:45:14 pm »
Greetings!

I have a program that uses sf::Font, sf::Texture, sf::Text and sf::RenderTexture to create multiple images with text. I'm trying to launch each image creation in a separate thread, but found out, that CPU usage is like I'm doing it single-thread and even more: result images have incorrect shifts of letters.

So the questions:
1) Is this functionality supposed to work in multi-thread mode?
2) If yes, is it possible to create images with text in parallel?

Thank you very much for you attention!

Pages: [1]
anything