changed draw_frame() into separate update() and render() functions
This commit is contained in:
parent
2494f4c5eb
commit
c3935312c4
@ -20,7 +20,8 @@ class ScreensaverPlugin {
|
|||||||
virtual void setup(cairo_t* context, const cairo_rectangle_t& rect);
|
virtual void setup(cairo_t* context, const cairo_rectangle_t& rect);
|
||||||
virtual int fps() const;
|
virtual int fps() const;
|
||||||
|
|
||||||
virtual void draw_frame() = 0;
|
virtual void update() = 0; // advance state for next frame
|
||||||
|
virtual void render() = 0; // draw next frame
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
cairo_t* _c {nullptr};
|
cairo_t* _c {nullptr};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user