Fixed Export Bug and Added IsDebugOn to the plugin system

I added IsDebugEnabled to the plugin system to determine if debugging is on and to allow OpenGL to know when to draw.

Fixed a second Export but in SmartGetFieldArray2DInt.

Still need to fix the capturing because when disabled, it disables graphics button and debug button. I can do that later.