forge-first-triangle

Build an SDL3 GPU pipeline with vertex buffers and shaders to draw colored triangles.

Updated Mar 17, 2026
One-click install
npx skills add https://github.com/code-review-benchmark/coderabbit_prs2__forge-gpu__coderabbit__PR323__20260317 --skill forge-first-triangle
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: forge-first-triangle
Source: https://github.com/code-review-benchmark/coderabbit_prs2__forge-gpu__coderabbit__PR323__20260317/tree/main/.claude/skills/forge-first-triangle
Command: npx skills add https://github.com/code-review-benchmark/coderabbit_prs2__forge-gpu__coderabbit__PR323__20260317 --skill forge-first-triangle

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Render basic colored geometry by building a simple graphics pipeline with SDL3 GPU, vertex buffers, and shaders.

Core Features & Use Cases

  • Define a Vertex struct that exactly matches the shader inputs to ensure correct attribute mapping
  • Create and bind a GPU vertex buffer and configure a graphics pipeline
  • Write, compile, and attach vertex/fragment shaders to render primitives

Quick Start

Initialize the SDL GPU device and render loop using the sdl-gpu-setup skill, then draw a colored triangle using the Vertex struct and shaders.

Frequently Asked Questions about forge-first-triangle

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I render a colored triangle using SDL3 GPU and vertex buffers?

To render a colored triangle with SDL3 GPU, you define a Vertex struct matching shader inputs, create and bind a GPU vertex buffer, compile shaders, and assemble a simple render pass pipeline across Vulkan, D3D12, or Metal backends.

What is the correct way to map vertex attributes to shaders in an SDL3 graphics pipeline?

Mapping vertex attributes requires defining a Vertex struct that exactly matches your shader inputs, ensuring correct attribute mapping when creating and binding the GPU vertex buffer within the SDL3 graphics pipeline.

Does the SDL3 GPU API support cross-platform graphics backends for rendering 2D primitives?

SDL3 GPU supports rendering 2D primitives and custom vertex attributes across Vulkan, D3D12, and Metal backends, allowing a single graphics pipeline to target multiple platforms.

How do I set up a basic graphics pipeline to draw custom UI elements with SDL3 GPU?

Drawing custom UI elements with SDL3 GPU involves creating a graphics pipeline by defining vertex attributes, binding a GPU vertex buffer, and attaching compiled vertex and fragment shaders to render primitives.

What prerequisite setup is needed before drawing geometry with SDL3 GPU and shaders?

Before drawing geometry, you must initialize the SDL GPU device and establish a render loop, which provides the foundational environment for binding vertex buffers and executing shaders.

Why are my custom vertex attributes not rendering correctly in the SDL3 graphics pipeline?

Custom vertex attributes fail to render correctly when the defined Vertex struct does not exactly match the shader inputs, causing incorrect attribute mapping during the GPU vertex buffer binding process.