Results 1 to 5 of 5

Thread: Mouse cursor?

  1. #1
    Senior Member Regular Contributor
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    102

    Mouse cursor?

    How can I do mouse support in my game? Should I use the original´windows pointer or is there any OGL pointer?
    CyBBe

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jun 2000
    Location
    Shreveport, LA, USA
    Posts
    1,502

    Re: Mouse cursor?

    OpenGL has nothing to do with mouse input. You will either have to use the Windows mouse and mouse pointer functions, or use DirectX's DirectInput. DirectInput is fairly easy to learn to use and it makes handling multiple input devices very easy to do. I would suggest you hide the windows mouse cursor, and just draw your own when you need one since some older 3D video cards can not display the windows mouse cursor.

    [This message has been edited by DFrey (edited 06-07-2000).]

  3. #3
    Member Contributor
    Join Date
    Feb 2000
    Location
    Brisbane,QLD, Australia
    Posts
    99

    Re: Mouse cursor?

    Interesting topic here, Im not to sure but i think you can use your windows mouse cursor on any card except for the Voodoo range of cards. On these cards you need to make your own cursor. Can someone confirm this?

    For all other cards make sure when you are creating your window you have
    wndclass.hCursor = LoadCursor (NULL, IDC_CROSS);
    and then somewhere in your init
    ShowCursor(TRUE);

    // to set your cursor to center screen
    SetCursorPos(nScreenWidth/2, nScreenHeight/2); // set mouse to screen centre

    Hope this helps

  4. #4
    Senior Member Regular Contributor
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    102

    Re: Mouse cursor?

    hmmm, directInput sounds nice, do U know any good tutorials???
    CyBBe

  5. #5
    Senior Member OpenGL Pro
    Join Date
    Jun 2000
    Location
    Shreveport, LA, USA
    Posts
    1,502

    Re: Mouse cursor?

    You might want to look at http://www.loonygames.com/content/1.5/cotc/
    , this is the article from which I learned about DirectInput.

Similar Threads

  1. zoom Mouse cursor
    By couet in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 04-11-2005, 11:09 PM
  2. rotate on mouse click and drag in the direction of the mouse cursor
    By vamsee kanth in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 01-02-2005, 09:54 PM
  3. Draw a mouse cursor!
    By pran1 in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 03-17-2004, 09:59 AM
  4. Get mouse cursor with GLUT
    By fcoutel in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 11-07-2002, 08:46 AM
  5. Flickering Mouse Cursor
    By Quaternion in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 01-24-2001, 03:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean