Creating plugin with separate OpenGL window


I’m currently writing a runtime engine plugin for UE4 version 4.8.0 (currently on Windows 8, 64-bit). The goal is to have a separate OpenGL window that is created and updated by my plugin.

What is the proper way to create another, separate OpenGL window from within the UE4 editor?

Currently I’m doing the following from the game thread:

	TSharedRef<SWindow> Window = SNew(SWindow).Title(...)...;
	FViewportRHIRef Viewport = GDynamicRHI->RHICreateViewport(Window->GetNativeWindow()->GetOSWindowHandle(), Width, Height, false, EPixelFormat::PF_Unknown);

Is this the proper way to have a plugin create it’s own OpenGL window? I need to use OpenGL directly since I’m integrating an SDK which uses OpenGL. Are there any requirements/restrictions when implementing a custom window and presenter that need to be met in order to play nicely with the rest of the editor?