Commit Graph

16 Commits

Author SHA1 Message Date
Bill Currie 4e1ddaa964 [renderer] Add fitted pic rendering
The pic is scaled to fill the specified rect (then clipped to the
screen (effectively)). Done just for the console background for now, but
it will be used for slice-pics as well.

Not implemented for vulkan yet as I'm still thinking about the
descriptor management needed for the instanced rendering.

Making the conback rendering conditional gave an approximately 3% speed
boost to glsl with the GL stub (~12200fps to ~12550fps), for either
conback render method.
2023-01-17 11:33:47 +09:00
Bill Currie b310ece7bd [vulkan] Clean up draw a little bit
It's just removing some functions that will never be implemented, and an
unnecessary field.
2023-01-09 13:31:53 +09:00
Bill Currie 5668006087 [renderer] Replace Draw_FontString with Draw_Glyph
While Draw_Glyph does draw only one glyph at a time, it doesn't shape
the text every time, so is a major win for performance (especially
coupled with pre-shaped text).
2022-12-10 18:55:08 +09:00
Bill Currie 136bf882f6 [ui] Move font loading into new gui library
Font and text handling is very much part of user interface and at least
partially independent of rendering, but does fit it better with GUI than
genera UI (ie, both graphics and text mode), thus libQFgui as well as
libQFui are built in the ui directory.

The existing font related builtins have been moved into the ruamoko
client library.
2022-12-07 17:38:38 +09:00
Bill Currie 85d40123e7 [vulkan] Remove depth pass from 2d rendering
I realized afterwards it wasn't really want I want as it would mess with
things like water warp and other effects.
2022-11-27 00:35:38 +09:00
Bill Currie 82d1a6e6cd [vulkan] Do a depth pass for 2d objects
While the HUD and status bar don't cut out a lot of screen (normally),
they might start to make a difference when I get transparency working
properly. The main thing is this is a step towards pulling the 2d
rendering into another render pass so the main deferred pass is
world-only.
2022-11-21 02:29:03 +09:00
Bill Currie 2fb5b67012 [vulkan] Implement line graph rendering
I should probably just use the line rendering for all renderers and pull
the graph drawing out to the client code.
2022-11-10 21:19:01 +09:00
Bill Currie 51b73eee73 [renderer] Add fontid to Draw_AddFont and Draw_FontString
It's not used yet, but the vulkan draw implementation will eventually
support multiple fonts being loaded (and rendered at a time).
2022-10-03 09:01:54 +09:00
Bill Currie 25a14eb232 [renderer] Add a cell-based character buffer
This is intended for the built-in 8x8 bitmap characters and quake's
"conchars", but could potentially be used for any simple (non-composed
characters) mono-spaced font. Currently, the buffers can be created,
destroyed, cleared, scrolled vertically in either direction, and
rendered to the screen in a single blast.

One of the reasons for creating the buffer is to make it so scaling can
be supported in the sw renderer.
2022-09-15 14:24:33 +09:00
Bill Currie 73635d84bf [renderer] Add stubs for Draw_FontString
Draw_FontString is for font-based text rendering. Nothing is implemented
at this stage.
2022-09-02 11:38:09 +09:00
Bill Currie 599c09e77e [renderer] Add Draw_AddFont for registering a font
It's implemented only in the Vulkan renderer, partly because there's a
lot of experimenting going on with it, but the glyphs do get transferred
to the GPU (checked in render doc). No rendering is done yet: still
thinking about whether to do a quick-and-dirty test, or to add HarfBuzz
immediately, and the design surrounding that.
2022-08-31 19:23:30 +09:00
Bill Currie 630dde6df7 [render] Add basic 2d line drawing
The software renderer uses Bresenham's line slice algorithm as presented
by Michael Abrash in his Graphics Programming Black Book Special Edition
with the serial numbers filed off (as such, more just so *I* can read
the code easily), along with the Chen-Sutherland line clipping
algorithm. The other renderers were more or less trivial in comparison.
2022-08-27 17:29:15 +09:00
Bill Currie 928408bad9 [vulkan] Support multiple render passes
Multiple render passes are needed for supporting shadow mapping, and
this is a huge step towards breaking the Vulkan render free of Quake,
and hopefully will lead the way for breaking the GL renderers free as
well.
2021-12-24 06:45:12 +09:00
Bill Currie bb4ca7683e [vulkan] Get the 2D pipeline up and running
First pixels! This was a nightmare of little issues that the validation
layers couldn't help with: incorrect input assembly, incorrect vertex
attribute specs. Though the layers did help with getting the queues
working. Still, lots of work to go but this is a major breakthrough as
I now have access to visual debugging for textures and the like.
2021-01-12 11:27:41 +09:00
Bill Currie ba6450d0b4 [vulkan] Make a start on the 2D pipeline
Short wrappers for Draw functins are in vid_render_vulkan.c so the
vulkan context can be passed on to the actual functions. The 2D shaders
are set up similar to those in glsl, but with full 32-bit color (rgba)
support instead of paletted. However, the textures are not loaded yet,
nor is anything bound.
2021-01-10 15:56:17 +09:00
Bill Currie 2bc78e7f0a Start work on a Vulkan-based renderer
Doesn't do much other than create an instance and enumerate some stuff,
but the build system is working.
2019-07-06 14:56:15 +09:00