diff --git a/cpp/functions/gfx/dag_node_editor.md b/cpp/functions/gfx/dag_node_editor.md index 11b5d033..f318e3ee 100644 --- a/cpp/functions/gfx/dag_node_editor.md +++ b/cpp/functions/gfx/dag_node_editor.md @@ -8,7 +8,7 @@ purity: impure signature: "bool dag_node_editor(std::vector& pipeline)" description: "Renderiza el node editor visual (imgui-node-editor) para el DAG de shaders. Modifica el pipeline in-place: añade/borra nodos, gestiona aristas (source_ids). Devuelve true si la topologia cambio." tags: [dag, imgui, node-editor, shader, visual, pipeline, gfx] -uses_functions: [] +uses_functions: ["dag_catalog_cpp_gfx", "dag_node_previews_cpp_gfx"] uses_types: [] returns: [] returns_optional: false @@ -22,6 +22,7 @@ params: - name: pipeline desc: "vector de DagStep que representa el pipeline actual; modificado in-place" output: "true si la topologia cambio (nodos o aristas añadidos/quitados); false en caso contrario" +notes: "consumido por cpp/apps/shaders_lab/main.cpp" --- ## Notas diff --git a/cpp/functions/gfx/dag_node_previews.md b/cpp/functions/gfx/dag_node_previews.md index 7ac7d6bc..1a484304 100644 --- a/cpp/functions/gfx/dag_node_previews.md +++ b/cpp/functions/gfx/dag_node_previews.md @@ -8,7 +8,7 @@ purity: impure signature: "void dag_previews_render(const std::vector&, unsigned program, int w, int h); unsigned dag_preview_texture(unsigned editor_uid); void dag_previews_destroy()" description: "Renderiza un thumbnail por cada DagStep con preview_open=true a un FBO propio (lazy, keyed por editor_uid). Bind del FBO + glUniform1i(u_preview_target, i) + draw del quad. Devuelve la textura via dag_preview_texture para mostrarla con ImGui::Image." tags: [opengl, fbo, preview, dag, gfx] -uses_functions: [gl_loader_cpp_gfx, gl_framebuffer_cpp_gfx, fullscreen_quad_cpp_gfx, dag_catalog_cpp_gfx] +uses_functions: ["dag_catalog_cpp_gfx", "fullscreen_quad_cpp_gfx", "gl_framebuffer_cpp_gfx", "gl_loader_cpp_gfx"] uses_types: [] returns: [] returns_optional: false diff --git a/cpp/functions/gfx/dag_palette.md b/cpp/functions/gfx/dag_palette.md index 7cba964e..c44bee15 100644 --- a/cpp/functions/gfx/dag_palette.md +++ b/cpp/functions/gfx/dag_palette.md @@ -8,7 +8,7 @@ purity: impure signature: "void dag_palette()" description: "Paleta de nodos del catalogo, agrupada por kind (Gen/Op/Blend). Cada entrada es un drag source con payload DAG_NODE_TYPE que contiene el name del nodo. El node editor recibe el drop y anade un nuevo DagStep en la posicion del mouse." tags: [imgui, dag, palette, drag-and-drop, gfx, component] -uses_functions: [dag_catalog_cpp_gfx] +uses_functions: ["dag_catalog_cpp_gfx"] uses_types: [] returns: [] returns_optional: false diff --git a/cpp/functions/gfx/dag_uniforms.md b/cpp/functions/gfx/dag_uniforms.md index 45f15448..91d6f972 100644 --- a/cpp/functions/gfx/dag_uniforms.md +++ b/cpp/functions/gfx/dag_uniforms.md @@ -9,6 +9,7 @@ signature: "void dag_uniforms_apply(const std::vector& pipeline, unsign description: "Sube los params del pipeline al shader activo via glUniform4fv. Construye un float[64] con los params de cada DagStep (hasta 16 pasos) y llama glUniform4fv(u_params, 16, data)." tags: [dag, shader, uniforms, opengl, gfx, pipeline] uses_functions: + - dag_catalog_cpp_gfx - gl_loader_cpp_gfx uses_types: - dag_types_cpp_gfx diff --git a/cpp/functions/gfx/fullscreen_quad.md b/cpp/functions/gfx/fullscreen_quad.md index 8e21dbce..65aed29e 100644 --- a/cpp/functions/gfx/fullscreen_quad.md +++ b/cpp/functions/gfx/fullscreen_quad.md @@ -8,7 +8,7 @@ purity: impure signature: "void quad_init(Quad& q); void quad_draw(const Quad& q); void quad_destroy(Quad& q)" description: "VAO/VBO para un fullscreen quad de 6 vértices. El vertex shader genera las posiciones via gl_VertexID, por lo que el VBO queda vacío. quad_draw emite glDrawArrays(GL_TRIANGLES, 0, 6)." tags: [opengl, quad, fullscreen, vao, vbo, gfx] -uses_functions: [] +uses_functions: ["gl_loader_cpp_gfx"] uses_types: [] returns: [] returns_optional: false diff --git a/cpp/functions/gfx/gl_framebuffer.md b/cpp/functions/gfx/gl_framebuffer.md index b8c3840b..0a215039 100644 --- a/cpp/functions/gfx/gl_framebuffer.md +++ b/cpp/functions/gfx/gl_framebuffer.md @@ -8,7 +8,7 @@ purity: impure signature: "void fb_init(Framebuffer& f); void fb_resize(Framebuffer& f, int w, int h); void fb_destroy(Framebuffer& f)" description: "CRUD de un framebuffer OpenGL (FBO + textura RGBA8). fb_resize es no-op si las dimensiones no cambian. Listo para uso con ImGui::Image." tags: [opengl, framebuffer, fbo, texture, gfx, offscreen] -uses_functions: [] +uses_functions: ["gl_loader_cpp_gfx"] uses_types: [] returns: [] returns_optional: false diff --git a/cpp/functions/gfx/gl_shader.md b/cpp/functions/gfx/gl_shader.md index 2efed100..c566dd46 100644 --- a/cpp/functions/gfx/gl_shader.md +++ b/cpp/functions/gfx/gl_shader.md @@ -8,7 +8,7 @@ purity: impure signature: "CompileResult compile_fragment(const std::string& user_fragment_src)" description: "Compila un cuerpo de fragment shader GLSL 330 y retorna un GL program listo para usar. Prepende automáticamente version, out vec4 fragColor y uniforms u_resolution/u_time/u_mouse. Usa GL_GLEXT_PROTOTYPES + GL/glext.h." tags: [opengl, shader, glsl, compile, fragment, gfx] -uses_functions: [] +uses_functions: ["gl_loader_cpp_gfx"] uses_types: [] returns: [] returns_optional: false @@ -23,6 +23,7 @@ params: - name: user_fragment_src desc: "Cuerpo del fragment shader GLSL sin #version, sin 'out vec4 fragColor' ni declaraciones de uniforms. Solo el void main() y funciones auxiliares." output: "CompileResult con program=GL id si ok=true, o err_msg/err_line si falla. program=0 indica error." +notes: "consumido por cpp/apps/shaders_lab/main.cpp; scaffolding/demo en primitives_gallery" --- # gl_shader diff --git a/cpp/functions/gfx/gl_texture_load.md b/cpp/functions/gfx/gl_texture_load.md index e6dd6135..ec1e8dc9 100644 --- a/cpp/functions/gfx/gl_texture_load.md +++ b/cpp/functions/gfx/gl_texture_load.md @@ -8,7 +8,7 @@ purity: impure signature: "GlTexture gl_texture_load(const char* path, bool flip_y, bool srgb)" description: "Carga PNG/JPG/BMP/TGA/HDR desde disco (o memoria) a una textura OpenGL lista para usar como sampler2D. Vendorea stb_image. Soporta sRGB (GL_SRGB8_ALPHA8) y HDR (GL_RGBA16F via stbi_loadf). Genera mipmaps automaticamente. flip_y=true por defecto coincide con la convencion UV de OpenGL." tags: [opengl, texture, image, png, jpg, hdr, stb_image, gfx] -uses_functions: [gl_loader_cpp_gfx] +uses_functions: ["gl_loader_cpp_gfx"] uses_types: [] returns: [] returns_optional: false diff --git a/cpp/functions/gfx/mesh_gpu.md b/cpp/functions/gfx/mesh_gpu.md index c311ce50..449596e0 100644 --- a/cpp/functions/gfx/mesh_gpu.md +++ b/cpp/functions/gfx/mesh_gpu.md @@ -8,7 +8,7 @@ purity: impure signature: "MeshGpu mesh_gpu_upload(const Mesh&); void mesh_gpu_destroy(MeshGpu&)" description: "Sube un Mesh CPU a OpenGL como VAO + VBO interleaved (pos.xyz, normal.xyz) + EBO uint32. Layout: location 0 = a_pos vec3, location 1 = a_normal vec3, stride 6 floats." tags: [opengl, mesh, vao, vbo, ebo, gpu, gfx] -uses_functions: [mesh_obj_load_cpp_gfx] +uses_functions: ["gl_loader_cpp_gfx", "mesh_obj_load_cpp_gfx"] uses_types: [] returns: [] returns_optional: false diff --git a/cpp/functions/gfx/shader_canvas.md b/cpp/functions/gfx/shader_canvas.md index 558caa0e..cb3f2734 100644 --- a/cpp/functions/gfx/shader_canvas.md +++ b/cpp/functions/gfx/shader_canvas.md @@ -9,9 +9,10 @@ signature: "void canvas_render(ShaderCanvas& c, float time_seconds, const std::f description: "Componente ImGui que renderiza un fragment shader GLSL a un FBO y lo muestra en el panel actual. Compone gl_framebuffer, fullscreen_quad y gl_shader. Gestiona resize automático y coordenadas de mouse. Acepta callback opcional uniforms_fn invocado tras glUseProgram para uniforms custom." tags: [opengl, shader, canvas, imgui, fbo, gfx, component] uses_functions: - - gl_shader_cpp_gfx - - gl_framebuffer_cpp_gfx - fullscreen_quad_cpp_gfx + - gl_framebuffer_cpp_gfx + - gl_loader_cpp_gfx + - gl_shader_cpp_gfx - uniform_panel_cpp_gfx uses_types: [] returns: [] diff --git a/cpp/functions/gfx/uniform_panel.md b/cpp/functions/gfx/uniform_panel.md index 0530ace0..52cab7d5 100644 --- a/cpp/functions/gfx/uniform_panel.md +++ b/cpp/functions/gfx/uniform_panel.md @@ -9,8 +9,8 @@ signature: "void uniforms_panel(UniformStore&, const std::vector