网格渲染问题

编程入门 行业动态 更新时间:2024-10-23 17:27:40
本文介绍了网格渲染问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在用C#开发DirectX应用程序,我想绘制一个由大约240个顶点组成的Mesh对象.我使用DirectX 9.0c.虽然,我启用了AutoDepthStencil,并正确清除了ZBuffer,但得到的视觉效果不正确.在前面必须绘制一些必须位于后面的表面.该应用程序例如正确绘制DirectX标准茶壶网格.

Hi, I am developing a DirectX application in C# and I want to draw a Mesh object which is composed of about 240 vertices. I use DirectX 9.0c. Although, I have enabled AutoDepthStencil, and I clear my ZBuffer properly, I get an incorrect visual result. Some of the surfaces, that must reside behind, are drawn at the the front. The application, for instance draws the directx standard teapot mesh properly. What could be the reason for that problem??

推荐答案

获取Microsoft XNA Game Studio. 使用C#时,请删除DirectX-这将是您自己做过的最好的事情. Get Microsoft XNA Game Studio. Drop DirectX when you use C# - it''ll be the best thing you''ll ever done for yourself.

无意义.使用SlimDX. 检查CullMode.我认为您的顶点设置不正确. Nonsense. Use SlimDX. Check for CullMode. I think that your vertices isn''t properly setted up.

实际上,剔除模式是CCW.我已经为该剔除模式创建了网格数据和法线.有两个图像显示有问题的渲染的屏幕截图.以下是链接: 对象的前视图:img152.imageshack.us/i/frontb0.jpg/ 旋转后的视图(显然是假的!):img823.imageshack.us/img823/4237/sideut.jpg Actually, cull mode is CCW. And I ve created mesh data and normals for that cull mode. There are two images which show the screenshots of problematic render. Below are the links: The front view of the object : img152.imageshack.us/i/frontb0.jpg/ The rotated view (which is obviously rendered false!) : img823.imageshack.us/img823/4237/sideut.jpg

更多推荐

网格渲染问题

本文发布于:2023-11-23 04:45:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1620137.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:网格

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!