简体   繁体   中英

libgdx: texture bind in multiple screens

I have a question regarding when texture bind occur. I extend the Game class, and have several Screen classes for different menus and the game. I don't dispose the screens when I switch between them, and store them as members inside the Game class.

Each screen has different texture loaded and drawn. My question is, when I show one of the screens, do also the other screens' (which were already shown at least once and were not disposed) textures are bound, although they are not in use in the current shown screen?

I asked this question at LibGDX forum.

The topic

From Tonielro: The answer is no. Each screen handles its own drawing in the render method. Another screen cannot render graphics for another.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM