clamp
clamp

Reputation: 34036

Render arbitrary Polygons in DirectX11

is there a way to render arbitrary polygons with n > 3 corners in directx 11?

i remember this being possible in older OpenGL versions with GL_POLYGON but i haven found anything in the directX API for this.

Upvotes: 1

Views: 407

Answers (1)

galop1n
galop1n

Reputation: 8824

The answer is not natively, there is no NGons primitive types, and the GL ones were mostly full of issues and quite near of a FAN.

You will have to triangulate yourself, it can be done with a geometry shader, receiving the control points and outputing the triangles

A compute shader with a DrawIndirect is possible and more versatile but need more setup to work.

Upvotes: 2

Related Questions