-
Content Count
15,995 -
Joined
-
Last visited
Single Status Update
-
Started working on our new zero-overhead renderer for maximum FPS. Very interesting stuff!
-
-
-
The World::Render() function has been replaced with this. It just iterates through all modified objects, sends the data to the culling thread, and returns. So the entire time of rendering disappears from your game loop:
void World::Render(shared_ptr<Buffer> buffer) { auto gfxdriver = GameEngine::GraphicsDriver(); shared_ptr<SharedObject> o; gfxdriver->cullsyncmutex->Lock(); gfxdriver->rendertarget = buffer; for (auto it = gfxdriver->modifiedobjects.begin(); it != gfxdriver->modifiedobjects.end(); ++it) { o = (*it).lock(); if (o == nullptr) continue; o->Sync(); } gfxdriver->cullsyncmutex->Unlock(); gfxdriver->modifiedobjects.clear(); }
-