From: anne001 Date: 2006-02-21T20:48:31+09:00 Subject: How can I evaluate and visualize code instead of running it. I am using a tree and traversing down a tree to generate opengl code How could I easily list the opengl code that I am generating, instead of running it? def applytransform GL.PushMatrix(); GL.Translate(*@Translation); GL.Translate(*@jointP); if @parent != nil GL.Translate(*@parentjointP); end GL.Rotate(*@rotation); GL.Translate(*@jointP.minus); end def traversetree GL.Clear(GL::COLOR_BUFFER_BIT); GL.PushMatrix(); applytransform @children.each {|childnode| childnode.traversetree} drawprimitive GL.PopMatrix(); GLUT.SwapBuffers(); end