protected void destroyImpl() throws GLException { if (!isNSContext) { if (CGL.kCGLNoError != CGL.CGLDestroyContext(contextHandle)) { throw new GLException("Unable to delete OpenGL Context (CGL)"); } if (DEBUG) { System.err.println("!!! Destroyed OpenGL Context (CGL) " + contextHandle); } } else { if (!CGL.deleteContext(contextHandle)) { throw new GLException("Unable to delete OpenGL Context (NS)"); } if (DEBUG) { System.err.println("!!! Destroyed OpenGL Context (NS) " + contextHandle); } } }