Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solid circle primitive is missing a triangle #220

Closed

Conversation

Guillaume227
Copy link
Contributor

Adding one extra vertex in solid circle primitive in order to fill missing triangle.

This is what I see with the following code:

		auto const circle = Primitives::Circle::solid(6);
		
		_vertexBuffer.setData(circle.positions(0), BufferUsage::StaticDraw);
		_mesh.setPrimitive(circle.primitive())
			.setCount(circle.positions(0).size())
			.addVertexBuffer(_vertexBuffer, 0, Shaders::Flat2D::Position{})

image

…ssing triangle (especially visible with low segment count)
@mosra
Copy link
Owner

mosra commented Nov 7, 2017

Hi,

sorry, somehow missed the GitHub notifications so I'm answering late. Thanks a lot for the fix, I'm stupid :) I apparently misunderstood how triangle fan primitive works (I thought it closes itself) and never bothered to test properly.

Applied your patch as 059f139 (updating the unit test as well, so the builds pass).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants