Overview
IGraphicsSystem is the abstract interface for graphics subsystems in ReXGlue. It provides dependency injection for different rendering backends including Direct3D 12 and Vulkan.
Header: rex/system/interfaces/graphics.h
Namespace: rex::system
Interface Methods
Setup
processor- Pointer to the CPU processor instancekernel_state- Pointer to the kernel state managerapp_context- Windowed application context for presentationwith_presentation- Enable presentation layer if true
X_STATUS - Status code indicating success or failure
Shutdown
Concrete Implementations
Direct3D 12
Class:rex::graphics::d3d12::D3D12GraphicsSystem
Header: rex/graphics/d3d12/graphics_system.h
Direct3D 12 implementation providing Windows-native graphics rendering.
Vulkan
Class:rex::graphics::vulkan::VulkanGraphicsSystem
Header: rex/graphics/vulkan/graphics_system.h
Vulkan implementation providing cross-platform graphics rendering.
Base GraphicsSystem Class
The concrete implementations extendrex::graphics::GraphicsSystem, which provides:
Key Methods:
memory()- Access to memory subsystemprocessor()- Access to CPU processorkernel_state()- Access to kernel stateprovider()- Graphics provider instancepresenter()- Presentation layer instanceregister_file()- GPU register file accesscommand_processor()- Command processor instanceInitializeRingBuffer(ptr, size_log2)- Initialize GPU ring bufferEnableReadPointerWriteBack(ptr, block_size_log2)- Enable read pointer writebackSetInterruptCallback(callback, user_data)- Set GPU interrupt handlerClearCaches()- Clear all GPU cachesPause()/Resume()- Pause and resume rendering
Example Usage
Initializing D3D12 Graphics System
Initializing Vulkan Graphics System
See Also
- KernelState - Kernel state management
- IAudioSystem - Audio subsystem interface
- IInputSystem - Input subsystem interface