Add beginGeometry and endGeometry functions to python #62
Add beginGeometry and endGeometry functions to python #62Nitish-bot wants to merge 9 commits intoprocessing:mainfrom
beginGeometry and endGeometry functions to python #62Conversation
|
have also tried to implement a Upon running the example without the |
|
Hi @Nitish-bot, thank you again for working on this. I'm finally running your patch. It isn't working, and the PR has gone beyond scope, and we are limited on time for debugging folks' work. If you would like, remove the sphere implementation, and the translate related code you added as well as it's out of scope and broken. Then make an implementation that demonstrates the begin/end_geometry implementation is actually working, using the other functionality that does work (ie Lastly, take a screenshot before you re-open this PR demonstrating that it is working. We are still in the design phase for a lot of the API and much of it will change and we aren't ready to support new contributors for most tasks. We are trying to get there! And I really want you to be involved, but this not a stable enough project to quickly bring people into just yet. |
|
Hey @tychedelia! As moon rightfully mentioned, the PR is a little bit beyond scope and it wasn't working entirely. I couldn't simply test this with the I made a fresh commit that tests the lower level functions in a rust example. Now the rust example partially works displaying a sphere in the center of the screen but not responding to any translation commands. On the python side of things, nothing shows up at all even though both examples are effectively the same. |
| let layout_entity = commands | ||
| .spawn(VertexLayout::with_attributes(vec![ | ||
| builtins.position, | ||
| builtins.normal, | ||
| builtins.color, | ||
| builtins.uv, | ||
| ])) | ||
| .id(); | ||
|
|
||
| let mut mesh = Mesh::new( | ||
| Topology::TriangleList.to_primitive_topology(), | ||
| RenderAssetUsages::default(), | ||
| ); | ||
|
|
||
| mesh.insert_attribute(Mesh::ATTRIBUTE_POSITION, Vec::<[f32; 3]>::new()); | ||
| mesh.insert_attribute(Mesh::ATTRIBUTE_NORMAL, Vec::<[f32; 3]>::new()); | ||
| mesh.insert_attribute(Mesh::ATTRIBUTE_COLOR, Vec::<[f32; 4]>::new()); | ||
| mesh.insert_attribute(Mesh::ATTRIBUTE_UV_0, Vec::<[f32; 2]>::new()); | ||
|
|
||
| let handle = meshes.add(mesh); |
There was a problem hiding this comment.
This piece of code is the same as the beginning of the create function at line 95 so it could be abstracted away into a new function that creates and returns a default Geometry which can then be called in both places.
Closes #57