Skip to content

[GMod Backend] Renderer Optimizations & Enhancements #29

@GrayWolf64

Description

@GrayWolf64

Brief history regarding the GMod backend renderer(in time order):

  1. surface.* combined calls(in very early stage, the draw commands in core code is purely functions that consist of a series of calls to surface.*, which is not flexible and relies heavily on GMod surface lib. Also, it's not fast.)
  2. For the first time, draw commands in core code was changed to match those in Dear ImGui, though text rendering still relies on surface.*. surface.DrawPoly() is used instead of other surface.DrawXXX(), despite the fact that it doesn't support per-vertex colors.
  3. Because of numerous inconveniences surface.DrawPoly() introduced(it took me hours to debug certain weird visual glitches), I decided to turn to using mesh.* functions. It's still quite tricky at first to adapt the backend to use it(also, hours of debugging related to it), but it's what we have till now. But the unavoidable downside is that for every vertex, several mesh.* C function calls are needed. Note that every frame, a possible amount of thousands of mesh.* calls are invoked, including transitions between C and Lua?

Suggestions or ideas are highly welcomed here! I will also post about my progress, if I made any, related to this topic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions