Page 1 of 1

Restoring textures when resizing window

Posted: Sun Jan 04, 2009 20:56
by Nimos
Is the manual restoration of textures described in the tutorial for CEGUI with SDL and OpenGL still needed after SDLs fix in SDL 1.2.10 that restores the OpenGL context when the window resizes?

Code: Select all

renderer->grabTextures();
//your resize code here, including the SDL_SetVideoMode call
renderer->restoreTextures();
renderer->setDisplaySize(CEGUI::Size(e.resize.w, e.resize.h));


Regards
Nimos

Posted: Mon Jan 05, 2009 09:38
by CrazyEddie
Hi,

I'm not certain, as I do not use SDL. Perhaps you could try it out and let us know? :)

CE.

Posted: Tue Jan 06, 2009 17:38
by Nimos
It seems to work without using grabTextures and restoreTextures, at least in Ubuntu.
But perhaps I should still use them just in case. :)

Posted: Tue Jan 06, 2009 21:30
by CrazyEddie
Thanks for the feedback :)

I guess using the calls unnecessarily is better than not having them and getting bitten further down the line (plus you're then compatible with older SDL versions also!).

I might run some tests on this soon to double-check the status of this, because then I might be able to save myself from needing these functions in the new renderer rewrite ;)

CE.