forge-mesh-loading — gamedev forge-mesh-loading, forge-gpu, community, gamedev, ide skills, graphics-programming, sdl-gpu, Claude Code, Cursor, Windsurf

v1.0.0

About this Skill

Perfect for Graphics Agents needing advanced 3D model rendering capabilities with Wavefront OBJ files and SDL's GPU API. Load a 3D model from an OBJ file, create a textured mesh with mipmaps, and render with a fly-around camera. Use when someone needs to load geometry from a file, parse OBJ models, or render textured 3D

# Core Topics

RosyGameStudio RosyGameStudio
[28]
[0]
Updated: 3/16/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reviewed Landing Page Review Score: 9/11

Killer-Skills keeps this page indexable because it adds recommendation, limitations, and review signals beyond the upstream repository text.

Original recommendation layer Concrete use-case guidance Explicit limitations and caution Quality floor passed for review Locale and body language aligned
Review Score
9/11
Quality Score
62
Canonical Locale
en
Detected Body Locale
en

Perfect for Graphics Agents needing advanced 3D model rendering capabilities with Wavefront OBJ files and SDL's GPU API. Load a 3D model from an OBJ file, create a textured mesh with mipmaps, and render with a fly-around camera. Use when someone needs to load geometry from a file, parse OBJ models, or render textured 3D

Core Value

Empowers agents to load and render 3D models from Wavefront OBJ files, leveraging SDL's GPU API for real-time graphics programming with textured rendering, camera control, and OBJ parsing, including vertex positions, normals, and UV coordinates.

Ideal Agent Persona

Perfect for Graphics Agents needing advanced 3D model rendering capabilities with Wavefront OBJ files and SDL's GPU API.

Capabilities Granted for forge-mesh-loading

Loading 3D models from OBJ files for immersive gaming experiences
Rendering textured meshes with a camera for interactive graphics
Parsing vertex positions, normals, and UV coordinates from Wavefront OBJ files for custom 3D modeling

! Prerequisites & Limits

  • Requires SDL's GPU API for real-time graphics programming
  • Limited to Wavefront OBJ file format
  • Needs understanding of 3D graphics concepts, including textures, samplers, mipmaps, and camera control

Source Boundary

The section below is supporting source material from the upstream repository. Use the Killer-Skills review above as the primary decision layer.

Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is forge-mesh-loading?

Perfect for Graphics Agents needing advanced 3D model rendering capabilities with Wavefront OBJ files and SDL's GPU API. Load a 3D model from an OBJ file, create a textured mesh with mipmaps, and render with a fly-around camera. Use when someone needs to load geometry from a file, parse OBJ models, or render textured 3D

How do I install forge-mesh-loading?

Run the command: npx killer-skills add RosyGameStudio/forge-gpu/forge-mesh-loading. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for forge-mesh-loading?

Key use cases include: Loading 3D models from OBJ files for immersive gaming experiences, Rendering textured meshes with a camera for interactive graphics, Parsing vertex positions, normals, and UV coordinates from Wavefront OBJ files for custom 3D modeling.

Which IDEs are compatible with forge-mesh-loading?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for forge-mesh-loading?

Requires SDL's GPU API for real-time graphics programming. Limited to Wavefront OBJ file format. Needs understanding of 3D graphics concepts, including textures, samplers, mipmaps, and camera control.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add RosyGameStudio/forge-gpu/forge-mesh-loading. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use forge-mesh-loading immediately in the current project.

Imported Repository Instructions

The section below is supporting source material from the upstream repository. Use the Killer-Skills review above as the primary decision layer.

Supporting Evidence

forge-mesh-loading

Install forge-mesh-loading, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly
Imported Repository Instructions
The section below is supporting source material from the upstream repository. Use the Killer-Skills review above as the primary decision layer.
Supporting Evidence

Mesh Loading — OBJ Parsing, Textured Rendering, Camera

This skill teaches how to load and render 3D models from Wavefront OBJ files. It builds on textures-and-samplers (Lesson 04), mipmaps (Lesson 05), depth-and-3d (Lesson 06), and camera-and-input (Lesson 07).

