Re: JOGL Questions - Guidance on creating Scene class
Posted by
elect on
Oct 30, 2015; 8:45am
URL: https://forum.jogamp.org/JOGL-Questions-Guidance-on-creating-Scene-class-tp4035659p4035673.html
glangho wrote
The more I think about this post, the less I feel a need to have a separate class for rendering. Maybe it just makes more sense to do everything in the GLEventListener display method using GLAutoDrawable. It certainly sounds safer. Is this "professionally / commercially" acceptable?
If your rendering is quite simple, yes, but if you will end up with 1/2k+ lines, then I'd say something may be easily improved. Incapsulate code and divide it by a logic point of view, it makes it more readable, that means in turn less bugs, easier to debug, easier to re-use (if multiple scene needs to execute the same steps), easier to implement new features, etc..
Lines are not a reliable measurement, but they can be a signal/symptom.