From: Max G. <gi...@li...> - 2000-06-12 20:13:14
|
p wrote: > glj.gljMakeCurrent(true); > ... do some opengl things > glj.gljCheckGL(); > glj.gljFree(); > > that code worked on my system... but sometimes i got also a problem because the gl-system > was not inialized (gl was null)... so as it also mentioned in the gl4java-faq it is a > good approach to do all opengl-stuff within the (e.g.) display-method. It's absolutely not necessary under one condition: GL component must be visible on screen (I mean visible in the terms of user interface - it need not to be visible to the user, it may be hidden under some other component). When it's visible you're guaranteed that it never is null. If it is not visible (ie. destroyed) you will need to initialize it completely anyway so that's not a problem. > i did it also in > this way: if i want to have new textures assigned i put the data in a queue and the > display-method checks the queue and does the work. I also tried this before. Definitely too complicated solution for any serious setup work. I don't know what you're using it for so I can't suggest anything. Bye, Max -- Max Gilead (gi...@li...) http://3d.linart.krakow.pl/OfficinaArtificialis ----------------------------------------------------------------------------- -- Why is it that all of the instruments seeking intelligent life in the -- -- universe are pointed away from Earth? -- |