Warpmouse freezes app

hi

why does SDL_WarpMouse freeze my application if i warp the mouse each
frame? i’m using it with an openGL-engine and need to reset the mousepos
each frame in order to get decent mouselook-handling.
everything looks nice when i step through the code in debug mode.

eik

Eike Umlauf wrote:

hi

why does SDL_WarpMouse freeze my application if i warp the mouse each
frame? i’m using it with an openGL-engine and need to reset the
mousepos each frame in order to get decent mouselook-handling.
everything looks nice when i step through the code in debug mode.

eik

I had the exact same thing in my program.
But just moving the mouse to a location each frame or each move event is
not the way.
Use SDL_GrabInput instead. This way, the mouse won’t escape out of the
window, and you’ll continue to get mouse-move events as much as you like.

RK.

I’ve been reading SDL source for about 1 month now and I have a rather
dumb question…

Are there any standard or non-standard libraries for creating GUI with
SDL?

Is there a GUI creation tool with WYSIWYG editing?

So I would like to do the following:

1) create a drop down menu system

2) create dialog boxes

3) create status bar 

4) Open a file requestor

etc. etc. etc,

Thanks and sorry for the dumb ass newbie question.

I’ve been reading SDL source for about 1 month now and I have a rather
dumb question…
Wow, one of the few people reading sources. But the answer for this question
is found elsewhere.

Are there any standard or non-standard libraries for creating GUI with
SDL?
This is a FAQ and is listed in the FAQ: Development:
http://www.libsdl.org/faq.php?action=listentries&category=2#18

Is there a GUI creation tool with WYSIWYG editing?
For the smaller SDL-only GUI libraries, not that I remember.
But most of them have a simple API so that shouldn’t be necessary.On Friday 14 June 2002 13:27, Tony Leotta wrote:


Johannes Schmidt

< http://libufo.sourceforge.net > Your widget set for OpenGL

sure but as soon as the mouse is at the screen border and i continue to
move the mouse in that direction i cannot tell how far (fast) the mouse
has been moved that frame, but that’s exactly what is necessary for
mouselook handling. i’ve seen a great number of progs re-setting the
cursor each frame, it’s obviously the way it should be done. why is the
warpmouse command so slow or why can’t i use it every frame?

eik>

I had the exact same thing in my program.
But just moving the mouse to a location each frame or each move event is
not the way.
Use SDL_GrabInput instead. This way, the mouse won’t escape out of the
window, and you’ll continue to get mouse-move events as much as you like.

RK.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

You can’t tell how much the mouse has moved?
Are you, by any chance, getting the mouse coordinate and comparing it to
the one from the last event?
Because the mouse motion event contain ‘xrel’, ‘yrel’ for getting the
relative motion in the X/Y direction…
And in my program, using ‘xrel’ and ‘yrel’ for mouselook handling works
just fine, whereever the mouse cursor is.
RK.

Eike Umlauf wrote:>sure but as soon as the mouse is at the screen border and i continue to

move the mouse in that direction i cannot tell how far (fast) the mouse
has been moved that frame, but that’s exactly what is necessary for
mouselook handling. i’ve seen a great number of progs re-setting the
cursor each frame, it’s obviously the way it should be done. why is the
warpmouse command so slow or why can’t i use it every frame?

eik

I had the exact same thing in my program.
But just moving the mouse to a location each frame or each move event is
not the way.
Use SDL_GrabInput instead. This way, the mouse won’t escape out of the
window, and you’ll continue to get mouse-move events as much as you like.

RK.

oh WOW didn’t know that!!! :slight_smile:

thx a lot :)> You can’t tell how much the mouse has moved?

Are you, by any chance, getting the mouse coordinate and comparing it to
the one from the last event?
Because the mouse motion event contain ‘xrel’, ‘yrel’ for getting the
relative motion in the X/Y direction…
And in my program, using ‘xrel’ and ‘yrel’ for mouselook handling works
just fine, whereever the mouse cursor is.
RK.

Eike Umlauf wrote:

sure but as soon as the mouse is at the screen border and i continue to
move the mouse in that direction i cannot tell how far (fast) the mouse
has been moved that frame, but that’s exactly what is necessary for
mouselook handling. i’ve seen a great number of progs re-setting the
cursor each frame, it’s obviously the way it should be done. why is the
warpmouse command so slow or why can’t i use it every frame?

eik

I had the exact same thing in my program.
But just moving the mouse to a location each frame or each move event is
not the way.
Use SDL_GrabInput instead. This way, the mouse won’t escape out of the
window, and you’ll continue to get mouse-move events as much as you like.

RK.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

U welcome.
:slight_smile:
RK.

Eike Umlauf wrote:>oh WOW didn’t know that!!! :slight_smile:

thx a lot :slight_smile:

You can’t tell how much the mouse has moved?
Are you, by any chance, getting the mouse coordinate and comparing it to
the one from the last event?
Because the mouse motion event contain ‘xrel’, ‘yrel’ for getting the
relative motion in the X/Y direction…
And in my program, using ‘xrel’ and ‘yrel’ for mouselook handling works
just fine, whereever the mouse cursor is.
RK.

Eike Umlauf wrote:

sure but as soon as the mouse is at the screen border and i continue to
move the mouse in that direction i cannot tell how far (fast) the mouse
has been moved that frame, but that’s exactly what is necessary for
mouselook handling. i’ve seen a great number of progs re-setting the
cursor each frame, it’s obviously the way it should be done. why is the
warpmouse command so slow or why can’t i use it every frame?

eik

I had the exact same thing in my program.
But just moving the mouse to a location each frame or each move event is
not the way.
Use SDL_GrabInput instead. This way, the mouse won’t escape out of the
window, and you’ll continue to get mouse-move events as much as you like.

RK.

Check out http://www.paragui.org/> ----- Original Message -----

From: tonyl@madscifi.com (Tony Leotta)
To:
Sent: Friday, June 14, 2002 4:27 AM
Subject: [SDL] Are there any SDL GUI Libraries?

I’ve been reading SDL source for about 1 month now and I have a rather
dumb question…

Are there any standard or non-standard libraries for creating GUI with
SDL?

Is there a GUI creation tool with WYSIWYG editing?

So I would like to do the following:

  1. create a drop down menu system

  2. create dialog boxes

  3. create status bar

  4. Open a file requestor

etc. etc. etc,

Thanks and sorry for the dumb ass newbie question.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl