updated opengl sample script