|Still not following why you are doing software renderer you are on windows you can setup the hardware accelerated renderer.
Beside that 2 other comments ...
1.) Your value of Pi is wrong
1000 places of Pi[^]
2.) You obviously struggling to make frame filename and frame is already use .. try this
void frameName (TCHAR* buffer, int bufsize, const TCHAR* nameStart, const TCHAR* ext, int no, int len)
sprintf_s(fmtstring, _countof(fmtstring), "%s%i%s", "%s%0", len, "i.%s");
_stprintf_s(buffer, bufsize, fmtstring, nameStart, no, ext);
It looks slightly strange because you have to make the format string.
"%s%08i.%s" is an example format string, which basically says string + integer to 8 digits + . + string
The problem is you don't want a constant 8 you want Len so you have to 1st build the format string
Example of use of what I suspect you are trying to do. Len I assume is length of number padded with "0"'s
frameName(buf, _countof(buf), _T("test"), _T("bmp"), 1, 6);
If you haven't run across TCHAR before it is a character type that changes with compile mode.
In Ansi mode it is char
In unicode mode it is wchar
I have no idea if you are compiling in ansi mode or unicode, you had both so I am trying to be careful
to support either which is what using TCHAR does. However you need to be aware TCHAR size changes.
That is the reason for using _countof() rather than sizeof() for the buffer size.
In vino veritas
modified 2-Oct-17 10:21am.