Browse Source

Fix for updated API

pull/1/head
falkTX 11 years ago
parent
commit
8ebb5acbca
2 changed files with 7 additions and 6 deletions
  1. +1
    -1
      dpf
  2. +6
    -5
      examples/nanovg.cpp

+ 1
- 1
dpf

@@ -1 +1 @@
Subproject commit af09cb0a1284337a2592d237caa9ac5a274ce059
Subproject commit e0a6cf3f22550e2c7d40a97b60a688771de93ce8

+ 6
- 5
examples/nanovg.cpp View File

@@ -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);


Loading…
Cancel
Save