Creates a WebGL context without a window for headless rendering and server-side graphics
Overall
score
96%
{
"context": "This criteria evaluates how well the engineer uses the gl package's vertex attribute configuration APIs, specifically vertexAttribPointer and related functions, to properly set up interleaved vertex data for rendering.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Buffer creation",
"description": "Uses createBuffer() to create a vertex buffer object and bindBuffer() with ARRAY_BUFFER target to bind it before uploading data",
"max_score": 10
},
{
"name": "Buffer data upload",
"description": "Uses bufferData() to upload the interleaved vertex data (positions and colors) to the GPU, with appropriate usage hint (STATIC_DRAW, DYNAMIC_DRAW, or STREAM_DRAW)",
"max_score": 10
},
{
"name": "Attribute location retrieval",
"description": "Uses getAttribLocation() to retrieve the location indices for both the position and color vertex attributes from the shader program",
"max_score": 15
},
{
"name": "Position attribute pointer",
"description": "Uses vertexAttribPointer() to configure the position attribute with correct parameters: index from getAttribLocation, size=2 (xy components), type=FLOAT, stride=20 bytes (5 floats), and offset=0",
"max_score": 20
},
{
"name": "Color attribute pointer",
"description": "Uses vertexAttribPointer() to configure the color attribute with correct parameters: index from getAttribLocation, size=3 (rgb components), type=FLOAT, stride=20 bytes (5 floats), and offset=8 bytes (2 floats)",
"max_score": 20
},
{
"name": "Enable position attribute",
"description": "Uses enableVertexAttribArray() to enable the position vertex attribute array before rendering",
"max_score": 10
},
{
"name": "Enable color attribute",
"description": "Uses enableVertexAttribArray() to enable the color vertex attribute array before rendering",
"max_score": 10
},
{
"name": "Correct data layout",
"description": "Constructs the vertex data array with correct interleaved layout where each vertex has 5 floats (x, y, r, g, b) in sequence, matching the stride and offset values in vertexAttribPointer calls",
"max_score": 5
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-gldocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10