I want to render a single frame from an offscreen JMonkeyScene to a JPanel.
I have tried using TestRenderToMemory.java to constantly render images, but that takes up a large chunk of the cpu. I’ve tried to get the RenderToMemory method to render only when i programmatically tell it too, but i haven’t gotten that to work yet, possibly because i am not sure exactly how every method works.
Anyway, I am just trying to make a preview frame for models and textures. So if anyone knows how to do this differently or knows how to manipulate the RenderToMemory method, the help would be appreciated.
I want to render a single frame from an offscreen JMonkeyScene to a JPanel.
I have tried using TestRenderToMemory.java to constantly render images, but that takes up a large chunk of the cpu. I've tried to get the RenderToMemory method to render only when i programmatically tell it too, but i haven't gotten that to work yet, possibly because i am not sure exactly how every method works.
Anyway, I am just trying to make a preview frame for models and textures. So if anyone knows how to do this differently or knows how to manipulate the RenderToMemory method, the help would be appreciated.
before, i have done preview for models in that way, but it was Slooooow.(because i was creating many images for WorldEditor)
so i just changed it to load premade "avatars" for it.
if you want to make just single preview, then it could work with RenderToMemory
but anyway, IMO it's bad idea for a preview.
you can always just load object to a GUI ViewPort.
about textures, you can just load them as images, so...