update:auto_ptr and self-defined macros for rendering control added.