From: John Stone (johns_at_ks.uiuc.edu)
Date: Thu May 04 2006 - 12:25:38 CDT

Chang,
  I included some general information about the control flow of the
main VMD loop in the VMD Programmer's Guide, which you'll want to
become familiar with:
  http://www.ks.uiuc.edu/Research/vmd/doxygen/execution.html#execution

Once you've read that, see the VMDupdate() method docs:
  http://www.ks.uiuc.edu/Research/vmd/doxygen/classVMDApp.html#a213

...and the sources in VMDApp.[Ch]
  // redraw the screen and update all things that need updating
  int VMDApp::VMDupdate(int check_for_events) {
  }

Without knowing more about what you're doing, I'm not sure which code
to point you at next, but I suspect that a relatively simple example that
relates well to what you're doing is the FPS indicator:
  http://www.ks.uiuc.edu/Research/vmd/doxygen/classFPS.html

Enjoy,
  John Stone
  vmd_at_ks.uiuc.edu

On Thu, May 04, 2006 at 12:58:12PM -0400, Chang Hu wrote:
> Hi,
>
> I am trying to hack into the source code to render a ball and mouse
> cursor position in the OpenGL window. However I didn't find a way to
> refresh the screen or delete previous I drew. I remember there's some
> Tcl scripts like "graphics delete ...". Is there a way to do it in the
> source code?
>
> Thanks,
> Chang

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078