Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upImproved gfx_defines documentation #1151
Conversation
Bastacyclop
reviewed
Jan 21, 2017
| /// | ||
| /// pipeline pipe { | ||
| /// vbuf: gfx::VertexBuffer<Vertex> = (), | ||
| /// transform: gfx::Global<[[f32; 4]; 4]> = "u_Transform", |
This comment has been minimized.
This comment has been minimized.
Bastacyclop
Jan 21, 2017
Member
maybe add a comment to say that this is for compatibility when constant buffers are not supported ?
Bastacyclop
reviewed
Jan 21, 2017
| /// | ||
| /// # `vertex` | ||
| /// | ||
| /// Defines the vertex format |
This comment has been minimized.
This comment has been minimized.
Bastacyclop
reviewed
Jan 21, 2017
| /// | ||
| /// # `pipe` | ||
| /// | ||
| /// The `pipeline state object` can consist of: |
This comment has been minimized.
This comment has been minimized.
Bastacyclop
reviewed
Jan 21, 2017
| /// | ||
| /// The `pipeline state object` can consist of: | ||
| /// | ||
| /// - A single vertex buffer object to hold the vertices. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Thanks for the comments, will push a more polished version in a bit. |
kvark
requested changes
Jan 22, 2017
|
Looks good! A few changes to address. |
| /// The `pipeline state object` or `pso` can consist of the following | ||
| /// `pso` components: | ||
| /// | ||
| /// - A single [vertex buffer](pso/buffer/type.VertexBuffer.html) component to hold the vertices. |
This comment has been minimized.
This comment has been minimized.
kvark
Jan 22, 2017
Member
The only "single" components at the moment are: depth/stencil and scissor. Vertex/instance buffers can appear multiple times by design.
| /// - A [scissor](pso/target/struct.Scissor.html) rectangle value (DX11) | ||
| /// | ||
| /// Structure of a `pipeline state object` can be defined | ||
| /// freely but should at the very least consist of one vertex buffer object. |
This comment has been minimized.
This comment has been minimized.
| /// Defines a structure for shader constant data. This constant data | ||
| /// is then appended into a constant buffer in the `pso`. Constant buffers | ||
| /// are only supported by DirectX 11 and OpenGL backend uses it's own | ||
| /// Uniform Buffer Object which requires OpenGL 3.1. |
This comment has been minimized.
This comment has been minimized.
kvark
Jan 22, 2017
Member
It sounds like GL doesn't support the constant buffers. It does, just names them as UBOs. You may just say that constant buffers are supported on D3D11 and GL3.
| /// - Single or multiple [constant buffer](pso/buffer/struct.ConstantBuffer.html) components. (DX11 and OpenGL3) | ||
| /// - Single or multiple [global buffer](pos/buffer/struct.Global.html) components. | ||
| /// - Single or multiple [samplers](pos/resource/struct.Sampler.html) | ||
| /// such as [texture samplers](pso/resource/struct.TextureSampler.html]. |
This comment has been minimized.
This comment has been minimized.
kvark
Jan 22, 2017
Member
A TextureSampler component is not an example of a sampler, it's a helper that is basically "ShaderResource" + "Sampler", which is useful for OpenGL where each texture comes with a sampler by default.
kvark
requested changes
Jan 23, 2017
|
Thanks for the fixes! |
| /// freely but should at the very least consist of one vertex buffer object. | ||
| /// Structure of a `pipeline state object` can be defined freely. | ||
| /// | ||
| /// It should be noted however, that you can have multiple objects of everything but |
This comment has been minimized.
This comment has been minimized.
kvark
Jan 23, 2017
Member
I think we should call them "components" instead of "objects" here for consistency.
| /// - A [scissor](pso/target/struct.Scissor.html) rectangle value (DX11) | ||
| /// | ||
| /// Structure of a `pipeline state object` can be defined | ||
| /// freely but should at the very least consist of one vertex buffer object. | ||
| /// Structure of a `pipeline state object` can be defined freely. |
This comment has been minimized.
This comment has been minimized.
kvark
Jan 23, 2017
Member
Let's add a sentence here saying that a definition may be used for multiple PSO objects, which potentially receive different initialization data (like the blend modes).
This comment has been minimized.
This comment has been minimized.
|
@Anttonii are you going to address the latest review? If not, we can take it from here. |
This comment has been minimized.
This comment has been minimized.
|
Ok, I'm going to merge this since the author is not responding. |
This comment has been minimized.
This comment has been minimized.
|
|
kvark
approved these changes
Feb 20, 2017
This comment has been minimized.
This comment has been minimized.
homu
added a commit
that referenced
this pull request
Feb 20, 2017
This comment has been minimized.
This comment has been minimized.
|
|
Anttonii commentedJan 21, 2017
•
edited
This is a draft. Currently looking for feedback on current information and possible improvements.
Closes #1135