简体   繁体   中英

Accessing pixel of a sprite

My question is simple, yet I cannot find answer to it. 1. Can you access pixel values of a sprite in libgdx? Let's say I have sprite sprite , how to get it's [0,0] RGBA value. 2. If I want to create normal map, is it faster to load it from RGBA to Java array, or access it from sprite.

I'm really sorry if it is in documentation, I tried to find it but couldn't. If you did find it there, any suggestions how to effectively search for things in java-docs?

Okay, I found an answer. It appears the solution to that is to use Pixmap instead of sprite.

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