Official Codebase of 3DCodeVerse
Python
gl runtimes: _gl_common's plan reader is graphics_plan(ws) — it shared the name load_plan with tool_common.load_plan(path), which takes a path, returns any Plan and raises
gaoypengf665ebfa40ef
diff --git a/harness/codeverse3d/languages/_gl_common.py b/harness/codeverse3d/languages/_gl_common.pyindex 528e64c3..4021fd54 100644--- a/harness/codeverse3d/languages/_gl_common.py+++ b/harness/codeverse3d/languages/_gl_common.py@@ -70,7 +70,7 @@ def make_host(override: GlHost | None = None, timeout_s: float | None = None) ->return GlHost(gpu=settings.render.gpu, timeout_s=float(timeout_s or settings.limits.render_timeout_s))-def load_plan(ws: Workspace) -> GraphicsPlan | None:+def graphics_plan(ws: Workspace) -> GraphicsPlan | None:"""The run's GraphicsPlan; ``None`` (→ defaults) without one."""plan = plan_or_none(ws.plan_path)return plan if isinstance(plan, GraphicsPlan) else Nonediff --git a/harness/codeverse3d/languages/glsl_shader/__init__.py b/harness/codeverse3d/languages/glsl_shader/__init__.pyindex 89fb598f..d1cf1637 100644--- a/harness/codeverse3d/languages/glsl_shader/__init__.py+++ b/harness/codeverse3d/languages/glsl_shader/__init__.py@@ -16,9 +16,9 @@ from codeverse3d.languages._gl_common import (LineMap,Segment,finish_build,+ graphics_plan,invalidate_stale_outputs,judge_times,- load_plan,make_host,parse_glsl_log,resolution_for,@@ -413,7 +413,7 @@ class GlslShaderRuntime(RuntimeLayout):if not (ws.root / SHADER).is_file():res = GlResult(ok=False, mode="shader", stage="lint", error_type=MISSING_ENTRY, error_message=f"{SHADER} is missing")return finish_build(ws, res, language=self.language.value, error_file=SHADER)- plan = load_plan(ws)+ plan = graphics_plan(ws)w, h = resolution_for(plan)if width and height:w, h = int(width), int(height)diff --git a/harness/codeverse3d/languages/opengl_python/__init__.py b/harness/codeverse3d/languages/opengl_python/__init__.pyindex b0eb2805..6af617e5 100644--- a/harness/codeverse3d/languages/opengl_python/__init__.py+++ b/harness/codeverse3d/languages/opengl_python/__init__.py@@ -18,9 +18,9 @@ from codeverse3d.languages._ast_lint import (from codeverse3d.languages._common import MISSING_ENTRY, ws_relfrom codeverse3d.languages._gl_common import (finish_build,+ graphics_plan,invalidate_stale_outputs,judge_times,- load_plan,make_host,parse_glsl_log,resolution_for,@@ -361,7 +361,7 @@ class OpenGLPythonRuntime(RuntimeLayout):if not program.is_file():res = GlResult(ok=False, mode="program", stage="lint", error_type=MISSING_ENTRY, error_message=f"{PROGRAM} is missing")return finish_build(ws, res, language=self.language.value, error_file=PROGRAM)- plan = load_plan(ws)+ plan = graphics_plan(ws)w, h = resolution_for(plan)if width and height:w, h = int(width), int(height)