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

Pages: [1]
1
Unless you call ->close() twice ? :)

2
Hi !

In my projects, I tend to use the standard "ProcessInputs" -> "Update" -> "RenderFrame" loop.

Today however, I noticed that I usually drop a `renderWindow->close()` statement inside the "Update()" method, which is ran before the "RenderFrame()" method in every loop. In addition to that, I do not perform any check to see if the window is still open in the "RenderFrame()" method, simply assuming the window will be open.

...but it shouldn't be, and I almost never have issues with having a "RenderFrame()" called, that in turn calls `renderWindow->clear()`, `renderWindow->draw(...)`, and `renderWindow->display()` without checks.

How is that possible ? What does actually `renderWindow->close()` do ? Does it close instantly or does it wait for the next "clear/display" ?

Or perhaps do the "clear()" and "display()" methods check for the renderWindow's availability ?

Thanks for enlightnening me !

...And merry Christmas !

Pages: [1]
anything