English 中文(简体)
开放式GL中未正确提取的光线?
原标题:Lines not drawn correctly in OpenGL with fog?
  • 时间:2011-03-25 23:23:28
  •  标签:
  • opengl
  • fog

Please take a look at this: https://i.stack.imgur.com/9UOhU.jpg

问题:

grid网被完全罚款,没有 f。 如果能动,垂直线就会消失。 然后,我对左边稍作轮换,所有线都开始看不见;如果我轮换了更多,就会完全消失。 这似乎取决于观点。 我认为,这可能是一个轻视的问题,但我却认为,结果也是一样的。

我还尝试了不同的假体类型,但结果相同。 如果我直截了当(90o角与电网平面),我可以清楚地看到所有的电网线。

这些行为是什么样子? 能否确定?

该法典非常基本,但在此,它很重要:

主 席:

glEnable(GL_FOG);
glHint(GL_FOG_HINT, GL_NICEST);

render:

float fogColor[3] = {0.8f, 0.8f, 0.8f};
glFogfv(GL_FOG_COLOR, fogColor);
glFogi(GL_FOG_MODE, GL_EXP2);
glFogf(GL_FOG_DENSITY, 0.01f);
最佳回答

我不知道如何划定线路,但我会认为,你会重新为电网上的每一条横向和纵向线设计一条单一线。 Fog方程式只评价,这样,如果你唯一的vert子在行文的末尾,你就用特殊工艺品,如你看到的工艺品。

解决这一问题的主要途径是引入更多的vert;为每个过境点建立vert,相互连接,使你的网格化。 这将产生更多的界限和vert,但你的行为是正确的。

我下面详述一下,以帮助解释你最可能看到的别 alia概念。

认为任何在vert(如外缘、正常、正文坐标)上评价的数值,将直线推移,以涵盖它们之间的三角/线。 试想一例,我们想要在屏幕中心装饰,是光明的,而edge是黑暗的。 (纯理论案例,但有用解释)。 我们从一个边缘,从中间到另一个边缘。 我们只用2个vert子做这件事,每边一个。 然后,我们计算这两个vert的亮度是黑暗的。 然后,为了打上这条线,开放式的GL在黑暗和黑暗之间盘旋,以确定线的颜色。 听从该线了解该线无需在该中心有光明。

因此,如果你在该中心增加一个垂直点,现在就算出该中心是光明的。 你补充说,越是vert,越准确越亮。

Good luck and Have fun. :

问题回答

暂无回答




相关问题
OpenGL 3D Selection

I am trying to create a 3D robot that should perform certain actions when certain body parts are clicked. I have successfully (sort of) implemented picking in that if you click on any x-plane part, it ...

CVDisplayLink instead of NSTimer

I have started to implement cvDisplayLink to drive the render loop instead of nstimer, as detailed in this technical note https://developer.apple.com/library/archive/qa/qa1385/_index.html Is it ...

Can the iPhone simulator handle PVR textures?

I have a really weird problem with PVR textures on the iPhone simulator- the framerate falls through the floor on the iPhone simulator, but on the iPhone itself it works just fine. Has anyone had any ...

Calculate fps (frames per second) for iphone app

I am using an opengl es iphone application. What is the most accurate way to calculate the frames per second of my application for performance tuning?

Java - Zoom / 3D Data Visualization Libraries

What are the best libraries/frameworks for doing 3D and/or Zoom interfaces in Java? I d like to be able to do some prototyping of creating new types of interfaces for navigating within data and ...

FLTK in Cygwin using Eclipse (Linking errors)

I have this assignment due that requires the usage of FLTK. The code is given to us and it should compile straight off of the bat, but I am having linking errors and do not know which other libraries ...

热门标签