SDL Cursor and Fullscreen!

Hi all!

i have adress this issue about a year ago… i ve manage to work around but
this time its getting a bigger problem…

The cursor is not showing or behave funny in full screen… for some reason it
work fine in window mode… so, something is happening to the cursor handlening
in full screen… we know that for sure…

in this case sdl may not be the problem here but i ll like to get a
confirmation on this:

exemple, playing a quicktime movie in window mode throught an sdl
window/surface on windows xp… quicktime hide the cursor… when the movie is
done… it gives back the cursor… in full screen… after the movie s done…
the cursor and mouse buttons are not responding at all…

once again, in this case there s a slight chance that sdl is not involve
here… but i doubt it…

my question is… the mouse/cursor handeling in window mode is great… can we
reproduce the same behaviour in full screen? if yes… how would we do this?

THX

i found something more interessting!

in a sdl 1.2.8 window fullscreen, if we do:

int g_3dMode = SDL_OPENGL | SDL_HWSURFACE | SDL_HWACCEL | SDL_DOUBLEBUF;

SetVideoMode(WINDOW_TITLE, 800, 600, 32, g_3dMode)) == NULL)
SetVideoMode(WINDOW_TITLE, 800, 600, 32, g_3dMode)) == NULL)

the cursor is still there… but if we do:

int g_3dMode = SDL_OPENGL | SDL_HWSURFACE | SDL_HWACCEL | SDL_DOUBLEBUF;
int g_videoMode = SDL_HWSURFACE | SDL_HWACCEL;

SetVideoMode(WINDOW_TITLE, 800, 600, 32, g_3dMode)) == NULL)
SetVideoMode(WINDOW_TITLE, 800, 600, 32, g_videoMode)) == NULL)
SetVideoMode(WINDOW_TITLE, 800, 600, 32, g_3dMode)) == NULL)

cursor/mouse s gone!

any ideas how to fix this?

thx

oups!

int g_3dMode = SDL_FULLSCREEN | SDL_OPENGL | SDL_HWSURFACE | SDL_HWACCEL |
SDL_DOUBLEBUF;
int g_videoMode = SDL_FULLSCREEN | SDL_HWSURFACE | SDL_HWACCEL;

makes more sens this way!

Minor irrelevant notes:

  • A surface can be either an SWSURFACE, HWSURFACE or OPENGL
    surface. Supplying both SDL_OPENGL and SDL_HWSURFACE just makes the
    surface an OpenGL surface.
  • SDL_HWACCEL is not a valid flag to SDL_SetVideoMode. That’s not the
    use for it.
  • Double buffering with OpenGL is done via
    SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1) and flipping via
    SDL_GL_SwapBuffers(), not SDL_DOUBLEBUFFER to SetVideoMode and
    SDL_Flip().On Fri, Apr 01, 2005 at 09:52:51PM +0000, Golgoth! wrote:

int g_3dMode = SDL_FULLSCREEN | SDL_OPENGL | SDL_HWSURFACE | SDL_HWACCEL |
SDL_DOUBLEBUF;
int g_videoMode = SDL_FULLSCREEN | SDL_HWSURFACE | SDL_HWACCEL;

makes more sens this way!


Petri Latvala
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050402/a245a39b/attachment.pgp

[…]

int g_3dMode = SDL_OPENGL | SDL_HWSURFACE | SDL_HWACCEL | SDL_DOUBLEBUF;
int g_videoMode = SDL_HWSURFACE | SDL_HWACCEL;

SetVideoMode(WINDOW_TITLE, 800, 600, 32, g_3dMode)) == NULL)
SetVideoMode(WINDOW_TITLE, 800, 600, 32, g_videoMode)) == NULL)
SetVideoMode(WINDOW_TITLE, 800, 600, 32, g_3dMode)) == NULL)

cursor/mouse s gone!

any ideas how to fix this?

You cannot have a mouse cursor with hardware surfaces in fullscreen mode.
I can’t remember the exact reason (try searching the archiv),
but I doubt that there is another way than painting the mouse cursor yourself.

Regards,
Johannes

< http://libufo.sourceforge.net > The OpenGL GUI ToolkitOn Friday 01 April 2005 23:35, Golgoth! wrote:

so i ve trued this:

int g_3dMode = SDL_OPENGL | SDL_FULLSCREEN;
int g_videoMode = SDL_HWSURFACE | SDL_FULLSCREEN;

SetVideoMode(WINDOW_TITLE, 800, 600, 32, g_videoMode)) == NULL)
SetVideoMode(WINDOW_TITLE, 800, 600, 32, g_3dMode)) == NULL)

still no cursor…

can we find a way to reset the cursor?
or stop SDL_HWSURFACE doing hocus pocus stuff with the cursor?

and/or convert SDL_OPENGL to a valide surface i could pass to quicktime… so
far quicktime only works with an SDL_HWSURFACE!

thx

Quoth Golgoth! , on 2005-04-02 17:51:35 +0000:

and/or convert SDL_OPENGL to a valide surface i could pass to
quicktime… so far quicktime only works with an SDL_HWSURFACE!

I assume QuickTime wants a pointer to where to put the pixel data.
OpenGL doesn’t provide an immediate way to do this. What you might be
able to do is create a software surface, then either:

  • upload the data to OpenGL as a texture and draw a quadrilateral
    with that texture (using glTexImage2D, glBindTexture, glGenTextures,
    glDeleteTextures, glTexParameter, and glTexEnv), or
  • copy the rectangle of pixels directly to the screen
    (using glDrawPixels).

HTH.

—> Drake Wilson
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050402/caffbb02/attachment.pgp

yes this is gonna be the second phase… took me 2 weeks to figure it out how
to have video plaback… but for the project i m on the due date is next
week… im not convience i can mange to do this in time… i look at apple
samples and its nothing but easy to implement… plus samples dont use sdl and
are mac based… so its even more confusing… if only i can get the cursor
back it will solve the phase one… for now!

then again if someone can come out with a starter how to grab quicktime (or any
video lib) buffer and transfer it to opengl throught sdl i ll be more then
happy to experiment with it… i realized it sould nt be a lot of ppl who have
played with this kind of pipeline… think i ll need a small miracle here!

if ne1 interested i can post the code i came up with to make sdl play back
quicktime and start from there! playback video should nt be a secret for ne1!

thx

i look at apple samples and its not easy to implement…

Hello all,
It’s been a while since I’ve posted, and hopefully this isn’t too OT.
I was wondering if anyone has tried to use X with dual touchscreens.
The dual monitor portion doesn’t seem to be too difficult however, the
touch portion doesn’t seem quite so easy.

Thank you,
Robert Diel