We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › Direct access to OpenGL functions
Page Index Toggle Pages: 1
Direct access to OpenGL functions (Read 921 times)
Direct access to OpenGL functions
Oct 30th, 2009, 8:51am
 
This following quote has come from http://processing.org/reference/libraries/opengl/

Quote:
Always do the assignment/cast from g to pgl inside draw(), because 'g' may change from time to time. In addition, use the GL object returned by beginGL() for the same reason, that the GL context itself may have changed. In practice, I've not really seen this happen, but this is strongly encouraged to prevent things from crashing in a bad way (think blue screen/kernel panic kinds of bad ways).


I am trying to think under what circumstances 'g' might change from time to time
Any ideas
Huh
Re: Direct access to OpenGL functions
Reply #1 - Oct 30th, 2009, 10:32pm
 
I guess its just a hint that the global variable 'g' (defined in PApplet) could be renamed to something else in future releases..
Re: Direct access to OpenGL functions
Reply #2 - Oct 31st, 2009, 8:08am
 
Possibly but that would prevent the sketch from compiling not running and if it can't compile it can't run therefore it can't crash..

I think it suggests that the value of 'g' can change at runtime without intervention from the programmer and I am interested finding out how that might happen for a new library project I had in mind.
Page Index Toggle Pages: 1