Toolkits don't use X to do much (if any) drawing these days. They all use something like cairo or skia or -- yes -- OpenGL to render offscreen, and then upload to X for display (or in the case of OpenGL, they can also do direct rendering).
This one of the major motivations as to why X11 guys decided Wayland was a good idea.
Because having your display server draw your application's output instead of your application drawing the output is a bad idea.