I need speed!

Started by
15 comments, last by NightZero 21 years, 2 months ago
Two other things:

( 1 ) You may need to couple timeGetTime() with timeBeginPeriod(1). This call sets the resolution of timeGetTime() to 1 ms. You''ll also need to pair timeBeginPeriod(1) with timeEndPeriod(1).

( 2 ) The previous reply was right on. Stay away from 24 bit bitmaps. Video card support for them is something that is going to vary widely across card manufacturers. But you can on support for 8, 16, and 32 bit support virtually universally.

- J


Jeff OutlawPresidentDigitalOutlawhttp://www.digitaloutlaw.com
Advertisement
quote:Original post by joutlaw
Again, I agree QueryPerformanceCounter is THE best choice

no it isn''t, because it takes longer to execute than timeGetTime. see nvidia developer site for benchmarks.
Use the QueryPerformanceCounter and QueryPerformanceFrequency functions to measure short time intervals at a high resolution.

look at DXUtil_Timer in dxutil.h in the common files that come with the DirectX SDK for a good example of a timer

it''s so nice I just use that one it''s already made for you nice and easy
I cant uninstall it, theres something wrong with the uninstall.exe!

.lick
The uninstall exe just hangs, leaving me a time-cursor(windows).

.lick
BUMP

.lick
For timeing you could use the rdtsc opcode the code would look like

__int64 GetCPUCount(unsigned int loword, unsigned int hiword)
{
_asm
{
rdtsc
mov hiword , edx
mov loword , eax
}
return ( (__int64) hiword << 32 ) + loword;
}

but you would need to get the cpu speed and i dont now how to do that yet.

This topic is closed to new replies.

Advertisement