L
L
logan baby2021-08-12 13:10:26
C++ / C#
logan baby, 2021-08-12 13:10:26

What function to use in SDL 2.0 instead of SDL_SetVideoMode?

In version sdl 1.2 there is this function, which in 2.0, instead of this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Ananiev, 2021-08-12
@SaNNy32

https://stackoverflow.com/a/38297028

S
Sergey Karbivnichy, 2021-08-12
@hottabxp

1.2:

SDL_WM_SetCaption("My Game Window", "game");
SDL_Surface *screen = SDL_SetVideoMode(640, 480, 0, SDL_FULLSCREEN | SDL_OPENGL);

2.0:
SDL_Window *screen = SDL_CreateWindow("My Game Window",
                          SDL_WINDOWPOS_UNDEFINED,
                          SDL_WINDOWPOS_UNDEFINED,
                          640, 480,
                          SDL_WINDOW_FULLSCREEN | SDL_WINDOW_OPENGL);

SDL 1.2 to 2.0 Migration Guide

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question