Find the answer to your Linux question:
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just 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?

  2. #2
    Linux 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

  3. #3
    Just 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..?

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •