You will need to provide your own implementation of the
GPUDriver interface to hook Ultralight up with an existing 3D engine. All rendering is performed through this abstract interface.
SFML seems to be based on OpenGL so I would take a look at the
GPUDriverGL implementation provided in the Framework code.
Once your GPUDriver is hooked up, each View will be rendered to an offscreen FBO texture. You can retrieve the texture ID from the View's render target description (
View::render_target()) and render it to a screen-aligned quad (see the
Overlay class in Framework code).
You will also need to pass mouse/keyboard events to each View as well.
You should also perform the following pseudo-code once per frame to update the renderer:
// In your app's initialization code...
RefPtr<Renderer> renderer = CreateRenderer();
GPUDriver* driver = CreateDriver();
// In your app's update loop...
// Update internal logic (timers, event callbacks, etc.)
// Render all active views to command lists and dispatch calls to GPUDriver
// Draw any pending commands to screen
// Perform any additional drawing (Overlays) here...
// Flip buffers here.
BTW, since integrating Ultralight with an existing GPU context can be a bit cumbersome, you might also be interested to know I'm working on implementing a CPU renderer so you can render each View directly to a pixel buffer / texture.