We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I am working on a class which must be evoked before DISABLE_DEPTH_TEST. this a little inconvenient at some moments when organising the code so I would like to be able to test if it is already disabled.
I thought this could work:
boolean test = ((PGraphics3D)g).hints[ENABLE_DEPTH_TEST] ;
but hints is not visible in PGraphics:
protected boolean[] hints = new boolean[HINT_COUNT];
Because this is being casted to ((PGraphics3D)g) I am a little confused on using reflection. Or I am doing something wrong?
Thanks!
Answers
Simplest approach is to store that information on your own.
Create your own
boolean
for it. And change itstrue
&false
states along w/ hint(). *-:)Thanks dude! I was "just wondering" if I could sneak peek this protected variables in a way but I was afraid it would add tons of extra lines to my silly code ;)