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.
我的问题是我正在尝试调用 glScissors 来切断屏幕绘制区域,但是窗口空间中此函数的坐标系中心位于屏幕的左下角。有没有办法改变中心的原点?我希望该功能相对于屏幕的左上角起作用。
不,但是您可以创建一个从一个坐标系统转换到另一个坐标系统的函数
void scissorTopLeft(int x, int y, int w, int h, int screenHeight) { glScissor(x, screenHeight-h-y, w, h); }