This project is read-only.

Feature request: Add virtual methods in RenderApplication

Nov 12, 2011 at 7:58 PM

I have the need to create my own window to do the rendering. Unfortunately RenderApplication class cannot create a window different than the one encapsulated in Win32RenderWindow. By making a new virtual method RenderApplication::CreateWindow(), I could create my own class deriving from Win32RenderWindow (C++ lacks metaclass feature, so I think a virtual method is the best approach). The virtual method would simply be a single line

Win32RenderWindow* RenderApplication::CreateWindow()
    return (new Win32RenderWindow());

Of course the line in RenderApplication::ConfigureRenderingEngineComponents which calls new Win32RenderWindow() has to be changed to call the new method.

The same principle should be applied to RendererDX11. ViewPerspective, ViewTextOverlay and FirstPersonCamera.

By the way, why is Win32RenderWindow named this way. I think it will be confusing once the x64 platform is supported. Why not simply name the class "RenderWindow" ? Win32 and Win64 windows are really compatible provided the correct types are used (LPARAM and WPARAM).

-- Francois Piette