Commit Graph

58 Commits

Author SHA1 Message Date
Bill Currie 5bf21931c7 [renderer] Remove more old fields from entity_t
The only transform related field remaining is old_origin. This also
brings the renderer closer to using simd (lots of stuff to fix still,
though).
2021-03-20 00:08:21 +09:00
Bill Currie 51e8694195 [qw] Use a dynamic array to track static entities
This takes care of another fixme in the cleanup of entity_t.
2021-03-11 09:11:08 +09:00
Bill Currie fbc1bd9f6e [renderer] Clean up entity_t to a certain extent
This is the first step towards component-based entities.

There's still some transform-related stuff in the struct that needs to
be moved, but it's all entirely client related (rather than renderer)
and will probably go into a "client" component. Also, the current
components are directly included structs rather than references as I
didn't want to deal with the object management at this stage.

As part of the process (because transforms use simd) this also starts
the process of moving QF to using simd for vectors and matrices. There's
now a mess of simd and sisd code mixed together, but it works
surprisingly well together.
2021-03-10 00:01:41 +09:00
Bill Currie b6bc8ed553 [renderer] Move core of scrap into shared code
The actual 2d area management code is now shared, with the actual
definition for scrap_t being left to the renderer specific
implementation.
2021-01-13 02:47:07 +09:00
Bill Currie 1a7add3f6d Merge branch 'master' into vulkan 2020-03-20 13:04:41 +09:00
Bill Currie a30433fa9e Make header protection consistent
And delete a couple of useless files.
2020-02-24 12:21:20 +09:00
Bill Currie cb10175824 Pass vid_internal to R_LoadModule
This fixes the segfault and pushes things very much in the desired
direction of proper system independence for rendering and presentation
separation (though things were headed in the right direction before).
2019-07-08 14:04:03 +09:00
Bill Currie 3cb0f3e183 Remove viddef in favor of vid in the renderers.
This fixes the status bar refresh issues in sw. The problem was that with
two viddef's hanging around, things got a little confused and recalc_refdef
wasn't getting into the renderer.
2013-01-16 11:23:47 +09:00
Bill Currie 2897dc5a16 Frame-rate independent cshift fades.
As per mh's post on inside3d.com. I don't see any difference, but it still
fades well, so... :)
http://forums.inside3d.com/viewtopic.php?f=12&t=4899
2012-06-15 22:02:18 +09:00
Bill Currie e730608dd7 Implement r_flatlightstyles from fitzquake. 2012-06-15 22:02:14 +09:00
Bill Currie 23a38738fc Massive whitespace cleanup.
Lots of trailing whitespace and otherwise blank lines.
2012-05-22 08:23:22 +09:00
Bill Currie 866c56c236 Do not try to lerp entities when their model changes.
This avoids sending invalid pose data to the renderer. The symptom was a
vertex array offset higher than the vertex array size. Discovered by calim
of nouveau while he was debugging a driver problem found by QF. Many
thanks.
2012-04-25 10:09:23 +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 d62772e9cc Separate render module loading from initialization.
This allows the vid module to load the render module and access render
specific functions before the renderer initializes, which happens to need
an initialized vid module...
2012-04-11 14:58:56 +09:00
Bill Currie 8e91fb7bc1 Get the basics linking.
Still, nothing will work: no plugins are loaded and they're all broken
anyway.

glx, sgl, glslx etc are going away, just the basics will be built: fbdev
(probably go away eventually), sdl, x11 and hopefully someday win. That's
actually the only reason anything links.
2012-04-11 14:58:53 +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 72fb96245f Cleanup global symbols for the sw and sw32 renderers.
Names not mangled, but those symbols that could be made static have been.
Also, many dead variables have been removed.
2012-02-18 14:34:14 +09:00
Bill Currie 9a4b065eaf Fix top/bottom colors for the SW renderers. 2012-01-23 17:33:19 +09:00
Bill Currie 7bfddd7ffe Gut most of the old skin code.
Custom skins are smashed on most targets. Player colors don't work, etc.
However, this will let me do a much cleaner implementation.
2012-01-23 16:16:30 +09:00
Bill Currie 53d89bf85a Clean up the mess around D_FlushCaches.
Create an R_ClearState and call that from the clients. It calls any
necessary functions itself.
2011-12-23 12:51:47 +09:00
Bill Currie 33c5320c0e Create stubs for most of the required render functions.
nq-glslx almost links. Just some suspicious references in host.c I want to
check before doing anything more.
2011-12-23 12:19:50 +09:00
Bill Currie 52d9269867 Merge brush model with world model rendering.
With this, non-mtex global fog now works properly :).
2011-12-18 08:09:55 +09:00
Bill Currie 3eb859a88f Move the entity transform setup into the clients.
This has several benifits:
  o The silly issue with alias model pitches being backwards is kept out
    of the renderer (it's a quakec thing: entites do their pitch
    backwards, but originally, only alias models were rotated. Hipnotic
    did brush entity rotations in the correct direction).
  o Angle to frame vector conversions are done only when the entity's
    angles vector changes, rather than every frame. This avoids a lot of
    unnecessary trig function calls.
  o Once transformed, an entity's frame vectors are always available.
    However, the vectors are left handed rather than right handed (ie,
    forward/left/up instead of forward/right/up): just a matter of
    watching the sign. This avoids even more trig calls (flag models in
    qw).
  o This paves the way for merging brush entity surface rendering with the
    world model surface rendering (the actual goal of this patch).
  o This also paves the way for using quaternions to represent entity
    orientation, as that would be a protocol change.
