I'm trying to display dynamically generated images in PyCEGUI but I do not know exactly how to do it. I have python buffer object with image data in RGB format which I want to load into gui. My guess is that I have to create PyCEGUI Texture, then put it into PyCEGUI imageset and then display it in Window, but I'm stuck on creating Texture step.
Example code(trying to create 15x15 image):
Code: Select all
b = bytearray(675)
b = buffer(b)
self.t = PyCEGUI.Texture()
self.t.loadFromMemory(b,PyCEGUI.Size(15.0,15.0),PyCEGUI.Texture.PF_RGB)
Produces error:
Code: Select all
Texture.loadFromMemory(Texture, buffer, Size, PixelFormat)
did not match C++ signature:
loadFromMemory(Texture_wrapper {lvalue}, void const*, CEGUI::Size, CEGUI::Texture::PixelFormat)
loadFromMemory(CEGUI::Texture {lvalue}, void const* buffer, CEGUI::Size buffer_size, CEGUI::Texture::PixelFormat pixel_format)
Any help would be appreciated.