Creating mouse cursor
DanielH

I have four mouse cursors that I am using for an app. By adding these cursors, my load time has increased from 1/2 second to 5 to 6 seconds.

I added this code to see how long it takes to create a cursor.

time_t begin;
time_t end;

time( &begin );

cursor = al_create_mouse_cursor( bmp, x, y );

time( &end );

double p = difftime( end, begin );

Here is the results when I outputted them to a log file.

Time: 2
Time: 1
Time: 0
Time: 1

SiegeLord

Try loading these bitmaps as memory bitmaps... will save a roundtrip to the GPU. Also, using al_get_time will yield you more accurate timing info than time...

Also, what is your OS?

Thread #613287. Printed from Allegro.cc