To make porting easier, applications will not be directly calling graphics api functions when you call DrawRect/DrawLine/Etc. Instead these functions (and their parameters) will be pushed into a stack-like command buffer and executed in the order received. At the end of the frame the platform layer will go through all of the command that the application pushed and call the associating D3D/OGL/Vulkan calls.
To make porting easier, applications will not be directly calling graphics api functions when you call DrawRect/DrawLine/Etc. Instead these functions (and their parameters) will be pushed into a stack-like command buffer and executed in the order received. At the end of the frame the platform layer will go through all of the command that the application pushed and call the associating D3D/OGL/Vulkan calls.