社区
机器视觉
帖子详情
求助:OpenGL透明问题
love_gis
2009-12-04 09:17:55
问题描述:是地形上加载了三维模型,模型有些部分居然是透明的,直接看到了地形,不绘制地形时模型显示正常!可我也没有相关的设置啊,苦想好久,请大家帮忙啊,先谢过了!
ps:我是在用c#写的,地形用顶点数组绘制,模型利用显示列表,不过我检查应用与他们无关的!
...全文
85
9
打赏
收藏
求助:OpenGL透明问题
问题描述:是地形上加载了三维模型,模型有些部分居然是透明的,直接看到了地形,不绘制地形时模型显示正常!可我也没有相关的设置啊,苦想好久,请大家帮忙啊,先谢过了! ps:我是在用c#写的,地形用顶点数组绘制,模型利用显示列表,不过我检查应用与他们无关的!
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
9 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
love_gis
2009-12-05
打赏
举报
回复
问题解决了,谢谢大家关心!
gluPerspective(90,(GLfloat)w/(GLfloat)h,
0.0
,5.0);
是要把黄色的部分改成1.0就可以了!不能距离眼睛太近了,原因还不清楚!
张赐
2009-12-04
打赏
举报
回复
是不是地形把模型挡住了啊
张赐
2009-12-04
打赏
举报
回复
……
没有开启深度测试当然不行
xingzhe2001
2009-12-04
打赏
举报
回复
cull可以先disable掉
xingzhe2001
2009-12-04
打赏
举报
回复
要启动阿,要不然没有深度测试可能导致后面的像素跑到前边来。
love_gis
2009-12-04
打赏
举报
回复
[Quote=引用 3 楼 l_candry_163_com 的回复:]
你可以看一看是不是没有启动消隐,有可能是模型与地面有相交部分,然他们之间有一点距离
[/Quote]消隐不是默认的吗?我没有设置啊,能解释下吗?感谢
love_gis
2009-12-04
打赏
举报
回复
[Quote=引用 2 楼 xingzhe2001 的回复:]
检查是否打开了 z测试, cull是否正确。
[/Quote]不太明白,你是说深度测试吗?我没有启动啊!
l_candry_163_com
2009-12-04
打赏
举报
回复
你可以看一看是不是没有启动消隐,有可能是模型与地面有相交部分,然他们之间有一点距离
xingzhe2001
2009-12-04
打赏
举报
回复
检查是否打开了 z测试, cull是否正确。
OpenGL
Tutorial by NeHe
Welcome to my
OpenGL
tutorials. I am an average guy with a passion for
OpenGL
! The first time I heard about
OpenGL
was back when 3Dfx released their Hardware accelerated
OpenGL
driver for the Voodoo 1 card. Immediately I knew
OpenGL
was something I had to learn. Unfortunately, it was very hard to find any information about
OpenGL
in books or on the net. I spent hours trying to make code work and even more time begging people for help in email and on IRC. I found that those people that understood
OpenGL
considered themselves elite, and had no interest in sharing their knowledge. VERY frustrating! I created this web site so that people interested in learning
OpenGL
would have a place to come if they needed help. In each of my tutorials I try to explain, in as much detail as humanly possible, what each line of code is doing. I try to keep my code simple (no MFC code to learn)! An absolute newbie to both Visual C++ and
OpenGL
should be able to go through the code, and have a pretty good idea of what’s going on. My site is just one of many sites offering
OpenGL
tutorials. If you’re a hardcore
OpenGL
programmer, my site may be too simplistic, but if you’re just starting out, I feel my site has a lot to offer! This tutorial was completely rewritten January 2000. This tutorial will teach you how to set up an
OpenGL
window. The window can be windowed or fullscreen, any size you want, any resolution you want, and any color depth you want. The code is very flexible and can be used for all your
OpenGL
projects. All my tutorials will be based on this code! I wrote the code to be flexible, and powerful at the same time. All errors are reported. There should be no memory leaks, and the code is easy to read and easy to modify. Thanks to Fredric Echols for his modifications to the code! I’ll start this tutorial by jumping right into the code. The first thing you will have to do is build a project in Visual C++. If you don’t know how to do that, you should not be learning
OpenGL
, you should be learning Visual C++. The downloadable code is Visual C++ 6.0 code. Some versions of VC++ require that bool is changed to BOOL, true is changed to TRUE, and false is changed to FALSE. By making the changes mentioned, I have been able to compile the code on Visual C++ 4.0 and 5.0 with no other problems. After you have created a new Win32 Application (NOT a console application) in Visual C++, you will need to link the
OpenGL
libraries. In Visual C++ go to Project, Settings, and then click on the LINK tab. Under „Object/Library Modules” at the beginning of the line (before kernel32.lib) add
OpenGL
32.lib Glu32.lib and Glaux.lib. Once you’ve done this click on OK. You’re now ready to write an
OpenGL
Windows program.
VTK旋转工具,用于三维模型中的旋转变换,可显示旋转角度
完全基于VTK实现Mimics和常见三维建模软件中的旋转工具。代码较上个版本进行了精简,并且更易用。若使用中有
问题
,请随时联系!
OpenGL
图形编程全攻略:库文件与Nehe教程集合
本文还有配套的精品资源,点击获取 简介:
OpenGL
是一个广泛应用于图形编程的接口,用于创建复杂的3D图形和动画。本压缩包包含了
OpenGL
核心库文件以及Nehe教程代码,为学习和开发提供基础资源。
OpenGL
库文件包括glu32.dll、
opengl
32.dll、glut32.dll和glaux.lib,这些库文件是进行
OpenGL
程序开发的必需组件。Nehe教程是学习O...
openGL
无法显示窗口怎么办
求助
各位大佬,已经跟图形学老师看半天了也不清楚什么原因。之前
openGL
是可以正常使用的,今天不知道怎么了。按着教程重新配置了环境,该有的文件都有。
Qt Quick与
OpenGL
集成技术
自定义控件设计自定义控件设计在《Qt Quick与
OpenGL
集成技术》一书中探讨Qt Quick与
OpenGL
集成时,自定义控件设计是一个至关重要的部分。本章节将深入讲解如何创建具有高级功能和独特视觉效果的用户界面元素,利用Qt Quick的功能性和
OpenGL
的强大渲染能力。以下是构建自定义控件的步骤和技术点。基于Qt Quick类型系统的创建在开始自定义控件设计之前,我们需要了解Qt Quick的类型系统。Qt Quick通过其组件和类型的体系提供了一个灵活的架构来创建动态UI。
机器视觉
4,499
社区成员
15,365
社区内容
发帖
与我相关
我的任务
机器视觉
图形图像/机器视觉
复制链接
扫一扫
分享
社区描述
图形图像/机器视觉
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章