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.
我有一个 WebGL canvas,我在其中加载两个图像作为纹理。对于每个纹理加载,我首先将画布调整为图像大小,以使图像不失真。
canvas
尽管调整了大小,第二个纹理还是被扭曲了。请看这个小提琴。
弄清楚了。需要使用该gl.viewport功能。
gl.viewport