examples/sdlshare: Create an OpenGL context for OpenGL 2.0

This commit is contained in:
Sebastian Dröge 2019-03-13 07:21:12 +01:00
parent eb3699a74b
commit abc243fee4
2 changed files with 6 additions and 0 deletions

View file

@ -311,6 +311,9 @@ main (int argc, char **argv)
return -1;
}
SDL_GL_SetAttribute (SDL_GL_CONTEXT_MAJOR_VERSION, 2);
SDL_GL_SetAttribute (SDL_GL_CONTEXT_MINOR_VERSION, 0);
sdl_message_event = SDL_RegisterEvents (1);
g_assert (sdl_message_event != -1);

View file

@ -311,6 +311,9 @@ main (int argc, char **argv)
return -1;
}
SDL_GL_SetAttribute (SDL_GL_CONTEXT_MAJOR_VERSION, 2);
SDL_GL_SetAttribute (SDL_GL_CONTEXT_MINOR_VERSION, 0);
/* Create a 640x480 OpenGL screen */
sdl_window =
SDL_CreateWindow ("SDL and gst-plugins-gl", SDL_WINDOWPOS_UNDEFINED,