1
General / Re: Failed to load image
« on: March 11, 2024, 07:21:02 am »
Do you run the program directly or through IDE? Usually, IDE has working space and could be different than where you have exe files.
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.
setFramerate() sleeps the thread.
This helps with "over-producing" with no limit and can reduce power used. However, it's not strictly set to that rate.
Once a thread is "slept", it has the possibility of "over-sleeping" as there's no real way of insisting on coming back by a specific time (accurately); this is dependent on operating system's task scheduler.
So, I'd guess that the framerate limit is sleeping during each frame and then the operating system is keeping it a little longer than your hoped-for length of time before returning it.
I would expect it to be faster (shorter frame time) without a framerate limit.
I would guess it's there to make sure the type is T to match the min and max signature.Thanks, forgot about this specifiation.
For integer datatypes, the type of the result of a + is not always the type of the two operands. If you have a Rect<short>, then left and width are shorts, but left+width is an int.
(From cppreference.com: "In particular, arithmetic operators do not accept types smaller than int as arguments")