When we call SDL_DisplayYUVOverlay(…) the overlay is blitted to the screen,
but we first want to draw other graphic stuff to the display before blitting.
Example (pseudo code):
SDL_Surface display = SDL_GetVideoSurface();
SDL_Overlay ov = SDL_CreateYUVOverlay(100, 100, 2, display);
SDL_DisplayYUVOverlay(ov,…); //At this point the overlay is displayed to the
monitor!!! But we don’t want it!!!
//lots of stuff
SDL_DrawPixel(display,10,10,RED); //draw a pixel
SDL_Flip(); //show all
At SDL_Flip the programm should show the YUV_Overlay and the drawed pixel in one
step and not show the Overlay in advance.
Thx!
Carsten wrote:
When we call SDL_DisplayYUVOverlay(…) the overlay is blitted to the screen,
but we first want to draw other graphic stuff to the display before blitting.
Example (pseudo code):
SDL_Surface display = SDL_GetVideoSurface();
SDL_Overlay ov = SDL_CreateYUVOverlay(100, 100, 2, display);
SDL_DisplayYUVOverlay(ov,…); //At this point the overlay is displayed to the
monitor!!! But we don’t want it!!!
//lots of stuff
SDL_DrawPixel(display,10,10,RED); //draw a pixel
SDL_Flip(); //show all
At SDL_Flip the programm should show the YUV_Overlay and the drawed pixel in one
step and not show the Overlay in advance.
Well, that’s the way overlays work. If you don’t like it, I suggest you
don’t use overlays. There’s no way around this since it’s done in hardware.
Stephane