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

Pages: [1]
1
General / Re: To keep a RenderWindow's partial region unrefreshed
« on: April 18, 2019, 06:07:07 pm »
That is what i did, but since il developing in C#, the process of copying pixels one by one is rather slow, for an area of 770x770, i dropped from 50fps to 15fps using SetPixel , the loop alone in c# spends lots of time to go through..

2
General / Re: To keep a RenderWindow's partial region unrefreshed
« on: April 18, 2019, 04:13:16 pm »
Thank you for your answer Laurent, that is an interesting suggestion.

TL;DR : 2 likely possible issues using this method:
  • Area flicker between Display() and the external app to finish its drawing
  • External app probably refreshes only some parts of the area each frame

Long version:
I am not sure yet, but I could maybe ask for the client to adapt his external app's code to refresh the window right after I trigger an event meaning "I just called Display(), now you need to draw/refresh your area again".

Although the issue will probably be a flickering display, because, during the short time interval between my event and the external app to finish its drawing, there will be something else drawn by the SFML on the screen, different than what the client intends to display.

Also, I don't know yet either but the external app might be redrawing only some parts of the area (the area I want to share and keep unrefreshed). In this last case, asking the external app to refresh after the SFML redraw would not work.

I am currently waiting for an answer from the client which develops the external app and I will come back when I will have more information.

3
General / To keep a RenderWindow's partial region unrefreshed
« on: April 16, 2019, 10:18:30 pm »
Hello,

I am looking to get the same effect as the GraphicsPath from Winforms which allows to keep some particular areas of myForm unrefreshed. f.i.:
myForm.Invalidate(new Region(graphicsPath));

My final goal is to draw things at the unrefreshed location, using a HDC (Device context handle) that I will provide to an external application. (This currently works using winforms).

I am using SFML.Net 2.4 and I create my window this way:
 SFML.Graphics.RenderWindow  mySfmlWindow = new RenderWindow(myForm.Handle, settings);

I can still create the HDC on myForm, however, even without calling :
mySfmlWindow.Clear(color);

, the things drawn by the external application are still instantly cleared when i call:

mySfmlWindow.Display();

I suppose this is due to the fact SFML keeps its double buffers somewhere else than the window itself, so anything drawn by an external application using the window's HDC will get overwritten by the copy of SFML's internal buffers... What can I do?

Pages: [1]
anything