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

[Graphics] fixed geometry shader with stream out #245

Merged
merged 2 commits into from Oct 30, 2018

Conversation

tebjan
Copy link
Member

@tebjan tebjan commented Oct 27, 2018

the work was almost done, only someone forgot to build the proper stream out elements and add the matching buffer flag.

@Kryptos-FR Kryptos-FR requested a review from xen2 October 27, 2018 13:42
{
return Buffer.New(device, size, BufferFlags.VertexBuffer, usage);
var flags = isStreamOutput ? BufferFlags.VertexBuffer | BufferFlags.StreamOutput : BufferFlags.VertexBuffer;
Copy link
Member

@xen2 xen2 Oct 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than a bool, let's use a BufferFlags parameter with sensible default: BufferFlags flags = BufferFlags.VertexBuffer
That way it's more explicit than a boolean when reading the invoking code.
Also it will be more future proof if the user wants to use some other flags.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah ok, i thought because this is in the Buffer.Vertex file the vertex buffer flag should always be set. but flags with vertex buffer as default is more flexible ofc.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I agree with you, I was also hesitating because of the same reason, but let's go with more explicit choice.

@xen2 xen2 merged commit d9a3ba8 into stride3d:master Oct 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants