View Full Version : change mouse pointer look to our own graphic.
loong98
03-18-2001, 10:55 AM
hi.......
is they anyone know how to 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
loong98
03-19-2001, 01:44 AM
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
Mongo
03-19-2001, 07:25 AM
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
loong98
03-19-2001, 09:25 AM
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.
Mongo
03-19-2001, 10:05 AM
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.
loong98
03-19-2001, 10:25 AM
hi mongo........thanks a lot and now i was clear.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.