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

Pages: [1]
1
Graphics / Re: Problems with Resizing RenderWindow/RenderTexture
« on: October 07, 2016, 06:15:00 pm »

That is what I meant by not stretching. What I was trying to ask is if that method will achieve the same effect as recreating the window.

I am trying to create a user friendly GUI library with SFML as the base. I would like it to be threaded as it would be more user-friendly if the library handled the framerate (when the draw function is called) so it only updates when needed.

As I'm typing this, I realize the user could call the draw function at their own framerate, and the library can decide if it actually needs an update.

I've believe I've thought of a few better options, but I will keep trying to recreate my problem on a small scale if you don't mind coming back to this post in the future

One more question though, theoretically is there any reason that this wouldn't work: if all of the SFML objects are created (and drawn on) on one thread (that isn't the main thread) and are then only modified through requests from another thread. Basically, can SFML work entirely on a secondary thread?

Thanks for the help, btw!

2
Graphics / Re: Problems with Resizing RenderWindow/RenderTexture
« on: October 07, 2016, 05:45:53 pm »

That is what I meant by not stretching, which I know is possible. What I was trying to ask is if that method will achieve the same effect as recreating the window.

I am trying to create a user friendly GUI library with SFML as the base. I would like it to be threaded as it would be more user-friendly if the library handled the framerate (when the draw function is called) so it only updates when needed.

As I'm typing this, I realize the user could call the draw function at their own framerate, and the library can decide if it actually needs an update.

I've believe I've thought of a few better options, but I will keep trying to recreate my problem on a small scale if you don't mind coming back to this post in the future

One more question though, theoretically is there any reason that this wouldn't work: if all of the SFML objects are created (and drawn on) on one thread (that isn't the main thread) and are then only modified through requests from another thread. Basically, can SFML work entirely on a secondary thread?

Thanks for the help, btw!

3
Graphics / Re: AW: Problems with Resizing RenderWindow/RenderTexture
« on: October 07, 2016, 04:43:06 pm »
Don't use multi threading for rendering and updating, it's simply not worth the effort and will be the source of many issues.

I assume you do call clear, draw display on the render texture as well, right?

Without a complete and minimal example that reproduces the issue, we can't really help you further.

Yeah, I call clear and display on both. I'll try to reproduce an example. In the mean time, could you tell me if it is possible to resize a window without stretching and then use it normally?

4
Graphics / Problems with Resizing RenderWindow/RenderTexture
« on: October 06, 2016, 09:01:57 pm »
I am drawing to a RenderTexture which is then drawn to a RenderWindow. I am attempting to resize them both without scaling. When the window is resized, I create a new view and apply it to this window. This works great until I try to resize the RenderTexture as well.

This is the result if I don't resize the RenderTexture (the green is the RenderWindow)

But when I resize the RenderTexture (by calling create(width, height) again), I get weird results, UNLESS I recreate the window (which I would very much like to avoid).

 The result is either the texture doesn't appear, the texture flickers, or (this is odd) The texture's y value matches the height difference, and the green (window) doesn't render at all and is transparent.

The drawing is handled on a separate thread from the resizing, but the drawing thread is locked during the resize.

Pages: [1]
anything