When to use

  • Loading 3D models from OBJ files
  • Rendering textured meshes with a camera
  • Parsing vertex positions, normals, and UV coordinates from files
  • Setting up non-indexed rendering (de-indexed vertices)
  • Combining texture loading + mipmaps + depth testing + camera in one app

Key API calls (ordered)

  1. forge_obj_load(path, &mesh) — parse OBJ into de-indexed vertex array
  2. SDL_CreateGPUBuffer + transfer upload — upload vertices to GPU
  3. SDL_LoadSurface + SDL_ConvertSurface — load PNG texture
  4. SDL_CreateGPUTexture with SAMPLER | COLOR_TARGET — mipmapped texture
  5. SDL_GenerateMipmapsForGPUTexture — auto-generate mip chain
  6. SDL_CreateGPUSampler — trilinear, REPEAT address mode
  7. SDL_CreateGPUGraphicsPipeline — 3 vertex attributes, depth test, back-face cull
  8. SDL_BindGPUFragmentSamplers — bind diffuse texture + sampler
  9. SDL_DrawGPUPrimitives — non-indexed draw (de-indexed vertices)

Libraries

c
1#include "obj/forge_obj.h" /* OBJ parser */ 2#include "math/forge_math.h" /* vectors, matrices, quaternions */

Code template

Loading the mesh

c
1/* Build path relative to executable */ 2const char *base_path = SDL_GetBasePath(); 3char obj_path[512]; 4SDL_snprintf(obj_path, sizeof(obj_path), "%smodels/model.obj", base_path); 5 6ForgeObjMesh mesh; 7if (!forge_obj_load(obj_path, &mesh)) { 8 SDL_Log("Failed to load model"); 9 return SDL_APP_FAILURE; 10} 11 12/* Upload to GPU vertex buffer via transfer buffer */ 13Uint32 vertex_data_size = mesh.vertex_count * (Uint32)sizeof(ForgeObjVertex); 14/* ... standard transfer buffer pattern from Lesson 02 ... */ 15 16Uint32 mesh_vertex_count = mesh.vertex_count; 17forge_obj_free(&mesh); /* CPU-side data no longer needed */

Loading texture with mipmaps

c
1SDL_Surface *surface = SDL_LoadSurface(tex_path); 2SDL_Surface *converted = SDL_ConvertSurface(surface, SDL_PIXELFORMAT_ABGR8888); 3SDL_DestroySurface(surface); 4 5int num_levels = (int)forge_log2f((float)converted->w) + 1; 6 7SDL_GPUTextureCreateInfo tex_info; 8SDL_zero(tex_info); 9tex_info.type = SDL_GPU_TEXTURETYPE_2D; 10tex_info.format = SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM_SRGB; 11tex_info.usage = SDL_GPU_TEXTUREUSAGE_SAMPLER | SDL_GPU_TEXTUREUSAGE_COLOR_TARGET; 12tex_info.width = converted->w; 13tex_info.height = converted->h; 14tex_info.num_levels = num_levels; 15/* ... upload base level, then: */ 16SDL_GenerateMipmapsForGPUTexture(cmd, texture);

Vertex layout (3 attributes)

c
1/* ForgeObjVertex: position (float3) + normal (float3) + uv (float2) */ 2 3vertex_attributes[0].location = 0; /* TEXCOORD0 = position */ 4vertex_attributes[0].format = SDL_GPU_VERTEXELEMENTFORMAT_FLOAT3; 5vertex_attributes[0].offset = offsetof(ForgeObjVertex, position); 6 7vertex_attributes[1].location = 1; /* TEXCOORD1 = normal */ 8vertex_attributes[1].format = SDL_GPU_VERTEXELEMENTFORMAT_FLOAT3; 9vertex_attributes[1].offset = offsetof(ForgeObjVertex, normal); 10 11vertex_attributes[2].location = 2; /* TEXCOORD2 = uv */ 12vertex_attributes[2].format = SDL_GPU_VERTEXELEMENTFORMAT_FLOAT2; 13vertex_attributes[2].offset = offsetof(ForgeObjVertex, uv);

