build: GL 渲染层与客户端挂 gl 构建标签(无 C 工具链也可构建测试);构建脚本自动定位 zig/gcc

This commit is contained in:
NianGao Dev
2026-08-15 23:00:55 +08:00
parent 509c6f228c
commit 5fa057632d
8 changed files with 258 additions and 229 deletions

View File

@@ -27,11 +27,11 @@ func TestBuild(t *testing.T) {
t.Fatalf("字形 %q 宽度期望 8,实际 %d", ch, g.W)
}
}
// 主位图应为 128×128(16×16 网格)
// 主位图:宽 128(16 列 × 8px),高为 8 的整数倍(原版 ascii.png 为 128×536)
if at.Image == nil {
t.Fatal("主位图为空")
}
if b := at.Image.Bounds(); b.Dx() != 128 || b.Dy() != 128 {
t.Fatalf("ascii 位图期望 128×128,实际 %dx%d", b.Dx(), b.Dy())
if b := at.Image.Bounds(); b.Dx() != 128 || b.Dy()%8 != 0 || b.Dy() < 128 {
t.Fatalf("ascii 位图尺寸异常: %dx%d", b.Dx(), b.Dy())
}
}

View File

@@ -1,3 +1,5 @@
//go:build gl
package render
import (

View File

@@ -1,3 +1,5 @@
//go:build gl
// Package render 渲染层:GLFW 窗口 + OpenGL 3.3 core 上下文 + 默认光影着色器(场景/渲染.md)。
//
// 线程铁律(渲染.md §2):