Login  Register

Re: JOGL Questions - Guidance on creating Scene class

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

elect wrote
1) see reddit
Ok, you win :) Was hoping not to have to change my code again XD
elect wrote

2) int arrays controlled by enums. You can retrieve an int by an enum with ordinal(). If you use same code for multiple scenes, create additional subscene in between and extend from it. Read that guide with a grain of salt, it is quite old.
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.
<quote author="elect">
elect wrote
4) I'd say not, but I didn't spend so much time getting it work since I saw it is quite old. I am working to update it. If you need it now I have a self-made lib for the meanwhile.
I think I'm good for now. If I end up needing something I can probably just use the native OpenGL commands.