Enable GL_TEXTURE_CUBE_MAP_SEAMLESS on desktop GL

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

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
cpp

调研方向

Issue 指出了 source/renderer/ore/gl/ore_context_gl.cpp 和 ContextGL::Make() 初始化路径。阅读各向异性过滤配置附近的 Desktop GL 设置,然后检查基于 GLES 的加载器如何提供 GL 常量。完成标准是 Desktop GL 启用无缝立方体贴图采样,并且代码仍能使用该加载器构建。

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

描述

Enable GL_TEXTURE_CUBE_MAP_SEAMLESS on desktop GL.

- source/renderer/ore/gl/ore_context_gl.cpp: Ore GL context: enable GL_TEXTURE_CUBE_MAP_SEAMLESS on desktop GL, where cube lookups otherwise clamp to the face and rough prefiltered reflections show face seams (always on in OpenGL ES 3 and WebGL2); the enum is defined when the GLES-based loader header lacks it

diff --git a/source/renderer/ore/gl/ore_context_gl.cpp b/source/renderer/ore/gl/ore_context_gl.cpp
index 90ccf9c95c1b557af44258701d75769168d666a1..f6ca307d474486aef4fba23b1785f7b7de0c1251 100644
--- a/source/renderer/ore/gl/ore_context_gl.cpp
+++ b/source/renderer/ore/gl/ore_context_gl.cpp
@@ -438,6 +438,13 @@ std::unique_ptr<ContextGL> ContextGL::Make()
     f.anisotropicFiltering = true;
 #endif
 
+#ifdef RIVE_DESKTOP_GL
+#ifndef GL_TEXTURE_CUBE_MAP_SEAMLESS
+#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F
+#endif
+  glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
+#endif
+
   return ctx;
 }
主要语言
C++
星标
1.2k
派生
133
PR 合并指标
30 天内没有已合并 PR

环境准备

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

从这里开始

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

rive-app/rive-runtime 的其他 Issue

查看 rive-app/rive-runtime 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

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