Thank you for your interest in contributing to RudeBase3D! This document provides guidelines for contributing to the project.
RudeBase3D aims to be a professional-grade 3D modeling application with:
- Clean, maintainable architecture
- High performance for real-time workflows
- Extensible plugin system
- Industry-standard user experience
-
Prerequisites:
- Visual Studio 2022 (Windows) or equivalent C++23 compiler
- Qt 6.9+ with OpenGL support
- CMake 4.0+
- Git
-
Setup:
git clone https://github.com/The-No-Hands-company/RudeBase3D.git cd RudeBase3D # Follow build instructions in README.md
-
Verify Setup:
# Build and run tests mkdir build && cd build cmake .. && cmake --build . --config Debug cmake --build . --target test
- C++23: Use modern C++ features appropriately
- Const Correctness: Mark functions and variables const when possible
- RAII: Use smart pointers and automatic resource management
- Naming:
- Classes:
PascalCase(e.g.,MeshGenerator) - Functions/Variables:
camelCase(e.g.,generateMesh()) - Constants:
UPPER_SNAKE_CASE(e.g.,MAX_VERTICES) - Private members: trailing underscore (e.g.,
meshData_)
- Classes:
- Single Responsibility: Each class should have one clear purpose
- Dependency Injection: Use interfaces to decouple components
- Command Pattern: All user actions should be undoable commands
- Namespace Organization: Use proper namespaces (
RudeBase3D::Geometry, etc.)
src/
├── module_name/
│ ├── ClassName.h # Interface in header
│ ├── ClassName.cpp # Implementation
│ └── tests/ # Unit tests for module
- Check existing issues
- Create an issue for new features or bugs
- Discuss approach before implementing large features
# Create feature branch
git checkout -b feature/your-feature-name
# Or bug fix branch
git checkout -b fix/bug-description- Write Tests First: Add unit tests for new functionality
- Implement: Write the minimal code to make tests pass
- Refactor: Improve code quality while keeping tests green
- Document: Update documentation and comments
# Format: type(scope): description
# Examples:
git commit -m "feat(geometry): add half-edge mesh subdivision"
git commit -m "fix(ui): resolve viewport rendering artifacts"
git commit -m "docs: update build instructions for Qt 6.6"Commit Types:
feat: New featurefix: Bug fixdocs: Documentation changesrefactor: Code refactoringtest: Test additions/changeschore: Build/tooling changes
- Update Documentation: Ensure README and docs are current
- Run Tests: All tests must pass
- Code Review: Submit PR for review
- Address Feedback: Make requested changes
- Merge: Squash commits if requested
- Write tests for all public interfaces
- Use descriptive test names:
test_MeshGenerator_CreatesCubeWithCorrectVertexCount - Test edge cases and error conditions
- Mock dependencies to isolate units under test
- Test component interactions
- Focus on critical user workflows
- Use realistic test data
# Run all tests
cmake --build . --target test
# Run specific test suite
./tests/geometry_tests
# Run with verbose output
ctest --verbose- Headers: Document all public interfaces with Doxygen comments
- Implementation: Explain complex algorithms and design decisions
- Examples: Provide usage examples for new APIs
- Update user-facing documentation for new features
- Include screenshots and step-by-step guides
- Keep documentation in sync with code changes
- Consistency: Follow established UI patterns
- Accessibility: Support keyboard navigation and screen readers
- Performance: UI should remain responsive during heavy operations
- Professional: Interface should feel polished and production-ready
- Use Qt's model/view architecture for data display
- Implement proper signal/slot connections
- Follow Qt naming conventions for UI elements
- Support theming and high-DPI displays
- Batch OpenGL calls where possible
- Use vertex buffer objects for geometry
- Implement frustum culling for large scenes
- Profile with graphics debuggers (RenderDoc, etc.)
- Use smart pointers appropriately
- Implement object pooling for frequently created/destroyed objects
- Profile memory usage with Valgrind or similar tools
- Be conscious of cache-friendly data structures
- Use spatial data structures (octrees, BVH) for scene queries
- Implement multi-threading for CPU-intensive operations
- Consider SIMD optimizations for math-heavy code
- Qt/OpenGL Context: Ensure proper OpenGL context management
- Memory Leaks: Use smart pointers and RAII patterns
- Performance: Profile before optimizing, measure after
- Cross-Platform: Test on multiple operating systems
- Debuggers: Visual Studio debugger, GDB, LLDB
- Memory: AddressSanitizer, Valgrind
- Graphics: RenderDoc, NVIDIA Nsight
- Profiling: perf, Intel VTune
- Check if feature aligns with project goals
- Search existing issues and discussions
- Consider implementation complexity vs. benefit
- Think about user experience impact
## Feature: [Brief Description]
### Problem
What problem does this solve for users?
### Proposed Solution
How should this feature work?
### Implementation Notes
Technical considerations and approach
### Alternatives Considered
What other solutions were evaluated?- Discussions: Use GitHub Discussions for questions
- Issues: Report bugs with minimal reproduction steps
- Code Review: Request reviews from maintainers
- Documentation: Check existing docs and code comments
Contributors will be:
- Listed in project credits
- Mentioned in release notes for significant contributions
- Invited to join the core development team for exceptional contributions
Thank you for contributing to RudeBase3D! 🎉