Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 GLSprite 示例代码示例。我想知道的是我需要对代码做什么才能让它将我的纹理视为精灵表?到目前为止,我所做的唯一修改是创建一个 256 x 256 png 的 16 个较小图像作为我的框架。我以前从未使用过精灵表。谢谢你的帮助。
您需要调整纹理坐标以映射所需的精灵。纹理坐标通常是标准化的(0 到 1)。假设你有一个 4x4 的精灵网格,第一个精灵的纹理坐标为......
0, 0 0, 0.25 0.25, 0.25 0.25, 0