简体   繁体   English

OpenGL顶点被裁剪

[英]OpenGL vertices being rendered clipped

I haven't done much OpenGL stuff, I assume there is an obvious cause of what I am seeing. 我没有做太多OpenGL的工作,我认为这是我所看到的明显原因。

Basically the pictures below explain everything. 基本上,以下图片说明了所有内容。

The only thing changed between the images is the x rotation on the projection matrix. 图像之间唯一改变的是投影矩阵上的x旋转。

OpenGL 1.1 on Windows. Windows上的OpenGL 1.1。

Any help is much appreciated. 任何帮助深表感谢。

好

坏

This looks like a ortho projection. 这看起来像正交投影。 I suggest you increase the range between the near and far value. 我建议您增加近和远值之间的范围。 Unlike perspective projection, where due to nonlinearity you should limit the near-to-far range to what's absolutely necessary, you can safely choose a near/far range for ortho that's very wide without running into trouble. 与透视投影不同,透视投影由于非线性而应将近距离范围限制为绝对必要的范围,因此可以安全地为正射角度选择近距离范围,而不会产生麻烦。 I suggest you use [-1000, 1000] (with a 24 bit depth buffer that gives you a depth resolution of ~1/8000 viewspace Z units). 我建议您使用[-1000,1000](带有24位深度的缓冲区,深度分辨率为〜1/8000视区Z单位)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM