Results 1 to 3 of 3
I downloaded few examples and organized cursor moving in such a way: I load certain image on a surface (for example: SDL_Surface *cursor), then react on mouse motion and draw ...
- 08-15-2004 #1Just Joined!
- Join Date
- Aug 2004
- Location
- Notaw Capital
- Posts
- 2
Cursor with SDL
I downloaded few examples and organized cursor moving in such a way: I load certain image on a surface (for example: SDL_Surface *cursor), then react on mouse motion and draw cursor surface every time on a new position. Without doublebuffer it works fine, but with this damn useful **** I need to call SDL_Flip() every time cursor moved. As it happens very frequently, I have a big loss of perfomance. I limited cursor drawing by time - 3 times per second. Looks not very impressive.
Someone knows another way?
- 08-16-2004 #2Linux User
- Join Date
- Jul 2004
- Posts
- 256
Instead of blitting the cursor yourself, use SDL_CreateCursor() SDL_SetCursor() SDL_FreeCursor() http://sdldoc.csn.ul.ie/sdlcreatecursor.php
--monkey
- 08-19-2004 #3Just Joined!
- Join Date
- Aug 2004
- Location
- Notaw Capital
- Posts
- 2
But I'll get only monochrome cusor, right? As I'm writing a graphical engine - that's not enough
More ideas..?


Reply With Quote
