假设我用Orhographic投影,并有一个重塑功能是这样的:OpenGL的正投影剪辑
void reshape(f32 width, f32 height){
aspect = width/height;
glViewport(0, 0, width, height);
// guaranted 960x640 HUD canvas
if(640*aspect>=960){
ortho.x = 640*aspect;
ortho.y = 640;
}else{
ortho.x = 960;
ortho.y = 960/aspect;
}
glOrtho(0, ortho.x, ortho.y, 0, -1.0f, 1.0f);
}
我怎样才能确保,所有的顶点> ortho.x或> ortho.y(通常屏幕外)没有绘制? 因为如果我将窗口缩放到比1.5f(960/640)更大的纵横比的东西上,我会看到物体,不能完全可见(因为视口非常像窗口)。 在拼写投影中是否有像裁剪窗格那样的东西?