假設我用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)更大的縱橫比的東西上,我會看到物體,不能完全可見(因爲視口非常像窗口)。 在拼寫投影中是否有像裁剪窗格那樣的東西?