Ejemplo n.º 1
0
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 )
Ejemplo n.º 2
0
 def callback( context = contextdata.getContext( context ) ):
     """Clean up the context, assumes that the context will *not* render again!"""
     contextdata.cleanupContext( context )
Ejemplo n.º 3
0
Archivo: gl.py Proyecto: sandorlevi/p5
 def callback(context=contextdata.getContext(context)):
     """Clean up the context, assumes that the context will *not* render again!"""
     contextdata.cleanupContext(context)
Ejemplo n.º 4
0
                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