Hello,
I am writing a swing applet which needs multiple GLJPanel instances sharing a single context. But after creating GLJPanel I can not use getContext method to access the GLContext instance being used due to null pointer exception. It seems like the context creating is being done after component gets visible. Even my attempts to use invokeLater to get context after component creation events are processed failed also. Even it is possible, it does not seem like an elegant way to get context after creating the first GLJPanel instance and create other panels later.
I tried GLDrawableFactory.getFactory().createExternalGLContext() to create a context but it fails with:
javax.media.opengl.GLException: Error: attempted to make an external GLContext without a drawable/context current.
Is there a way to explicitly create GL context that can be used by GLJPanel instances ?
regards