Rendering (non-indexed)

c
1SDL_BindGPUVertexBuffers(pass, 0, &vertex_binding, 1); 2 3SDL_GPUTextureSamplerBinding tex_binding; 4SDL_zero(tex_binding); 5tex_binding.texture = diffuse_texture; 6tex_binding.sampler = sampler; 7SDL_BindGPUFragmentSamplers(pass, 0, &tex_binding, 1); 8 9/* Non-indexed draw — de-indexed vertices, every 3 form a triangle */ 10SDL_DrawGPUPrimitives(pass, mesh_vertex_count, 1, 0, 0);

HLSL shaders

Vertex shader:

hlsl
1cbuffer Uniforms : register(b0, space1) { column_major float4x4 mvp; }; 2 3struct VSInput { 4 float3 position : TEXCOORD0; 5 float3 normal : TEXCOORD1; 6 float2 uv : TEXCOORD2; 7}; 8 9struct VSOutput { 10 float4 position : SV_Position; 11 float2 uv : TEXCOORD0; 12}; 13 14VSOutput main(VSInput input) { 15 VSOutput output; 16 output.position = mul(mvp, float4(input.position, 1.0)); 17 output.uv = input.uv; 18 return output; 19}

Fragment shader:

hlsl
1Texture2D diffuse_tex : register(t0, space2); 2SamplerState smp : register(s0, space2); 3 4float4 main(float4 pos : SV_Position, float2 uv : TEXCOORD0) : SV_Target { 5 return diffuse_tex.Sample(smp, uv); 6}

Common mistakes

  1. Forgetting UV flip — OBJ uses V=0 at bottom; GPU uses V=0 at top. The forge_obj.h parser handles this automatically (1.0 - v).

  2. Using indexed draw for de-indexed mesh — Use SDL_DrawGPUPrimitives, not SDL_DrawGPUIndexedPrimitives, since vertices are already expanded.

  3. Wrong pixel formatSDL_LoadSurface may return any format. Always convert to SDL_PIXELFORMAT_ABGR8888 for GPU R8G8B8A8.

  4. Missing COLOR_TARGET usage — Required for mipmap generation. Without it, SDL_GenerateMipmapsForGPUTexture silently fails.

  5. Not copying model files in CMake — The OBJ and texture must be next to the executable. Use add_custom_command(POST_BUILD ...) to copy them.

  6. Loading JPGSDL_LoadSurface only supports BMP and PNG. Convert JPG textures to PNG first (e.g. with Python Pillow).

CMakeLists.txt pattern

cmake
1# Copy model files next to executable 2add_custom_command(TARGET my-target POST_BUILD 3 COMMAND ${CMAKE_COMMAND} -E make_directory 4 $<TARGET_FILE_DIR:my-target>/models/model-name 5 COMMAND ${CMAKE_COMMAND} -E copy_if_different 6 ${CMAKE_CURRENT_SOURCE_DIR}/models/model-name/model.obj 7 $<TARGET_FILE_DIR:my-target>/models/model-name/model.obj 8 COMMAND ${CMAKE_COMMAND} -E copy_if_different 9 ${CMAKE_CURRENT_SOURCE_DIR}/models/model-name/texture.png 10 $<TARGET_FILE_DIR:my-target>/models/model-name/texture.png 11)

References

Related Skills

Looking for an alternative to forge-mesh-loading or another community skill for your workflow? Explore these related open-source skills.

View All

openclaw-release-maintainer

Logo of openclaw
openclaw

Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

333.8k
0
AI

widget-generator

Logo of f
f

Generate customizable widget plugins for the prompts.chat feed system

149.6k
0
AI

flags

Logo of vercel
vercel

The React Framework

138.4k
0
Browser

pr-review

Logo of pytorch
pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration

98.6k
0
Developer