From: Mikko Rasa Date: Tue, 29 Oct 2019 00:19:43 +0000 (+0200) Subject: Remove last fragments of rendererless rendering X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=a1c39449fccf03ec08787bf51d62bf3b4cb60f69;p=libs%2Fgl.git Remove last fragments of rendererless rendering --- diff --git a/source/mesh.cpp b/source/mesh.cpp index e9015365..4b247e8d 100644 --- a/source/mesh.cpp +++ b/source/mesh.cpp @@ -114,27 +114,6 @@ void Mesh::set_winding(const WindingTest *w) winding = w; } -void Mesh::draw() const -{ - const Mesh *cur = current(); - if(cur && cur!=this) - throw invalid_operation("Mesh::draw"); - - if(manager) - { - manager->resource_used(*this); - if(disallow_rendering) - return; - } - - BindRestore bind_vtxs(vtx_setup); - BindRestore bind_ibuf(ibuf, ELEMENT_ARRAY_BUFFER); - Bind bind_winding(winding); - - for(vector::const_iterator i=batches.begin(); i!=batches.end(); ++i) - i->draw(); -} - void Mesh::draw(Renderer &renderer) const { if(manager) diff --git a/source/mesh.h b/source/mesh.h index 54ff2803..2de418ae 100644 --- a/source/mesh.h +++ b/source/mesh.h @@ -86,7 +86,6 @@ public: void set_winding(const WindingTest *); - void draw() const; void draw(Renderer &) const; void draw_instanced(Renderer &, const VertexSetup &, unsigned) const; diff --git a/source/pipeline.cpp b/source/pipeline.cpp index fa06fc5c..9fcf3518 100644 --- a/source/pipeline.cpp +++ b/source/pipeline.cpp @@ -202,14 +202,6 @@ void Pipeline::finish_frame() i->renderable->finish_frame(); } -void Pipeline::render() -{ - Renderer renderer(camera); - setup_frame(renderer); - render(renderer); - finish_frame(); -} - void Pipeline::render(Renderer &renderer, const Tag &tag) const { if(tag.id) diff --git a/source/pipeline.h b/source/pipeline.h index e8ffaf5e..d2ce6ab8 100644 --- a/source/pipeline.h +++ b/source/pipeline.h @@ -135,7 +135,6 @@ public: virtual void setup_frame(Renderer &); virtual void finish_frame(); - void render(); virtual void render(Renderer &, const Tag &tag = Tag()) const; private: