-
-
Notifications
You must be signed in to change notification settings - Fork 16
Introduce R3D_Model / R3D_Material and more!
#29
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This major update introduces a complete overhaul of the 3D model and material system, with significant improvements to performance, compatibility, and ease of use.
🎯 Major Changes (Most Important)
1. New Core Types Architecture
Introduces four fundamental new types that form the backbone of the rendering system:
R3D_Vertex- Unified vertex structureR3D_Mesh- Optimized mesh containerR3D_Material- Complete material systemR3D_Model- Enhanced model representation2. Assimp Integration for Model Loading
3. Unified Vertex Buffer System
The new
R3D_Meshuses a single vertex buffer containing all attributes in order:positiontexcoordnormalcolortangentThis design ensures all attributes are always present, eliminating the need for multiple buffers and fallback handling.
🚀 Performance & Rendering Improvements
4. Automatic Frustum Culling
R3D_FLAG_NO_FRUSTUM_CULLING)R3D_MeshandR3D_Modelnow includeBoundingBox aabbmember5. Enhanced Instanced Rendering
R3D_ParticleSystemnow includesBoundingBox aabbmemberR3D_CalculateParticleSystemBoundingBox()or custom dimensions🔧 API Improvements
6. Reimplemented Mesh Generation Functions
bool uploadparameter for deferred manual upload viaR3D_UploadMesh()7. New Memory-Based Model Loading
R3D_LoadModelFromMemory()function added (thanks to Assimp)basePathparameter if needed8. Simplified Material System
R3D_ApplyXXX()functions for blend mode, face culling, etc.R3D_Materialsystem🎨 Rendering System Updates
9. Manual Transparency Sorting
10. Forward Rendering Flag
R3D_FLAG_FORCE_FORWARDflagR3D_ApplyRenderMode()function approach🐛 Bug Fixes & Adjustments
11. Numerous Bug Fixes
Summary
This update represents a major step forward in the library's architecture, and I'm excited about where the library is heading! The switch to Assimp alone makes model loading so much more reliable, and the automatic frustum culling should give everyone some nice performance gains out of the box. The new unified approach makes everything feel more cohesive while still keeping things straightforward to use.
Note: Some features like deferred model upload weren't implemented due to texture upload complexities, but can be reconsidered if needed.
And here, a new example was added to celebrate this and to showcase something that would have been difficult before in terms of loading and managing materials!
output.mp4