diff --git a/dpf b/dpf index af09cb0..e0a6cf3 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit af09cb0a1284337a2592d237caa9ac5a274ce059 +Subproject commit e0a6cf3f22550e2c7d40a97b60a688771de93ce8 diff --git a/examples/nanovg.cpp b/examples/nanovg.cpp index 2bd93a8..ba53bf6 100644 --- a/examples/nanovg.cpp +++ b/examples/nanovg.cpp @@ -22,7 +22,7 @@ // ------------------------------------------------------ // NanoVG Stuff -#include "NanoWidget.hpp" +#include "NanoVG.hpp" #include "nanovg_res/demo.h" #include "nanovg_res/perf.h" @@ -104,12 +104,13 @@ int my = 0; double prevt = 0; -class NanoExampleWidget : public NanoWidget, - public IdleCallback +class NanoExampleWidget : public Widget, + public IdleCallback, + public NanoVG { public: NanoExampleWidget(Window& parent) - : NanoWidget(parent), + : Widget(parent), fContext(getContext()) { parent.addIdleCallback(this); @@ -157,7 +158,7 @@ protected: glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT); - beginFrame(premult ? PREMULTIPLIED_ALPHA : STRAIGHT_ALPHA); + beginFrame(winWidth, winHeight, premult ? PREMULTIPLIED_ALPHA : STRAIGHT_ALPHA); renderDemo(fContext, mx, my, winWidth, winHeight, t, blowup, &fData); renderGraph(fContext, 5, 5, &fPerf);