How cnlohr/rawdrawandroid works
Main Components
a) Core Components:
• Native Application Layer (C/NDK)
• Android Native App Glue Bridge
• OpenGL ES Rendering System
• Asset Management System
• Input Handling System
• USB Device Interface
• Permission Management System
b) External Interfaces:
• Android Platform APIs
• Device Hardware (Accelerometer, Gyro, Touch)
• USB Devices
• OpenGL ES
• Asset Storage
[Hardware Layer]
• ↑↓
[Android Platform Layer]
• ↑↓
[Native Bridge Layer (android_native_app_glue)]
• ↑↓
[Core Application Layer]
• [Rendering System]
• [Input System]
• [Asset Management]
• [USB Interface]
Key Relationships to Highlight
a) Data Flow:
• How input events flow from hardware through the native bridge
• Rendering pipeline from application to screen
• Demonstrate asset loading path
• USB device communication flow
b) Component Integration:
• How the native code interfaces with Android through JNI
• Permission management flow
• Build system integration
Technical Details
• NDK/JNI bridge mechanisms
• OpenGL ES integration
• Asset management through AAssetManager
• Input handling system (touch, accelerometer, keyboard)
• USB device interface
• Permission management system
Implementation Notes
• Notes about the required implementation of HandleResume(), HandleSuspend(), and HandleWindowTermination()
• Reference to the modified HandleMotion() behavior
• Relationship with the rawdraw framework
• Minimal overhead design
• Direct hardware access
• Native code focus
• Build system simplicity