ceGUI::Texture to SDL_surface

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

Tiresias
Quite a regular
Quite a regular
Posts: 74
Joined: Thu May 22, 2008 10:20

ceGUI::Texture to SDL_surface

Postby Tiresias » Fri Aug 07, 2009 14:05

Hello

i would like to convert a loaded ceGUI::Texture into a SDL_Surface, is there any lib doing this or API in the ceGUI SDK allowing to do this ?
(the texture is loaded into memory using pTexture->LoadFromMemory() , but then not sure how to use this texture to create a new SDL_surface)

(the texture is created to a openGL renderer)
Thanks

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

Re: ceGUI::Texture to SDL_surface

Postby CrazyEddie » Sat Aug 08, 2009 08:21

I don't know the answer to the question; I am not an SDL user.

I can tell you there is no direct usage of, or dependency on, the SDL libs in CEGUI - this means there is no API in CEGUI that can immediately give you what you need. There is a function on the OpenGLTexture called OpenGLTexture::getOGLTexid which will return the underlying OpenGL texture name - perhaps you can subsequently use that in the construction of an SDL surface? (I don't know, as I say, I don't use SDL).

CE.

Tiresias
Quite a regular
Quite a regular
Posts: 74
Joined: Thu May 22, 2008 10:20

Re: ceGUI::Texture to SDL_surface

Postby Tiresias » Wed Aug 12, 2009 10:11

Ok most important thing was to know if there was something already done,
if we go this way we may post some code to do it,
Thanks !


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 8 guests