Results 1 to 7 of 7

Thread: change mouse pointer look to our own graphic.

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2001
    Location
    malaysia
    Posts
    14

    change mouse pointer look to our own graphic.

    hi.......
    is they anyone know how to change mouse pointer look to our own graphic.

  2. #2
    Senior Member Regular Contributor
    Join Date
    Aug 2000
    Location
    Turin
    Posts
    258

    Re: change mouse pointer look to our own graphic.

    Simply, get the mouse coordinates (GetCursorPos(&mpos) if on windows) and put a billboarded poly at that coords or better use an orthographic view just to use the same coords as the window.


    rIO.sK http://www.spinningkids.org/umine
    [rIO^sPINNING kIDS] - rio@nospam.spinningkids.org

    -/- This is a signature virus. Add it to your signature. Help it spreading! -/-

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2001
    Location
    malaysia
    Posts
    14

    Re: change mouse pointer look to our own graphic.

    hi rIO,

    Thanks for the answer but i don't get what u mean. I would like to change the cursor pointer to my own 2d picture whenever i enter to opengl application that i created.
    Pls give me the example in c platform coding.
    Thanks again

  4. #4
    Junior Member Newbie
    Join Date
    Sep 2001
    Location
    st . louis mo
    Posts
    3

    Re: change mouse pointer look to our own graphic.

    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    glOrtho(0.0f, width, height, 0.0f, -1.0f, 1.0f);
    glMatrixMode(GL_MODELVIEW);

    POINT mpos;
    ShowCursor(false);

    GetCursorPos(&mpos);

    glLoadIdentity();
    glTranslatef(mpos.x, mpos.y, 0);

    Draw_your_pointer();


    ... kinda

  5. #5
    Junior Member Newbie
    Join Date
    Mar 2001
    Location
    malaysia
    Posts
    14

    Re: change mouse pointer look to our own graphic.

    hi mongo........many-many thanks to u. since i was new in this OGL, what to put in this :-

    Draw_your_pointer();
    Again appreciate if u pls put some example code.

  6. #6
    Junior Member Newbie
    Join Date
    Sep 2001
    Location
    st . louis mo
    Posts
    3

    Re: change mouse pointer look to our own graphic.

    Draw a Quad or a triangle strip or something and texture it.
    Common, I'f you're new to openGL, start by lerning the basics, you can't lern programming with copy 'n paste.

  7. #7
    Junior Member Newbie
    Join Date
    Mar 2001
    Location
    malaysia
    Posts
    14

    Re: change mouse pointer look to our own graphic.

    hi mongo........thanks a lot and now i was clear.

Similar Threads

  1. Reuse Pixel buffer without pointer change/update
    By learnopengl-2000 in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 06-19-2009, 10:37 AM
  2. Moving the mouse pointer
    By Luke H. in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 02-16-2005, 06:44 AM
  3. Change Mouse-Pointer to image
    By Sunshine in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 12-11-2004, 01:51 PM
  4. Mouse Pointer - GLUT
    By Zeus_666 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 06-26-2001, 07:28 AM
  5. change mouse pointer look to our own graphic.
    By loong98 in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 03-19-2001, 12:50 PM

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