Page 1 of 1

ceGUI::Texture to SDL_surface

Posted: Fri Aug 07, 2009 14:05
by Tiresias
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

Re: ceGUI::Texture to SDL_surface

Posted: Sat Aug 08, 2009 08:21
by CrazyEddie
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.

Re: ceGUI::Texture to SDL_surface

Posted: Wed Aug 12, 2009 10:11
by Tiresias
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 !