In my app I have a camera feed that I get using a C module. In Python I have a task that does this each frame:
self.nui.update()
self.label_texture.setRamMipmapPointerFromInt(self.nui.label_map, 0, 640*480*4)
Where self.nui is a binded C class, and self.label_texture was previously initialized like this:
self.label_texture = Texture()
self.label_texture.setCompression(Texture.CMOff)
self.label_texture.setup2dTexture(640, 480, Texture.TUnsignedByte, Texture.FRgba8)
self.label_texture.makeRamImage()
It works, but the video feed sometimes freezes for several seconds. I have previously built a C/OpenGL app using the same video feed that works fine, so I suspect there is a problem with how I send the data to Panda. Should I call setRamMipmapPointerFromInt each frame? If not, how do I tell Panda it should read the texture data again?
Thanks!