- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想使用 QOpenGLFramebufferObject 渲染到半浮点纹理。我尝试使用以下代码创建 fbo:
structureTensorTexture = new QOpenGLFramebufferObject(
renderWidth,
renderHeight,
QOpenGLFramebufferObject::NoAttachment,
GL_TEXTURE_2D,
GL_HALF_FLOAT
);
但是当我运行该程序时,此消息出现在控制台中:
[opengl\qopenglframebufferobject.cpp line 544] OpenGL Error: 1280
QOpenGLFramebufferObject: Framebuffer incomplete attachment.
QOpenGLFramebufferObject: Framebuffer incomplete, missing attachment.
如果我使用 GL_RGBA 而不是 GL_HALF_FLOAT,则不会出现错误消息,但这不符合我的目的。
如何使用 QT 渲染半浮点纹理?
最佳答案
通过提供实际的 OpenGL 图像格式。 GL_HALF_FLOAT
不是图像格式;它是一个代表类型的枚举。您可以将其用作 type
in pixel transfer operations ,但这不是图像格式。
安image format使用 16 位 float 的将是 GL_RGBA16F
。
关于c++ - 渲染到 QOpenGLFramebufferObject GL_HALF_FLOAT,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43173271/
我想使用 QOpenGLFramebufferObject 渲染到半浮点纹理。我尝试使用以下代码创建 fbo: structureTensorTexture = new QOpenGLFramebuf
当我使用QOpenGLFramebufferObject 时,我遇到了深度测试不工作的问题。 但是,如果我使用 glBlitFramebuffer 将默认帧缓冲区复制到 QOpenGLFramebuf
我正在尝试使用此示例从 QOpenGLFramebufferObject 创建一个 QImage: https://dangelog.wordpress.com/2013/02/10/using-fb
我遇到一个问题,OpenGL 场景的深度渲染不正确。我正在对 QOpenGLFramebufferObject 进行离屏渲染。如果我在 QGLWidget 中运行相同的代码,它会很好地呈现。这是代码:
我需要在 Qt5 项目中执行多重采样,但我不确定如何使用 QOpenGLFrameBufferObject执行 FSAA。据我搜索,没有关于如何执行此操作的示例,文档仅提到:“如果您想使用启用了多重采
在基于 WinCE 的设备上基于 Qt 5.2.1 小部件的应用程序上进行 native GL 绘图时,我正在尝试对 FBO (QOpenGLFramebufferObject) 的纹理实现抗锯齿效果
我正在尝试将以前的项目移植到新的 Qt5 OpenGL 类中。我想使用 FBO 渲染到纹理。之前的代码使用了多个纹理,我按需将其附加到 FBO。因此,我会附加一个特定的纹理对象,执行渲染,附加另一个纹
我是一名优秀的程序员,十分优秀!