Hi,
I'm not exactly clear on what you are trying to do. Do you just want to attach an On-The-Fly object to the screen? On-The-Fly objects are not the same as Texture objects, so you cannot apply them as textures. The following code sample will draw a red square outline on the screen. Let me know if I misunderstood your question.
Code:
viz.startlayer(viz.LINE_LOOP)
viz.vertexcolor(viz.RED)
viz.linewidth(2)
viz.vertex(0.3,0.3)
viz.vertex(0.3,0.7)
viz.vertex(0.7,0.7)
viz.vertex(0.7,0.3)
line = viz.endlayer(viz.SCREEN)
P.S. Whenever you want to insert code into your post simply surround the code with the following tags: [ code ] some code [/code]