back in the saddle, upgrading dependencies
This commit is contained in:
@@ -9,6 +9,68 @@ So I'm just going to use this space to talk about hooking up vulkano to this bac
|
||||
All in all, this seems somewhat simple. This backend expects you to define a dozen or so types which are then passed around and manipulated using this interface.
|
||||
|
||||
|
||||
|
||||
==== Where I am at currently ====
|
||||
|
||||
So I need to figure out how pathfinder is creating and storing the framebuffers.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
RuntimeVertexDef {
|
||||
buffers: buffers,
|
||||
vertex_buffer_ids: vertex_buffer_ids,
|
||||
num_vertices: num_vertices,
|
||||
attributes: attributes,
|
||||
}
|
||||
|
||||
buffers [
|
||||
(position, size, InputRate::Vertex)
|
||||
(position, size, InputRate::Vertex)
|
||||
(position, size, InputRate::Vertex)
|
||||
]
|
||||
|
||||
vertex_buffer_ids [
|
||||
start and end addresses of buffers?
|
||||
]
|
||||
|
||||
num_vertices : usize
|
||||
|
||||
attributes [
|
||||
("attribute_name1", position, Format::R32G32Sfloat)
|
||||
("attribute_name2", position, Format::R32G32Sfloat)
|
||||
("attribute_name3", position, Format::R32G32Sfloat)
|
||||
]
|
||||
|
||||
|
||||
vertex shader input
|
||||
|
||||
attrib loc, buffer id
|
||||
|
||||
0,0 rgb
|
||||
1,1 rgb
|
||||
2,0 rgba
|
||||
3,2 rg
|
||||
4,0 rg
|
||||
5,0 rgba
|
||||
6,0 rgba
|
||||
7,0 rgba
|
||||
|
||||
layout(location = 0) in vec3 i_position;
|
||||
layout(location = 1) in vec3 i_normal;
|
||||
layout(location = 2) in vec4 i_tangent;
|
||||
layout(location = 3) in vec2 i_texcoord_0;
|
||||
layout(location = 4) in vec2 i_texcoord_1;
|
||||
layout(location = 5) in vec4 i_color_0;
|
||||
layout(location = 6) in vec4 i_joints_0;
|
||||
layout(location = 7) in vec4 i_weights_0;
|
||||
|
||||
|
||||
pub struct RenderState<'a, D> where D: Device
|
||||
pub target: &'a RenderTarget<'a, D>,
|
||||
pub program: &'a D::Program,
|
||||
@@ -77,24 +139,29 @@ pub struct RenderState<'a, D> where D: Device
|
||||
**This one I'm a little shakey on. Where do I get these attributes?**
|
||||
[ ] fn get_vertex_attr(&self, program: &Self::Program, name: &str) -> Option<Self::VertexAttr>;
|
||||
|
||||
**This function just looks up the uniform using the name**
|
||||
[ ] fn get_uniform(&self, program: &Self::Program, name: &str) -> Self::Uniform;
|
||||
|
||||
**Probably just allocating a buffer with data. Target is just usage**
|
||||
**See that it passes in a borrow for Buffer, I assume we should do an**
|
||||
**uninitialized_buffer type of deal**
|
||||
[>] fn bind_buffer(&self,
|
||||
vertex_array: &Self::VertexArray,
|
||||
buffer: &Self::Buffer,
|
||||
target: BufferTarget);
|
||||
|
||||
**This first bind_vertex_array()'s **
|
||||
**Then it appears to set the instancing using the descriptor and divisor?**
|
||||
**Then it configures the vertex attributes for the state. it's push pop it seems in gl**
|
||||
fn configure_vertex_attr(&self,
|
||||
vertex_array: &Self::VertexArray,
|
||||
attr: &Self::VertexAttr,
|
||||
descriptor: &VertexAttrDescriptor);
|
||||
descriptor: &VertexAttrDescriptor);
|
||||
|
||||
**This function just looks up the uniform using the name**
|
||||
[ ] fn get_uniform(&self, program: &Self::Program, name: &str) -> Self::Uniform;
|
||||
|
||||
**Probably just allocating a buffer with data. Target is just usage**
|
||||
**See that it passes in a borrow for Buffer, I assume we should do an**
|
||||
**uninitialized_buffer type of deal**
|
||||
|
||||
**Revising this : In GL all it is doing is assigning the buffer to an index in an array**
|
||||
**Probably should do like metal and emulate it (Ended up taking metal impl!)**
|
||||
[*] fn bind_buffer(&self,
|
||||
vertex_array: &Self::VertexArray,
|
||||
buffer: &Self::Buffer,
|
||||
target: BufferTarget);
|
||||
|
||||
|
||||
|
||||
**This creates the framebuffer using render_pass**
|
||||
**Since it's single-frame. We don't use the swapchain**
|
||||
|
||||
Reference in New Issue
Block a user