The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
can't use opengl if i use SDL_CreateWindowFrom
airc


Joined: 21 May 2014
Posts: 5
Hi
iam creating my edit tool using wxwidgets & sdl2 , i notied that sdl2 uses d3d9 by default .
sdl2 window initialized with SDL_CreateWindowFrom(wxpanel->GetHandle()) , so there is no SDL_WINDOW_OPENGL flag .
i used SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengl") befor the creation of the renderer , but sdl2 still use d3d9.

any advices ?

thanks
can't use opengl if i use SDL_CreateWindowFrom
ancientli


Joined: 01 Jul 2015
Posts: 45
If you want use opengl, must call SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengl") before SDL_CreateRenderer.
airc


Joined: 21 May 2014
Posts: 5
yes i did that , but nothings changed . SDL_RendererInfo.name always show direct3d9
airc


Joined: 21 May 2014
Posts: 5
after searching seems an old problem , sdl can't create an opengl context for a forigen window ! really weird.