2011-12-15 17:09:01 +09:00
Bill Currie 4b515a961b Back out the fitzquake lerp changes.
That's not the direction I wish to take the renderer.
2011-12-13 17:01:15 +09:00
Bill Currie 90fcbefaff Don't use entity_t's next for linking static enitities. 2010-12-25 19:59:34 +09:00
Bill Currie ce96e6b055 The beginnings of fog support.
gl_fog.c is taken from fitzquake with only minor modifications to get it
into QF. Other than worldspawn/network parsing, it's not used yet.
2010-12-10 17:17:30 +09:00
Bill Currie a4b97e9e2e Dynamic entity allocation. Unlimited static entities.
Entities can now be allocated dynamically. They are freed whenever a new
map is loaded.

Use the dynamic entities for static entities.
2010-12-03 21:01:52 +09:00
Bill Currie a6941e27ef Eliminate MAX_VISEDICTS. Unlimited visible entities.
The renderer can now render as many entities as can be crammed into the
currently visible set of nodes.
2010-12-03 14:59:02 +09:00
Bill Currie cacd2fb895 FiztQuake's lerping system.
Seems to be mostly working. I get some funny results for zombies, but that
might be moving and turning at the same time causing issues.
2010-11-26 16:20:05 +09:00
Bill Currie 9ed9832789 bring back the alpha setting for dlights (finally found out what it was
for) and "fix" the wayward dlights in mvds: caused by svc_muzzleflash being
written before the player updates. Should probably fix properly that in the
server too.
2004-05-03 06:21:39 +00:00
Bill Currie fc4211c257 the rest of Grievre's lighting tweaks 2004-05-02 21:21:00 +00:00
Bill Currie 8ea7690530 serious cleanup of refdef calculations. 2004-02-08 00:37:11 +00:00
Ragnvald Maartmann-Moe IV 88c2735d9c Make sprite rendering use vertex arrays, as a test for detection of vertex array support (tests only for OpenGL 1.1 or better, at the moment, no driver blacklist yet). 2003-03-20 19:58:18 +00:00
Bill Currie 4bd1718475 re-arrange viewsize handling to fix the hud bug in glx 2003-02-11 21:24:27 +00:00
Bill Currie 71196fedf6 make gcc more anal about prototypes, string constants and function
visibility (ie, global functions must have a prototype)
2003-01-06 18:28:13 +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
Ragnvald Maartmann-Moe IV c8bc5dfb4c QSG2 glows almost working. Plus lots of typos killed. 2002-06-18 21:41:24 +00:00
Ragnvald Maartmann-Moe IV ceb73449bb Order of operations cleanup, QSG2 alpha is now colormod[3] in entities. 2002-06-07 11:25:47 +00:00
Bill Currie 10acad1ee4 first tie-in for the renderer (Draw_Pic: the interface will likely change
to better match the real interface, but this will do for now)
2002-01-18 22:35:46 +00:00
Bill Currie 013f503738 start getting const-correct on vec3_t params 2002-01-03 05:29:38 +00:00
Bill Currie f7c90759af clean out the non-renderer fields from entity_t. not yet a noticable gain
but more work needs to be done on the linking code in the client. However,
there /does/ seem to be a slight gain with possibly less variance.
2001-11-27 21:42:49 +00:00
Bill Currie e99b422628 extinguish gl_fires. it's semi-broken, generally nasty (code wise) and
kinda tacky. also results in a slight speed boost:)
2001-11-25 06:24:26 +00:00
Ragnvald Maartmann-Moe IV 9cc671e6d2 Try #2.
Change r_maxparticles from short to unsigned int.
Make MAX_DLIGHTS into a cvar, r_dlight_max that sets the unsigned int r_maxdlights.
2001-10-09 20:35:17 +00:00
Bill Currie 6bf58ab1af no header includes cvar.h now 2001-05-31 03:41:35 +00:00
Bill Currie 04d4df1e19 fix nq's skin code so it doesn't upload skins every frame 2001-05-27 04:23:39 +00:00
Bill Currie ec7335029d gl_draw.c is now client clean. 2001-05-23 04:05:10 +00:00
Bill Currie 4a80639556 sw and gl rmisc are now client clean. the graphing functions ahve been pulled
out into r_graph.c (Time and Z graph), cl_ngraph.c (Net graph), and
{gl,sw}_graph.c (R_LineGraph). gl_ngraph.c is gone. Unfortunatly, something
is rather wrong with NetGraph in gl (probably R_LineGraph).
2001-05-22 06:00:38 +00:00
Bill Currie 0a4b53c817 gl_rsurf is now client clean 2001-05-21 23:09:46 +00:00
Bill Currie da8715f27d sw_ralias.c and gl_rmain.c are now client clean. this involved a bit of a
revamp of skins. keep an eye out for broken skins (especially in nq)
2001-05-21 22:25:35 +00:00
Ragnvald Maartmann-Moe IV bee8473715 Added merge notes. 2001-05-21 16:22:31 +00:00