Why does vortex2d. net use screenmanager draw?

Source: Internet
Author: User

A screen is displayed when screenmanager. Draw (canvas) is used because

Canvas. drawtexturedrect (canvas. region, _ primarytarget, _ primarytarget. region, coloru. Blank );

During this process, the screen will be painted. If you do not execute this process, the screen will not be generated. The reason why the screen is not that there is a problem in this process, but screenmanager is being executed. some parameters in draw (canvas) are not correctly configured. After many attempts, such as setting backgroundsprite or setting the background color to backgroundcolor = "# f000" (in the configuration file: "design. layout. to <scene backgroundcolor = "# f000">.

In the process of solving this problem, I also found that in the official example of PacMan. CS screen. update (time. frametime); this process is commented out, will also cause the screen. In fact, screenmanager. draw (canvas) is mainly caused by drawtexturedrect. My level is limited and I am not sure why this process will cause the screen. In order not to change its source code, you can only analyze the cause one by one, test more, comment more, and try to find a solution more or less.

Original Works from the effort to be lazy, reprint please explain the source of the article: http://www.cnblogs.com/kfarvid/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.