Adding generic immediate mode drawing API and migrating microprofile.

Future changes will move elemental-forms and imgui to the common API as
well.
This commit is contained in:
Ben Vanik
2015-11-05 21:36:05 -08:00
parent dc04baeb3f
commit c631b965d7
13 changed files with 674 additions and 427 deletions

View File

@@ -28,6 +28,8 @@ namespace xe {
namespace ui {
namespace gl {
class GLImmediateDrawer;
class GLContext : public GraphicsContext {
public:
static std::unique_ptr<GLContext> Create(Window* target_window,
@@ -38,9 +40,10 @@ class GLContext : public GraphicsContext {
HDC dc() const { return dc_; }
std::unique_ptr<GraphicsContext> CreateShared() override;
std::unique_ptr<ProfilerDisplay> CreateProfilerDisplay() override;
std::unique_ptr<el::graphics::Renderer> CreateElementalRenderer() override;
ImmediateDrawer* immediate_drawer() override;
bool is_current() override;
bool MakeCurrent() override;
void ClearCurrent() override;
@@ -73,6 +76,7 @@ class GLContext : public GraphicsContext {
std::unique_ptr<WGLEWContext> wglew_context_;
Blitter blitter_;
std::unique_ptr<GLImmediateDrawer> immediate_drawer_;
};
} // namespace gl