-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[rmodels] Smarter use of GPU and CPU skinning #5921
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
base: master
Are you sure you want to change the base?
Changes from all commits
c6e2f19
fc6c985
07e0802
7905bc1
5eebea8
567c736
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1655,6 +1655,8 @@ RLAPI void SetModelMeshMaterial(Model *model, int meshId, int materialId); | |
| RLAPI ModelAnimation *LoadModelAnimations(const char *fileName, int *animCount); // Load model animations from file | ||
| RLAPI void UpdateModelAnimation(Model model, ModelAnimation anim, float frame); // Update model animation pose (vertex buffers and bone matrices) | ||
| RLAPI void UpdateModelAnimationEx(Model model, ModelAnimation animA, float frameA, ModelAnimation animB, float frameB, float blend); // Update model animation pose, blending two animations | ||
| RLAPI void UpdateModelAnimationBones(Model model, ModelAnimation anim, float frame); // Update model animation pose (bones only) | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could those functions be kept internal to rmodels, I prefer to expose the minimum required functions for users.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is very useful for people who want to do GPU skinning only.
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I removed them because I considered most users don't need them, that was the reason to add the |
||
| RLAPI void UpdateModelAnimationBonesEx(Model model, ModelAnimation animA, float frameA, ModelAnimation animB, float frameB, float blend); // Update model animation bones to pose, blending two animations | ||
| RLAPI void UnloadModelAnimations(ModelAnimation *animations, int animCount); // Unload animation array data | ||
| RLAPI bool IsModelAnimationValid(Model model, ModelAnimation anim); // Check model animation skeleton match | ||
|
|
||
|
|
||
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to avoid enabling this by default. CPU solution is widely supported but GPU can fail in some platforms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not disable CPU skinning. Would you be ok with default enable for GL 3.3+?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If GPU skinning can not be enabled on target platform, does it fallback to CPU skinning? I'd like to keep the conditionals at minimum in config.h.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a plan for how to do this. I will test it in a fork.
Is there any hard info on devices that that the smaller number of vertex attributes? or is it just an ambiguous "some" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My research on the OpenGL spec.
OpenGL 3.0 - 4.6: Requires a minimum of 16 attributes