32-bit depth buffer in OpenTK GLControl

喜你入骨 提交于 2019-12-13 06:52:25

问题


How to set a number of bits in the depth buffer of GLControl? I've tried this:

GLControl glControl = new GLControl(
    new GraphicsMode( new ColorFormat(8,8,8,8), 32));

and it still gives 24-bit depth buffer.

What am I missing?


回答1:


Your GPU most likely supports 32bit depth, but not when rendering to the default framebuffer. To obtain a 32bit depth buffer you need to create and render to a framebuffer object. Refer to the following page in the OpenTK documentation: http://www.opentk.com/doc/graphics/frame-buffer-objects

Unlike the default framebuffer, which may expose different capabilities depending on the driver and operating system, framebuffer objects give you complete control over the pixel format.



来源:https://stackoverflow.com/questions/29420616/32-bit-depth-buffer-in-opentk-glcontrol

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!