Im trying to load a bitmap in order to render it on the screen,to do so im using loadSurfaceFromFile. the images that i want to load are 1280*1024, it takes about 35ms to load these images. it seems to me that it should load a lot faster(something like 5ms) what im i doing wrong?
edited code:
QueryPerformanceCounter(&liStart2);
int size = load_file_to_memory(s.c_str(),&content);
QueryPerformanceCounter(&liStop2);
QueryPerformanceCounter(&liStart);
D3DXLoadSurfaceFromFileInMemory(surface,NULL,NULL,content,size,NULL,D3DX_DEFAULT,0,NULL);
QueryPerformanceCounter(&liStop);
LONGLONG llTimeDiff = liStop.QuadPart - liStart.QuadPart;
double dftDuration = (double) llTimeDiff * 1000.0 / (double) Frequency.QuadPart;
LONGLONG llTimeDiff2 = liStop2.QuadPart - liStart2.QuadPart;
double dftDuration2 = (double) llTimeDiff2 * 1000.0 / (double) Frequency.QuadPart;