-
Notifications
You must be signed in to change notification settings - Fork 47
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
[icrate] Help with the creation of a spinning triangle example #483
Comments
@PicoLeaf A metal example with some animation would be really interesting to have! I think it should be possible to implement this with icrate in its current state. I don't really know much about Metal but I was able to make a very minimal template which you should be able to use to create something more advanced with animation. I uploaded it at my local fork under the metal-example branch under examples/metal.rs You can run the example with the following command from the
This should create a window with a static triangle that looks like this: There's no logic for creating an app menu or quitting through the UI without Hope that helps. |
Woah, this is awesome, it sure helps, thank you so much! |
By the way, one small thing I missed: |
Note that the plan is to move the For now though, I think the example that @silvanshade provided will do nicely, could you put up a PR? |
Nice, I actually have the spinning animation part mostly written out, would you be intrested in seing that in your example? |
Sure! If you'd like to create a PR with your modified version I think that would be great. |
All right, i've made a pull request on your local fork :), |
Thanks! I think it's okay to use multiple buffers but maybe there is a better way to do it. One thing I did notice though is that we didn't really need to set up the additional encoder in this case (although it could be useful for an example with more complex composite data). I went ahead and merged your commits and did some refactoring and created the PR for this repo at #489 |
Now that your PR is open, further discussion can continue over there and I can close this issue :) |
I was trying to use icrate for metal context creation, but the complete lack of any guidance on the topic was rough especially since it isn't something I've done before (not on macos), so I'd be interested in contributing an example for this, I'm making this issue to get help.
The goal is a spinning triangle against a black background with each vertex assigned a different color.
The "spinning triangle part" would be done in the vertex shader instead of the main thread.
From what I gathered, there needs to be done a few things for this to work:
PLEASE tell me everything I've gotten wrong, I have very little clue of what I'm doing, I don't even know if all of this is possible with the current version of icrate!
The text was updated successfully, but these errors were encountered: