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.
我使用精灵来显示图像纹理,但精灵的宽度和高度是 3D 世界单位,我需要自动显示加载的图像纹理而不拉伸。
我知道如何加载纹理我只需要一种根据加载的图像自动调整精灵大小的方法。
使用的工具是 Delphi / GLScene
使用 TGLHUDSprite,它将以屏幕单位直接以 2D 显示和定位。
TGLSprite 适用于当您想要 3D 精灵时,您可以将其放置在屏幕单位中,但您必须为此进行数学运算(查看 TGLHUDSprite 和 imposter 的源代码以获取有关该数学的提示)。