- Online Community Forums » Allegro Development » Creating mouse cursor

This thread is locked; no one can reply to it. rss feed Print
Creating mouse cursor
Member #934
January 2001

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

Member #7,827
October 2006

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?

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Go to: