about SDL_CreateWindowFrom |
ÕÅÇÉƽ
Guest
|
dears
I use SDL_CreateWindowFrom to create window.It can play video Normally. but if resize the window,the video will static. Why?how can i fix this bug? |
|||||||||||
|
MrTAToad
|
Probably the video routine needs to know the window size - what system are you using?
|
|||||||||||
|
about SDL_CreateWindowFrom |
ÕÅÇÉƽ
Guest
|
dear mrtatoad
windows 7 system. I used SDL_SetWindowSize to set window size.but Bug still exists.From: Date: Wed, 20 May 2015 11:56:41 +0000 To: Subject: Re: [SDL] about SDL_CreateWindowFrom Probably the video routine needs to know the window size - what system are you using? _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||
|
about SDL_CreateWindowFrom |
Eric Wing
Guest
|
On 5/20/15, å¼ å·§å¹³ wrote:
Are you doing actual video (e.g. movies), or do you mean your textures? If movies, how are you getting them? Are you using the SDL 2D API, or do you have your own OpenGL context (or maybe Direct3D context)? On Windows, particularly with the 2D API using the Direct3D backend, textures can get lost/destroyed on window resizes or fullscreen toggles. The workaround is to completely reload your textures on window resize events. -Eric -- Beginning iPhone Games Development http://playcontrol.net/iphonegamebook/ _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
about SDL_CreateWindowFrom |
ÕÅÇÉƽ
Guest
|
dears
I'm developing a video player On Windows,using sdl2+ffmpeg with the 2D API using the Direct3D. If i use SDL_CreateWindow to create a playing window everything is ok. but if i use SDL_CreateWindowFrom to create a playing window,when resize window,the video static.
|
|||||||||||||||
|
about SDL_CreateWindowFrom |
Eric Wing
Guest
|
On 5/21/15, å¼ å·§å¹³ wrote:
Okay, to be clear, if you use SDL_CreateWindow, and everything else is the same, your video player works fine, including the window resize? But if you change to SDL_CreateWindowFrom (and nothing else is changed), then when you resize the window, you get video static? If this is the case, I'm not an expert on SDL_CreateWindowFrom, but I would speculate that SDL_CreateWindow does something to handle the Direct3D context resize, which SDL_CreateWindowFrom may be missing. If you request the OpenGL renderer, do you see any difference? Use the SDL_SetHint API before your CreateWindow call. SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengl"); I hope somebody else with more knowledge in the area might chime in. -Eric -- Beginning iPhone Games Development http://playcontrol.net/iphonegamebook/ _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|