Hi. I’m trying to extract an offscreen buffer into a texture I can apply to a simple object. The documentation for pandac.GraphicsBuffer is sparse. When I try to create one, I get this fine error message:
What can I do?
[/quote]
[/url]
Hi. I’m trying to extract an offscreen buffer into a texture I can apply to a simple object. The documentation for pandac.GraphicsBuffer is sparse. When I try to create one, I get this fine error message:
What can I do?
[/quote]
[/url]
This comes up from time to time. It is mentioned in this thread: https://discourse.panda3d.org/viewtopic.php?t=244 as well as in this one: https://discourse.panda3d.org/viewtopic.php?t=8
The short answer to your question is to use:
buf = base.win.makeTextureBuffer('name', xsize, ysize)
to create a functioning offscreen buffer. The sizes should be powers of 2, like any texture requirements. Then you can get the associated texture with buf.getTexture() and apply it wherever you want.
David