Restoring textures when resizing window

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Nimos
Just popping in
Just popping in
Posts: 12
Joined: Sun Jan 04, 2009 20:13

Restoring textures when resizing window

Postby Nimos » Sun Jan 04, 2009 20:56

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

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Mon Jan 05, 2009 09:38

Hi,

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

CE.

Nimos
Just popping in
Just popping in
Posts: 12
Joined: Sun Jan 04, 2009 20:13

Postby Nimos » Tue Jan 06, 2009 17:38

It seems to work without using grabTextures and restoreTextures, at least in Ubuntu.
But perhaps I should still use them just in case. :)

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Tue Jan 06, 2009 21:30

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.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 17 guests