Commit Graph

490 Commits

Author SHA1 Message Date
Bill Currie 7739ba3ea9 Move the 2D set out of the 3D code.
It really belongs exclusively in the screen setup code.
2012-01-13 19:51:45 +09:00
Bill Currie ea377b80c5 Remove some redundate statements. 2012-01-08 20:38:56 +09:00
Bill Currie f8d7bcf271 Rename R_RecursiveWorldNode to R_VisitWorldNodes in gl. 2012-01-08 18:16:33 +09:00
Bill Currie 601cc6e3d1 Make a start on bsp rendering.
Still nothing being rendered: still in the process of building the display
lists, but I'm making good progress. Get this into git before something
goes wrong :)
2012-01-08 10:29:38 +09:00
Bill Currie ec7d01f9b2 Merge out R_TextureAnimation. 2012-01-08 10:21:08 +09:00
Bill Currie 423e08ce21 Add demo to "movie" conversion.
It currently writes a series of png files (QF/qfmvNNNNNN.png), at a fixed
rate of 30fps, with no sound recording.
2012-01-05 19:19:37 +09:00
Bill Currie b13a2b6dbd Move screenshots to $fs_userpath/QF.
I got tired of screenshots getting scatter across the tree. ShotsPath in
the dirconf can override this.
2012-01-05 17:07:27 +09:00
Bill Currie 297a4e2756 Put the D_FlushCaches mess back.
It turns out that when it is called is highly timing sensitive :(
However, the rest of R_ClearState remains.
2012-01-05 15:50:20 +09:00
Bill Currie 6f18035c12 Fix up alias-16 support.
After getting in contact with serplord, I now know that the sw alias
loading was correct. Turns out the gl loaders was mostly correct, just a
mistaken subtract rather than add. And with that, I can implement alias-16
support in glsl. better yet, since all the work is done in the loader, the
renderer doesn't know anything about it :) However, I need to create some
16-bit models for testing.
2012-01-05 12:52:12 +09:00
Bill Currie f0e88bbe85 Rip out the duplicate lerp code and merge it.
While the vertex lerping needs to be duplicated in the current GL code,
there's no need for the setup code to be duplicated. Also, I want it for
GLSL.
2012-01-04 16:26:52 +09:00
Bill Currie 454047ab92 Make r_novis 0 take effect immediately. 2012-01-03 23:17:49 +09:00
Bill Currie 0797183201 Merge R_MarkLeaves from gl, sw, and sw32.
Other than novis, they're functionally identical. Now sw and sw32 have
novis as well.
2012-01-03 21:09:13 +09:00
Bill Currie 1437cbec91 Make the face culling a little more sensible.
GL Quake was weird, culling front faces. Partly understandable, since
Quake's front order is clockwise and GL's default order is
counter-clockwise. However, since the order can be specified, that should
be done instead. Thus, specify the winding order as clockwise (for quake's
data), set culling for back-face removal, and then mess with the winding
direction in the mirror and fish-eye code.
2012-01-03 18:06:26 +09:00
Bill Currie 1c480bf75e Merge the alias skin selection code.
We really don't need 4 copies of identical code when 1 will do :P
2012-01-02 15:57:43 +09:00
Bill Currie 20d93466c7 Frag some magic numbers.
More annoying than hipnotic's gremlins.
2011-12-30 21:07:35 +09:00
Bill Currie db8573b774 Make the cross-hair data sharable between renderers. 2011-12-26 21:43:15 +09:00
Bill Currie cc5140e3a1 Move min/max/bound and field_offset into better locations.
min/max bound into mathlib.h (they /are/ math functions, after all) and
field_offset into qtypes.h.
2011-12-24 10:04:33 +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 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 a8e354536a Implement the instance surface allocation/freeing.
Not actually used yet, so it's harmless at this stage.
2011-12-17 19:42:19 +09:00
Bill Currie 87b78e5533 Move the surface chain links out of the surfaces.
The links are now in "instance surfaces". For non-instanced models (world,
doors, plats etc (ie, world and its sub-models)), there will be one
instance surface per model surface. However, for instanced models (ammo
boxes etc), there will be many, dynamically allocated (not yet
implemented). This commit gets the static instance surfaces working.
2011-12-17 19:14:14 +09:00
Bill Currie 9f0bdf7794 Add some comments. 2011-12-17 09:39:57 +09:00
Bill Currie 933120d44f Fake vertex arrays for text and particles.
Getting gl_vaelements_max -1 to work produced a rather nasty surprise :P
2011-12-16 20:09:05 +09:00
Bill Currie e67690a1a9 Restore the missing lightmaps in non-mtex mode.
I forgot to blend in the lightmaps in the fogless non-mtex path.
2011-12-16 09:21:39 +09:00
Bill Currie b2aa5ce554 Register the textures of other brush models; 2011-12-15 17:09:02 +09:00
Bill Currie 962451e2fe Create a list of texture chains.
This moves the texture chains out of the world model and into a separate
list, allowing other brush models to registter their textures.
2011-12-15 17:09:02 +09:00
Bill Currie d6a668d517 Split out chain_surface() from visit_node(). 2011-12-15 17:09:02 +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 b05be59ea0 Fix alias models in non-mtex fog.
It turns out that due to the way we do fullbrights, nothing special needs
to be done to get the fullbright texture blended with the model even when
fog is enabled.
2011-12-12 17:08:22 +09:00
Bill Currie 8e531a58c2 Get global fog working for multi-pass rendering.
For the world textures, anyway. Entity multi-pass rendering still needs to
be verified.
2011-12-12 17:08:22 +09:00
Bill Currie 91e65b6c80 Rename mplane_t to plane_t and clean up the mess.
I got rather tired of there being multiple definitions of mostly compatible
plane types (and I need a common type anyway). dplane_t still exists for
now because I want to be careful when messing with the actual bsp format.
2011-11-28 20:54:34 +09:00
Bill Currie 1c47f9e16d Kill some magic numbers. 2011-09-04 09:58:12 +09:00
Bill Currie f75b0a611b Some compile fixes for OpenBSD 2011-08-25 22:35:20 +09:00
Bill Currie efa0105748 Rename some headers to fix doxygen warnings. 2011-07-23 15:58:45 +09:00
Bill Currie 0f7390dd60 Clean up all the "set but not used" warnings.
gcc on my system is failing to treat this specific warning as an error :/
2011-06-19 10:48:02 +09:00
Bill Currie 74a7e07dfc Use AM_CFLAGS instead of CFLAGS.
CFLAGS is meant to be reserved for the user.
2011-05-10 12:44:44 +09:00
Bill Currie 47e55fe1c6 Properly terminate each fisheye quad strip.
The horizontal quad strips need to be rendered individually rather than as
one single strip. The latter results in ugly triangles crossing the screen.
2011-04-17 13:03:22 +09:00
Bill Currie 14480fd1b4 Move the call to R_ClearEnts to the renderer.
This fixes the hang on certain maps in qw-client.
2010-12-25 19:59:34 +09:00
Bill Currie 774f049646 Fix garbage at edges of conchar characters.
Move the texture coordinates in 1/4 of a pixel. To avoid unnecessary
calculations, pre-caclulate the character cell texture coordinates and
blast them into the the texture coordinate array.
2010-12-11 12:09:30 +09:00
Bill Currie 8919aec663 Get global fog working in mtex mode. 2010-12-10 21:40:36 +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 6114495870 Don't try to load skys named "".
This makes 'loadsky ""' and 'loadsky none' equivalent.
2010-12-10 17:17:30 +09:00
Bill Currie c4f71c0cda Move r_skyname handling from R_NewMap to R_LoadSkys.
r_skyname now acts as the default sky to use when no sky name is specified
by other means ("none" is still no sky). 'loadsky foo' will load the
"foo*" sky textures, 'loadsky none' gives the default sky, and 'loadsky
""' causes uses r_skyname.
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 f98b002f9e Make R_StoreEfrags const-correct.
R_StoreEfrags does not need to modify its parameter or anything to which
it directly refers, so make the pointer single-level and constant.
2010-12-03 13:30:49 +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 31c13d92a2 Protocol 666/large map support from FitzQuake.
Alpha and lerping aren't implemented yet, but things seem to be working. I
can load and play oms2.bsp (Conflagrant Rodent).
2010-11-26 16:20:05 +09:00
Bill Currie 8c4fe2f844 Rename Sys_DPrintf to Sys_MaskPrintf.
We now have finer runtime control over what gets printed. Need to do a
SYS_DEV audit, creating new masks as apropriate.
2010-11-26 16:19:26 +09:00