How render my raytracer in window ?



I work on cycles for lightwave, so my question is how render my raytracer in window ? Need to create XPanel/Panel or other UI ? How to transfert all pixel rendering in window?


Electron wrangler
Sorry, but that's a rather complex question, the short/quick answer is: Your renderer has produced a bitmap image of some format in memory, you just need to use (or convert) that into a pixmap format that can be displayed in a panels OpenGL window (using GL, or load from disk and display using GL, whatever), if that's what you _really_ want to do. I highly doubt that's what you should actually do in this case.

If you're trying to write a LW external render engine plugin that behaves similarly to the native render engine, then you need to look at the ExtRendererHandler docs, the fifth arg handed to your "render" function is a "EXTRENDERERIMAGE *render_image" function pointer which either displays or writes the image your render function has generated to disk. You'd normally use that to trigger rendered image display/write-to-disk post-rendering. Don't forget, if LW is run as screamernet (iow, as a render node), your plugin may not have the _ability_ to usefully display dialogs, extra windows, etc. so you need to keep that use case in mind during design.

You'll need to provide a bit more info about what's going on in your code, where you are in the rendering lifecycle, what interfaces you have available, etc. for anyone to really help with that question. Even in terms of using Panels (XPanels lacks easy image display other than manually-drawn thumbnails), without a lot better understanding of the context where your panel is executing, it's very difficult to provide a _useful_ quick answer to your question, sorry. Provide more info and folks here can probably help more.

Also, note that there's a sample ExtRendererHandler sample in the LWSDK samples/Layout/ExtRend/ directory. Have you reviewed that already? If not, I highly recommend you do so, and understand what all it implements (what everything does, and why they exist), before going much further in your own project.

Good luck!
Last edited:


Thank you jwiede and welcome to your help for me.

Yeah pixmap is what about I think to work with 3D rendering, ok i mean i will code to raster on screen for realtime and update in window panel/xpanel, I nearly think on how to make it but the process is slow because I need to change some code in Cycles to adapt with lightwave.

ExRenderHandler sample is helpful for my dev and make me how to think to code :)

Do not worry jwiede, to force to seek I would eventually find the solution!
Top Bottom