Commit Graph

6 Commits

Author SHA1 Message Date
cg2121
d7cce79d7e frontend: Use static_cast when casting from void pointers
Using static_cast is preferred here, as it is safer to use than
reinterpret_cast.
2025-05-05 20:47:10 -04:00
Lain
9b0ac7c01c frontend/widgets: Optimize preview primitive rendering
Certain draw calls were creating/destroying vertex buffers. Every call.
That's kind of not a great thing to do, so instead use the new
gs_draw_quadf() function to optimize rendering and reduce the need for
swapping vertex buffers.

Also uses a shader for DrawStripedLine so it does not have to split it
up into separate draw calls.
2025-04-23 15:23:29 -04:00
Lain
7f09344989 frontend/widgets: Fix integer overflow
If the crop values combined are larger than the width or height of the
source, an integer overflow will occur.

This fix converts the width/height values to int, and then clamps
any negative values to 0.
2025-04-23 14:07:09 -04:00
cg2121
86f7475f14 frontend: Add preview zoom controls 2025-04-01 17:31:09 -04:00
cg2121
4e8b131509 frontend: Use OBSBasic::Get() in all places
This reduces duplicated code when getting the OBSBasic context.
2025-02-05 15:15:52 -05:00
PatTheMav
f813121bb9 frontend: Add renamed Qt UI Widgets 2025-01-08 17:33:12 +01:00