I have a wxWidgets application that uses SDL for image processing, but not
for output.
So in order not to have an SDL window, I would call
SDL_SetVideoMode(0,0,0,SDL_SWSURFACE). Or leave it out altogether, which
seemed to work too.
I could then create surfaces and overlays and have blit them to my wxWidgets
controls.
But now that I have upgraded to 1.2.12, I get an SDL window of the current
desktop size if I call SDL_SetVideoMode as in agreement with the changes
introduced with 1.2.10.
And if I leave it out, I get no window, but then SDL_DisplayYUVOverlay
fails, presumably because it clips the rectangle to the screen area, which
is absent.
If have verified this by removing the lines from SDL_yuc.c that check for
screen height and width. Without these lines I can use SDL without calling
SDL_SetVideoMode and have SDL_DisplayYUVOverlay work too.
I am sure there might be unwanted side effects, so I leave it up to you
experts to point me to a better solution.
Please advise.–
View this message in context: http://www.nabble.com/Still-get-SDL-window-with-SetVideoMode(0%2C0%2C0%2CSDL_SWSURFACE)-tf4522887.html#a12902720
Sent from the SDL mailing list archive at Nabble.com.
Hi,On Mon, Oct 01, 2007 at 12:20:20AM -0700, manmach wrote:
I have a wxWidgets application that uses SDL for image processing, but not
for output.
So in order not to have an SDL window, I would call
SDL_SetVideoMode(0,0,0,SDL_SWSURFACE).
This now means “use the current resolution”.
I believe you can disable the window using:
putenv(“SDL_VIDEODRIVER=dummy”);
Can you try that?
–
Sylvain
Sylvain Beucler wrote:
Hi,
I have a wxWidgets application that uses SDL for image processing, but
not
for output.
So in order not to have an SDL window, I would call
SDL_SetVideoMode(0,0,0,SDL_SWSURFACE).
This now means “use the current resolution”.
I believe you can disable the window using:
putenv(“SDL_VIDEODRIVER=dummy”);
Can you try that?
I can, I did and it works. At least on my Windows machine. I’ll be trying on
my Linux machine next.
Thanks a bundle.
I realise mine might be an unusual usage of SDL, but maybe especially
because of that, it might be worth adding a note to the FAQ for instance.
regards,
Erik> On Mon, Oct 01, 2007 at 12:20:20AM -0700, manmach wrote:
View this message in context: http://www.nabble.com/Still-get-SDL-window-with-SetVideoMode(0%2C0%2C0%2CSDL_SWSURFACE)-tf4522887.html#a12976760
Sent from the SDL mailing list archive at Nabble.com.
Hello !
I believe you can disable the window using:
putenv(“SDL_VIDEODRIVER=dummy”);
Can you try that?
If you never want to have a window in your app,
you can use SDL_putenv in your C code.
CU
Torsten Giebl wrote:
If you never want to have a window in your app,
you can use SDL_putenv in your C code.
Another great piece of advice! Of course, having learned about
SDL_VIDEODRIVER, I can now find threads on the same subject, making my
asking seem silly :-)–
View this message in context: http://www.nabble.com/Still-get-SDL-window-with-SetVideoMode(0%2C0%2C0%2CSDL_SWSURFACE)-tf4522887.html#a12976941
Sent from the SDL mailing list archive at Nabble.com.
Torsten Giebl wrote:
If you never want to have a window in your app,
you can use SDL_putenv in your C code.
Another great piece of advice! Of course, having learned about
SDL_VIDEODRIVER, I can now find threads on the same subject, making my
asking seem silly
By the way:
I could then create surfaces and overlays and have blit them to my
wxWidgets controls.
How did you blit the surface to wxWidgets?
Thanks,On Mon, Oct 01, 2007 at 03:56:02AM -0700, manmach wrote:
–
Sylvain
Sylvain Beucler wrote:
By the way:
I could then create surfaces and overlays and have blit them to my
wxWidgets controls.
How did you blit the surface to wxWidgets?
By creating a bitmap from the SDL_Surface and painting that using a buffered
paint DC. See code below.
mCanvas is a 24-bit RGB surface created with SDL_CreateRGBSurface. This
needs to be in OnPaint.
// create a bitmap from our pixel data
wxBitmap bmp(wxImage(mCanvas->w, mCanvas->h,
static_cast<unsigned char *>(mCanvas->pixels),
true));
// paint it
wxBufferedPaintDC dc(Panel, bmp);--
View this message in context: http://www.nabble.com/Still-get-SDL-window-with-SetVideoMode(0%2C0%2C0%2CSDL_SWSURFACE)-tf4522887.html#a12978744
Sent from the SDL mailing list archive at Nabble.com.