Windows always requests MSAA when creating an OpenGL context.

未关闭 适合新手
#235 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
65/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞

调研方向

从 gui-lib/mred/private/wx/win32/gl-context.rkt 第 300 行附近开始,那里会选择 Windows OpenGL 像素格式。检查 wglChoosePixelFormatARB 属性,并使用 RenderDoc 或等效的上下文检查来比较零采样和多重采样配置。完成的标准是,零采样的 gl-config 不再生成多重采样 framebuffer,同时非零采样数请求仍然正常工作。

由索引模型根据 Issue 内容生成。

描述

You can see the problem here: https://github.com/racket/gui/blob/172b7d5a561b74375004decbb68a7ab471e2c53f/gui-lib/mred/private/wx/win32/gl-context.rkt#L300

If wglChoosePixelFormatARB is present on the system (which it will be for virtually everything), it will always be called with the WGL_SAMPLE_BUFFERS_ARB attribute set, even if the number of samples is set to zero. My machine happily accepts this, despite the number of MSAA samples requested being 0, and creates an MSAA target, greatly degrading rendering performance. My GPU is a nvidia 1060, driver version 460.89. This can be easily verified with Renderdoc, where the final framebuffer will be a Texture 2D MS.

I believe the correct behavior is simply omitting the WGL_SAMPLE_BUFFERS_ARB and WGL_SAMPLES_ARB parameters when the number of samples on the provided gl-config object is 0.

主要语言
Racket
星标
68
派生
83
平均合并
4 天 4 小时
30 天内合并 PR
3

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

racket/gui 的其他 Issue

查看 racket/gui 的全部 Issue

相似的 Issue

更多 Computer Graphics Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。