OpenTK GLControl中的32位深度缓冲区 [英] 32-bit depth buffer in OpenTK GLControl

查看:324
本文介绍了OpenTK GLControl中的32位深度缓冲区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在GLControl的深度缓冲区中设置位数?我已经尝试过了:

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));

,它仍然提供24位深度缓冲区.

and it still gives 24-bit depth buffer.

我想念什么?

推荐答案

您的GPU最有可能支持32位深度,但在渲染到默认帧缓冲区时不支持.要获得32位深度的缓冲区,您需要创建并渲染到帧缓冲区对象.请参考OpenTK文档中的以下页面: http://www.opentk.com /doc/graphics/frame-buffer-objects

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.

这篇关于OpenTK GLControl中的32位深度缓冲区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