Commit Graph

17 Commits

Author SHA1 Message Date
Bill Currie 20c861027e [sw] Take advantage of the ECS for edge rendering
This fixes the segfault due to the world entity not actually existing,
without adding a world entity. It takes advantage of the ECS in that the
edge renderer needs only the world matrix, brush model pointer, and the
animation frame number (which is just 0/1 for brush models), thus the
inherent SOA of ECS helps out, though benchmarking is needed to see if
it made any real difference.

With this, all 4 renderers are working again.
2022-10-25 19:36:09 +09:00
Bill Currie 8acd5c558b [scene] Make entity_t just an entity id for ECS
This puts the hierarchy (transform) reference, animation, visibility,
renderer, active, and old_origin data in separate components. There are
a few bugs (crashes on grenade explosions in gl/glsl/vulkan, immediately
in sw, reasons known, missing brush models in vulkan).

While quake doesn't really need an ECS, the direction I want to take QF
does, and it does seem to have improved memory bandwidth a little
(uncertain). However, there's a lot more work to go (especially fixing
the above bugs), but this seems to be a good start.
2022-10-23 22:24:36 +09:00
Bill Currie 55f7886607 Remove some long dead cvars
The declarations were still around, but the creation and code using them
was removed long ago.
2022-04-24 17:23:46 +09:00
Bill Currie 0c437492b4 [renderer] Move to using dynamic frame buffers
For now, OpenGL and Vulkan renderers are broken as I focused on getting
the software renderer working (which was quite tricky to get right).

This fixes a couple of issues: the segfault when warping the screen (due
to the scene rendering move invalidating the warp buffer), and warp
always having 320x200 resolution. There's still the problem of the
effect being too subtle at high resolution, but that's just a matter of
updating the tables and tweaking the code in D_WarpScreen.

Another issue is the Draw functions should probably write directly to
the main frame buffer or even one passed in as a parameter. This would
remove the need for binding the main buffer at the beginning and end of
the frame.
2022-03-24 12:56:29 +09:00
Bill Currie 8ee776e8fb [sw] Rename d_pzbuffer to d_zbuffer 2022-03-21 23:12:22 +09:00
Bill Currie 6c29904b1d [sw] Clean up R_SetSkyFrame a little
Move the constant data into R_InitSky so it doesn't get calculated every
frame (doesn't make much difference of course, but...)
2022-03-17 13:37:21 +09:00
Bill Currie f3768e3dfb [renderer] Remove currententity
One more global in the trash :)
2022-03-11 16:39:08 +09:00
Bill Currie 39103cc8a3 [sw] Fix some 32-bit assembly issues
I'm not sure that the mismatch between refdef_t and the assembly defines
was a problem (many fields unused), but the main problem was due to
execute permission on the pages: one chunk of asm was in the data
section, and the patched code was not marked as being executable (due to
such a thing not existing when quake was written).
2021-04-02 22:17:32 +09:00
Bill Currie 34bcf7faab Do a pure/const/noreturn/format attribute pass.
I always wanted these, but as gcc now provides warnings for functions that
could do with such attributes, finding all the functions is much easier.
2018-10-09 12:42:21 +09:00
Ozkan Sezer 6e04fd5ff6 signed int viddef_t members
The attached patch (against quakeforge git) changes the [con]width,
[con]height, and most importantly the rowbytes members of viddef_t
from unsigned to signed int, like in q2.  This allows for a properly
negative vid.rowbytes which may be needed in, e.g. a DIB sections
windows driver if needed.  Along with it, I changed a few places
where unsigned int is used along with comparisons against the relevant
vid.* members.
One thing I am not 100% sure is the signedness requirements of
d_zrowbytes and d_zwidth: q2 has them as unsigned but I am not sure
whether that is because they are needed as unsigned or it was just an
oversight of the id developers. They do look like they should be OK
as signed int to me, though: comments?

==
Note from Bill Currie: I had to do some extra changes as many
signed/unsigned comparisons were somehow missed.
2012-10-21 09:00:50 +09:00
Bill Currie bc1b483525 Nuke the rcsid stuff.
It's pretty useless in git.
2012-04-22 10:56:32 +09:00
Bill Currie a4c280f2b2 Take the first step towards render plugins.
No clients link. Even if they did, nothing would work.
2012-04-11 14:58:53 +09:00
Bill Currie 997102fea8 audit the usage of "only"
There are still a few iffy places (notably around certain prepositions), but
the relevant sentences are now much easier to read.
2010-01-13 06:42:26 +00:00
Bill Currie ca4b3acd6c big protototype cleanup. Now, except for a few cases, all non-static
prototypes are in headers files.
2002-11-05 19:12:51 +00:00
Bill Currie b5341f0d13 we now compile and link with -fno-common. this cleans up the multiple,
uninitialized declarations of variables.
2001-10-23 16:55:23 +00:00
Ragnvald Maartmann-Moe IV c6266aba36 sw32. Flee in terror. This'll break compilation for everything until -sdl32 compiles. sw32 wont work for a while either, so don't get overly excited yet. 2001-08-25 02:47:11 +00:00
Ragnvald Maartmann-Moe IV 7aa70de483 *meld* 2001-05-10 17:26:03 +00:00
Renamed from nq/include/d_local.h (Browse further)