Hi another newbie here

hi Im new at SDL,
i was using opengl within glut before the sdl
my problem is that in glut i could set the window position but in sdl i
couldnt find it?(because of my ignorance?)
and can you tell sth about mouse events(especially mousemotion) [in glut
there was active and passive mouse motion]
thanks in advance–
Just say the words , your wish is my command…

HI i don’t know about windows positioning in SDL but you can tell SDL the
windows size

and to get mouse movenent infos you have too poll the SDL event list in your
main loop

SDL_Event event;

while( SDL_PollEvent(&event) )
{
switch( event.type )
{
SDL_MOUSEMOTION:
//Mouse motion code

  break;

      SDL_MOUSEBUTTONDOWN:
    //Mouse button down code

  break;

      SDL_MOUSEBUTTONUP:
    //Mouse button up code

  break;




   }

}

you should take a look to the SDL API documentation for SDL_Event

2007/4/12, Engin ?alar :>

hi Im new at SDL,
i was using opengl within glut before the sdl
my problem is that in glut i could set the window position but in sdl i
couldnt find it?(because of my ignorance?)
and can you tell sth about mouse events(especially mousemotion) [in glut
there was active and passive mouse motion]
thanks in advance


Just say the words , your wish is my command…


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org