def glutDestroyWindow( window ): """Want to destroy the window, we need to do some cleanup...""" context = 0 try: GLUT.glutSetWindow(window) context = contextdata.getContext() result = contextdata.cleanupContext( context ) log.info( """Cleaning up context data for window %s: %s""", window, result ) except Exception, err: log.error( """Error attempting to clean up context data for GLUT window %s: %s""", window, result )
def callback( context = contextdata.getContext( context ) ): """Clean up the context, assumes that the context will *not* render again!""" contextdata.cleanupContext( context )
def callback(context=contextdata.getContext(context)): """Clean up the context, assumes that the context will *not* render again!""" contextdata.cleanupContext(context)
255 * image[:, :, [2, 1, 0]], [int(cv2.IMWRITE_JPEG_QUALITY), 100]) gtDataset.resize(gtDataset.shape[0] + 1, axis=0) gtDataset[-1] = np.array([( train_i, chAzGTVals, chElGTVals, chLightAzGTVals, chLightElGTVals, chLightIntensityGTVals, chAmbientIntensityGTVals, chVColorsGTVals, shapeParamsVals, )], dtype=gtDtype) gtDataFile.flush() print("Generated " + str(train_i) + " GT instances.") plt.figure() plt.title('GT object') plt.imshow(renderer.r) plt.show(0.1) #Clean up. renderer.makeCurrentContext() renderer.clear() contextdata.cleanupContext(contextdata.getContext()) # glfw.destroy_window(renderer.win) del renderer