Architecture & API
v0.01 AlphaC++ Migration
Deep dive into NXRender internals and subsystems
┌─────────────────────────────────────────────────────────┐
│ USER APPLICATIONS │
│ Calculator | Notes | Settings | File Manager | etc. │
└──────────────────────┬──────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ NXRender API (Public) │
│ - Window creation │
│ - Widget library │
│ - Event handling │
│ - Layout engine │
└──────────────────────┬──────────────────────────────────┘
│
┌───────────────┴───────────────┐
│ │
▼ ▼
┌──────────────────┐ ┌──────────────────┐
│ COMPOSITOR │ │ UI TOOLKIT │
│ - Surface mgmt │ │ - Widgets │
│ - Layer blend │ │ - Layout │
│ - Animations │ │ - Theming │
│ - Effects │ │ - Animations │
└────────┬─────────┘ └────────┬─────────┘
│ │
└─────────────┬───────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ GRAPHICS BACKEND (NXGFX) │
│ - GPU acceleration (Vulkan/OpenGL) │
│ - Text rendering (FreeType) │
│ - Image decoding (PNG, JPEG, SVG) │
│ - Primitive drawing (rect, circle, line, path) │
└──────────────────────┬──────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ KERNEL DRIVERS │
│ - DRM/KMS (display management) │
│ - GPU drivers (Intel, AMD, NVIDIA) │
│ - Input drivers (mouse, keyboard, touchscreen) │
└─────────────────────────────────────────────────────────┘
source/nxrender-cpp/
├── CMakeLists.txt
├── README.md
├── include/ # Header declarations
│ ├── core/ # Core engine
│ │ ├── compositor.h # Main compositor
│ │ ├── surface.h # Drawing surfaces
│ │ └── layer.h # Layer management
│ ├── nxgfx/ # Graphics backend
│ │ ├── context.h # Hardware render ctx
│ │ ├── primitives.h # Draw primitives
│ │ └── color.h # Color structures
│ ├── widgets/ # Widget library
│ │ ├── widget.h # Base widget class
│ │ ├── button.h # Buttons
│ │ └── textfield.h # Text inputs
│ ├── layout/ # Layout engine
│ │ ├── layout.h # Layout traits
│ │ ├── flexbox.h # Flex logic
│ │ └── constraints.h # Constraints logic
│ ├── theme/ # Theming system
│ │ └── theme.h # Global theme defs
│ ├── input/ # Input handling
│ │ ├── events.h # Event payload
│ │ └── mouse.h # Mouse events
│ ├── animation/ # Animations
│ │ └── animator.h # Engine timing
│ ├── platform/ # Native platform hooks
│ ├── web/ # Web View integration
│ ├── nxrender_cpp.h # Main C++ wrapper include
│ └── nxrender_c_bridge.h # C interface bridge
└── src/ # C++ source code matching headers structure
Project Status
C++ Migration
NXRender has been successfully ported from Rust to a C++ based architecture (`nxrender-cpp`) to allow for tighter integration with ZepraBrowser's core libraries and NeolyxOS. This migration ensures zero-overhead bindings and unified memory management across the entire browser stack.
Phase 1: Foundation (In Progress)
- ✓ Graphics Backend (`nxgfx`) structure established
- ✓ Image Support (PNG/JPEG/WebP decoders)
- ✓ Effects rendering (Gradients, Shadows, Blurs)
- ✓ OpenGL ES 3.0 Backend Porting
- ⟳ Primitive drawing & Text shaping (WIP)