Hey all - I just got done reading Conan's excellent tutorial on TTF fonts and have a question regarding performance...
Does anyone know the impact of creating a font each time through the game loop (aka CreateFontIndirect) vs. creating in init?
Obviously doing something up front is always faster than doing it every time in a loop - I'm curious if the performance hit is negligible enough that it is ok too create every time...
with my game, i don't notice any difference either way but am curious to hear what others think
btw - Conan... one thing I'd add to the tutorial is that you should call
display->GetBackBuffer()->ReleaseDC(hDC);
after you call DrawText
I found that the text would not draw until I put that in there (I noticed in your sprite demo you did this - thanks for providing the great resources!)
Does anyone know the impact of creating a font each time through the game loop (aka CreateFontIndirect) vs. creating in init?
Obviously doing something up front is always faster than doing it every time in a loop - I'm curious if the performance hit is negligible enough that it is ok too create every time...
with my game, i don't notice any difference either way but am curious to hear what others think
btw - Conan... one thing I'd add to the tutorial is that you should call
display->GetBackBuffer()->ReleaseDC(hDC);
after you call DrawText
I found that the text would not draw until I put that in there (I noticed in your sprite demo you did this - thanks for providing the great resources!)