English 中文(简体)
冰川――无
原标题:glEnable(GL_DEPTH_TEST) - nothing rendered
  • 时间:2012-04-06 10:44:56
  •  标签:
  • opengl

在开放式利比里亚论坛,我展示了一个简单的模式。 当我能够深入缓冲时,

glEnable(GL_CULL_FACE);
glEnable(GL_DEPTH_TEST);
glDepthMask(GL_TRUE);

一切都消失。 http://www.opengl.org/archives/resources/faq/tech/Deptbuffer.htm” 开放式利比里亚武装部队,但它帮助我。

我的观点是:angle=45deg,near=1,far=40,我将模型置于(0,0,0),我把目光放在(0,4)上。 如果没有Z-buffer,I can,见模型。

什么可能是错误的?

最佳回答

你们是否确保你清除了深度的缓冲?

glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
                              ^^^^^^^^^^^^^^^^^^^
问题回答

如果上述答复不试图做到以下几点:

  • If you have GL_CULL_FACE enabled check the winding order of your model s vertices. (LH) vs (RH).
  • If GL_DEPTH_TEST is enabled; then check the planes to your frustum against your model view projection matrix along with the camera s position & view direction.
  • If GL_BLEND is enabled; check the rendering order of your objects in comparison to the z-buffer.




相关问题
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 ...