X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Frenderer.h;h=1f198dae7007b00db30d4c699f0832ce06d0cca1;hp=dd9464127d025ee0ae4ba9612084f91617f8ad67;hb=5df9e64424dd157da1410b4498f53a4ac21e6aee;hpb=d41ec7dfaa635bbaea9e902d5f5c60bd4a887891 diff --git a/source/renderer.h b/source/renderer.h index dd946412..1f198dae 100644 --- a/source/renderer.h +++ b/source/renderer.h @@ -114,6 +114,11 @@ public: Renderer(const Camera *); ~Renderer(); + /** Resets all internal state and restarts rendering. There must be no + unpopped state in the stack. It is permissible to call begin() multiple + times without an intervening end(). */ + void begin(const Camera *); + MatrixStack &matrix_stack() { return mtx_stack; } const Camera *get_camera() const { return camera; } @@ -151,8 +156,9 @@ public: Renderer. DEPRECATED. */ void escape(); - /** Ends rendering, unbinding all objects and resetting state. There must - be no unpopped state in the stack. */ + /** Unbinds all objects and resets related state. There must be no unpopped + state in the stack. Rendering with the same camera can be restarted without + an explicit begin() call. */ void end(); void exclude(const Renderable &); @@ -163,6 +169,7 @@ public: private: void apply_state(); + void reset_state(); }; } // namespace GL