What happened to SDL_SetVideoMode() in SDL2 |
arif
Guest
|
Hi,
A simple test code is not building because there is not SDL_SetVideoMode() and SDL_Flip() in SDL2. What happened to them? Who replaced them? In version 1.2.15 $arif@khost:~/sak/SDL$ global -x SDL_SetVideoMode SDL_SetVideoMode 583 src/video/SDL_video.c SDL_Surface * SDL_SetVideoMode (int width, int height, int bpp, Uint32 flags) $arif@khost:~/sak/SDL$ global -x SDL_Flip SDL_Flip 1105 src/video/SDL_video.c int SDL_Flip(SDL_Surface *screen) But in hg tip, there is nothing. arif@khost:~/sak/tests$ gcc sdl_load_image.c `pkg-config --cflags --libs sdl2` sdl_load_image.c: In function ‘main’: sdl_load_image.c:9:9: warning: assignment makes pointer from integer without a cast [enabled by default] /tmp/cc4ZEiir.o: In function `main': sdl_load_image.c.text+0x43): undefined reference to `SDL_SetVideoMode' sdl_load_image.c.text+0x9e): undefined reference to `SDL_Flip' collect2: ld returned 1 exit status grepping them comes up with nothing arif@khost:~/sak/SDL$ hg tip changeset: 7306:1516fe08e6ec tag: tip user: Sam Lantinga date: Tue Jun 11 08:37:03 2013 -0700 summary: Added an arbitrary limit to the number of queued events so it doesn't grow unbounded. -- Cheers arif _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||
|
What happened to SDL_SetVideoMode() in SDL2 |
Leszek Godlewski
Guest
|
In SDL 2 you need to create a window and a renderer. Check out the
headers and/or docs. Regards, Leszek 2013/6/12 arif:
SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
What happened to SDL_SetVideoMode() in SDL2 |
Andreas Schiffler
Guest
|
http://wiki.libsdl.org/moin.fcg/MigrationGuide
"You update the physical screen using SDL_RenderPresent, which replaces SDL_Flip and SDL_UpdateRects. " "SDL_SetVideoMode from 1.2 is now just a compatibility function, you will not use it anymore. You can use SDL_GetWindowSurface to get a 1.2 style surface for a window if necessary. " On 6/12/2013 7:15 AM, arif wrote:
|
|||||||||||||
|
What happened to SDL_SetVideoMode() in SDL2 |
MrOzBarry
|
SDL2 deprecated SDL_SetVideoMode, and now abstracts video handling by handling multiple windows. Check out the migration guide.
On Wed, Jun 12, 2013 at 10:15 AM, arif wrote:
|
|||||||||||||
|