New Lua OpenGL Instanced Rendering API in BAR engine version [Video talk]

New Lua OpenGL Instanced Rendering API in BAR engine version [Video talk]

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
Beherith
Moderator
Posts: 5049
Joined: 26 Oct 2007, 16:21

New Lua OpenGL Instanced Rendering API in BAR engine version [Video talk]

Post by Beherith »

To phase out legacy drawing functions (e.g. gl.Vertex() ), moving to vertex arrays and instanced rendering is the most important thing. This video features a talk about how to manage drawing the same geometric primitive multiple times with different parameters using features exposed by the BAR fork of the SpringRTS engine. It features a full rundown of how to use this in a sane, and extremely efficient manner.

Speakers in this video are Beherith, MasterBel and Ivand.

The Lua Instance VBO Table implementation can be found here: https://github.com/beyond-all-reason/Be ... otable.lua

The InstanceVBOTable offers a convenient Lua wrapper around instance buffers, allowing you to use it as a lua table of instance, efficiently updating and popping and pushing elements into a list of things to draw.

The performance gains of using this method of drawing things are absolutely massive, as you can submit hundreds or thousands of draw calls in a single draw call.

YT link:https://youtu.be/hLAMZdN1lw4
Master-Athmos
Posts: 916
Joined: 27 Jun 2009, 01:32

Re: New Lua OpenGL Instanced Rendering API in BAR engine version [Video talk]

Post by Master-Athmos »

Thanks a lot for the extensive presentation. Will have a look at it...
Post Reply

Return to “Lua Scripts”