PDA

View Full Version : Drawing a box with the Geometry Shader



ViolentHamster
08-09-2010, 10:42 AM
I'm trying to draw a box (with no bottom) with the geometry shader using a single point as input. I guess the most efficient approach is to use triangle strips. It seems I need one strip for the sides and one of the top. Can it be done with a single triangle strip? Does the geometry shader support primitive restart?

Thanks.

YarUnderoaker
08-09-2010, 11:10 PM
Sequence of EmitVertex() generate a strip. EndPrimitive() indicates strip end, so you may start new strip from another position.