View previous topic :: View next topic |
Author |
Message |
Mr.Fletcher DeleD PRO user
Joined: 07 Aug 2004 Posts: 1772 Location: Germany
|
Posted: Tue Feb 22, 2005 3:21 pm Post subject: |
|
|
Use the automatic OnMouseMove - Event of the window/form, it's not opengl-specific. I don't know how this is handled in c++, but i think it might be quite the same as in delphi. _________________ Behold! The DeleD Wiki! Please help us expanding it
DeleD on IRC |
|
Back to top |
|
|
banshee777 Member
Joined: 10 Feb 2005 Posts: 37
|
Posted: Fri Feb 25, 2005 4:54 am Post subject: .... |
|
|
I've did it using glutmouse
glRotatef(ry,1,0,0); //WORKING
glRotatef(rx,0,1,0); //WORKING
glTranslatef(-XPOS,-YPOS,-ZPOS);
glGetFloatv(GL_MODELVIEW_MATRIX, matrix); // puts the
void mouse(int x, int y)
{
if (x < 1024 / 2)
rx = rx - 3;
if (x > 1024 / 2)
rx = rx + 3;
if (y < 768 / 2)
ry = ry - 2;
if (y > 768 / 2)
ry = ry + 2;
frame3++;
time3=glutGet(GLUT_ELAPSED_TIME);
if (time3 - timebase3 > 31)
{
timebase3 = time3;
frame3 = 0;
glutWarpPointer(1024/2,768/2);
}
) |
|
Back to top |
|
|
Yokom DeleD PRO user
Joined: 11 Apr 2005 Posts: 22 Location: Dallas TX
|
Posted: Sun Apr 24, 2005 7:13 am Post subject: |
|
|
You mentioned collision there is a good open source resource called opcode that does perface collision detection. I have heard really good things about it but havnt messed with it "yet". Im still using a convex hull collision system from our physices engine.
btw on your mouse code I will assume you are on a linux platform or you would be using directX. |
|
Back to top |
|
|
Jeroen Site Admin
Joined: 07 Aug 2004 Posts: 5332 Location: The Netherlands
|
Posted: Sun Apr 24, 2005 7:32 am Post subject: |
|
|
Yokom wrote: |
btw on your mouse code I will assume you are on a linux platform or you would be using directX. |
Why would you assume he's using linux? Because of the openGL commands? |
|
Back to top |
|
|
Guest
|
Posted: Fri Nov 04, 2005 6:25 pm Post subject: Re: .... |
|
|
banshee777 wrote: |
I've did it using glutmouse
glRotatef(ry,1,0,0); //WORKING
glRotatef(rx,0,1,0); //WORKING
glTranslatef(-XPOS,-YPOS,-ZPOS);
glGetFloatv(GL_MODELVIEW_MATRIX, matrix); // puts the
void mouse(int x, int y)
{
if (x < 1024 / 2)
rx = rx - 3;
if (x > 1024 / 2)
rx = rx + 3;
if (y < 768 / 2)
ry = ry - 2;
if (y > 768 / 2)
ry = ry + 2;
frame3++;
time3=glutGet(GLUT_ELAPSED_TIME);
if (time3 - timebase3 > 31)
{
timebase3 = time3;
frame3 = 0;
glutWarpPointer(1024/2,768/2);
}
) |
|
|
Back to top |
|
|
|