Login  Register

Re: JOGL Questions - Guidance on creating Scene class

Posted by elect on Oct 29, 2015; 5:30pm
URL: https://forum.jogamp.org/JOGL-Questions-Guidance-on-creating-Scene-class-tp4035659p4035670.html

glangho wrote
Ok, you win :)  Was hoping not to have to change my code again XD
it's just my opinion, if you want you can leave as it it :)

glangho wrote
I want to make sure I understand your approach for initialization.  You're saying I should initialize all my shaders and textures in an enum and store their glGetShaderi/glGenTexture values in an int array assigned as a value of the enum?  I'm not sure where ordinal() fits in since we're talking about int arrays.
For the shaders, I suggest you to use the jogl utility class, it makes things much easier and less verbose.
For textures, save the int id into an integer array and use an enum to handle it. Something like here