Renderer Init Procedure

Hi JME Gurus!

I already posted that question several times but noone could give me an answer. So I try it with another formulation.

I build a JME Plugin on top of Netbeans platform. My Problem is that I use JMECanvas and NOT one of the predefined Application Game classes. I recognized that my renderer is init if AND ONLY if the JMECanvas is put to, e.g. a JFrame and displayed for the first time. This is a huge problem for me. I don't understand the queue of init. Is there any method which I can use to init the renderer even if the JMECanvas is NOT YET displayed?

Please help.

Thanks a lot.

You can't initialize the renderer unless the OpenGL context is active, but the context only becomes active when the canvas gets a native peer, which only happens the first time it becomes visible on the screen.

I had a load of issues with canvases and netbeans platform, and the ways I got around them are probably not possible in jME2. The issue is that under certain circumstances the canvas' native peer will be lost and the context will have to be re-initialized, and at that point the entire scene graph becomes invalid :frowning: The only way around it is to reset all OpenGL objects being used, or re-create the scene graph from scratch.

Thanks a lot for fast answer.

This is the first definitive anser to my question. So, if I understand it correctly, there is NO way to init it before the peer gets active.

You said that you had lots of issues with Netbeans platform. Would you say that JME + Netbeans is a bad choice? Could you suggest any stable way of connecting netbeans and JME or would you suppose not to use both at the same time?