Bill Currie
f5f8b65c81
Fix the wonky viewsize border.
...
2D mode wasn't getting set after rendering the world. oops.
2012-01-13 19:47:16 +09:00
Bill Currie
eb2e688c9e
Clean up some whitespace.
2012-01-13 19:46:52 +09:00
Bill Currie
617107f9c1
Perform some black magic.
...
}:>
2012-01-12 21:23:39 +09:00
Bill Currie
cbd13ac54e
Implement QuatExp and fix up QuatBlend's param names.
2012-01-12 21:22:06 +09:00
Bill Currie
ba1b819173
Merge skyid and skybox begin/end.
2012-01-12 17:34:29 +09:00
Bill Currie
6e2d625d36
Load the skybox faces into the correct cubemap slots.
...
Quake and GL are rotated relative to each other, so care must be taken
when loading and rendering.
2012-01-12 15:13:19 +09:00
Bill Currie
f1eea0176c
Fix the too near far-clip plane.
...
I don't know if I miss-copied that, or if there's a bug in FTE's code.
2012-01-12 13:41:06 +09:00
Bill Currie
a66fcb8448
Implement skyboxes.
...
The texture assignments are incorrect, but it's otherwise working.
2012-01-12 11:05:34 +09:00
Bill Currie
8bcef272e6
Render the id skys :)
...
Wow... smooth.
2012-01-11 21:26:12 +09:00
Bill Currie
7ba7130f42
Load the sky texture as two separate textures.
...
The sky texture is normally 256x128, with each 128 wide side being the two
layers of the sky.
2012-01-11 21:09:57 +09:00
Bill Currie
b43d03a98b
Let the render specific texture loader decide on sky texture loading.
...
This is necessary to allow the glsl texture loader to process the sky
textures.
2012-01-11 21:08:04 +09:00
Bill Currie
f6f2e4f406
Create and load the id sky shader.
2012-01-11 16:02:20 +09:00
Bill Currie
89ae6eca8b
Even better?
...
It's difficult getting the same result because GL st are 0-1 but sw quake's
st are 0-inf % 64.
2012-01-11 07:51:15 +09:00
Bill Currie
5dbf913d41
Get the turbulence more correct.
...
This looks right, and should be easier to tweak.
2012-01-11 06:38:27 +09:00
Bill Currie
d2dae4cc58
Produce a saner turbulence.
...
I'm not quite sure it's right. Need to watch sw's turb a bit more.
2012-01-10 21:11:21 +09:00
Bill Currie
3508972d66
Draw water surfaces... with some really funky turbulence.
...
It seems I misunderstood the sw turbulence code.
2012-01-10 20:50:47 +09:00
Bill Currie
e38d72f50b
Get brush entity rendering working.
...
Unfortunately, the intel driver on my eeepc doesn't like the mipmas for
plat_top2 or +2floorsw. If I either don't load their mipmaps, or skip
drawing them, things seem to work nicely.
2012-01-10 13:06:02 +09:00
Bill Currie
3326aceed8
Rewrite the texture chain index list building.
...
It turns out my complicated plan was just that: complicated. Although there
are currently some bugs, the method I used to build the VBO in the first
place will work equally well for building the index lists.
2012-01-09 21:16:08 +09:00
Bill Currie
754dda92ff
Get the lightmap texture properly.
2012-01-09 21:13:40 +09:00
Bill Currie
ef311b60d6
Remove a now dead function.
2012-01-09 18:55:30 +09:00
Bill Currie
2b45cd693f
Fix the black overbright dlights.
...
t was unsigned and underflowing. This fixes the problem but keeps the
bitshift unsigned clean.
2012-01-09 18:05:41 +09:00
Bill Currie
310ba49f17
Make the dynamic lightmaps... dynamic.
2012-01-09 16:46:20 +09:00
Bill Currie
0005c97865
Temporary weaks so things look halfway decent.
...
GL mipmaps and paletted textures don't mix, and lightmaps work quite well
with linear sampling.
2012-01-09 16:26:28 +09:00
Bill Currie
12fd6bd390
Fix the segfault on map change.
...
I had forgotten to call R_ClearTextures when I'd rearranged the code.
2012-01-09 10:16:54 +09:00
Bill Currie
cd91fe7c8d
Set the pixel unpack alignment to 1.
...
4 hours chasing that one down. ouch.
2012-01-09 02:18:39 +09:00
Bill Currie
8779755e9c
Dump allocated rects for glsl_scraps BLAH.
2012-01-09 01:31:29 +09:00
Bill Currie
f658e6c32e
Initialize d_lightstylevalue.
...
"Let there be light!", but chaos still reigns (broken lightmap updates).
2012-01-09 01:30:26 +09:00
Bill Currie
1229d24ef6
Get world rendering mostly working.
...
Just some problems with lightmaps. There also seem to be some issues with
seams (t-junctions?) and far clip, but they're quite separate.
There's also a problem with a segfault when loading a second map.
2012-01-08 22:09:51 +09:00
Bill Currie
7428a91526
Try, but fail, to render the world.
2012-01-08 20:39:36 +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
6abaa5ea74
Build the display list for all loaded brush models.
...
The entire vertex set from every model is put into one list (not yet
uploaded). chains of elements arrays are build for non-instanced models
(instanced models will have their chains built each frame).
2012-01-08 17:45:44 +09:00
Bill Currie
fa82c37bd0
Pre-invert subpic->size.
...
I forgot to do this earlier :/
2012-01-08 17:44:28 +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
655252a506
Fix some warnings.
2012-01-07 23:11:56 +09:00
Bill Currie
aa27a3f49c
Load bsp model textures as repeating mipmaps.
2012-01-07 18:05:54 +09:00
Bill Currie
204c1aba03
Don't use the miptex_t after converting to texture_t.
2012-01-07 17:08:07 +09:00
Bill Currie
29a0dc0b68
Actually build the lightmaps, and fix a silly bug in the scrap allocator.
...
Also, add a command for dumping scrap statistics.
2012-01-07 15:35:08 +09:00
Bill Currie
8a5658ed61
Implement the bulk of the lightmap code.
...
Now just to get surface rendering going and hook in the lights.
2012-01-07 14:53:23 +09:00
Bill Currie
0993803006
Add texture sub-image management.
...
The planned uses are lightmaps and 2d icons.
2012-01-06 16:24:13 +09:00
Bill Currie
c25327f4ed
Add union and merge functions and tests.
2012-01-06 12:57:25 +09:00
Bill Currie
73f2c12815
Delete the intersection rect when finished.
2012-01-06 11:04:50 +09:00
Bill Currie
981760e19a
Add tests for vrect.
2012-01-06 11:04:34 +09:00
Bill Currie
2ae044effd
Split out vrect_t to its own file and add support functions.
...
The rest is cleanup after removing a wart from one of the field names.
2012-01-06 09:52:14 +09:00
Bill Currie
42266cddd5
Get models being lit by the world's lightmaps.
...
Even though the world isn't rendered yet.
2012-01-05 22:37:02 +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
764cd91879
Set the default hudtype.
...
Yay, Deek for finding another bug in qf :). He had an old dirconf that
didn't specify HudType and thus caused the status bar code to blow up. Set
the default to "id" if none is found.
2012-01-05 14:00:57 +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
c6bcd7aedb
Normalize the vertex normals.
...
I was wondering why the lighting looked a little extreme in overkill.
2012-01-05 12:45:43 +09:00
Bill Currie
bfc743fdcd
Add my point shaders before I lose them.
2012-01-04 18:47:03 +09:00
Bill Currie
8fbc6221f7
Get sprite interpolation working.
...
It's not perfect (it can't be), but it looks a whole lot nicer than no
interpolation.
2012-01-04 18:31:35 +09:00
Bill Currie
6050901e0e
Break out the entity blend calculations.
...
This allows alias and sprite model lerping to share the code.
2012-01-04 18:30:47 +09:00
Bill Currie
836209e5c6
Enable lerping of alias models.
...
Done in hardware }:>
2012-01-04 16:36:43 +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
99381b8b8c
Rework the alias vertex shader and rendering code for lerping.
...
Lerping isn't actually done yet (need to get both poses and blend), but
this still renders correctly with blend forced to 0.0.
2012-01-04 14:35:34 +09:00
Bill Currie
add5440ad1
Upload the normals with the vertex data.
...
Not all hardware can access a texture sampler from the vertex shader, and I
don't want multiple paths this early in the game. Now, vertex normals are
uploaded as shorts. Should be 14 bytes per vertex (was 10, could have been
8 if I had put the normal index with the vertex rather than st).
2012-01-04 09:42:00 +09:00
Bill Currie
fea7acd871
Enable vis calculation.
...
One nice thing about this project: I now KNOW that efrags works the way I
wanted it to: all those torches are now toggleable via r_novis :)
2012-01-03 23:20:01 +09:00
Bill Currie
d0a0440056
Make R_SplitEntityOnNode easier to read.
2012-01-03 23:19:21 +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
091b714e4c
Implement dynamic lighting.
...
This uses the same calculations as the software renderer. However, as the
lightmap calculations are not done yet, if there is no dlight in the
vicinity, there will be no light. demo1 is pretty cool to watch :)
2012-01-03 20:36:07 +09:00
Bill Currie
209c4cda8b
Scale the light level index correctly before colormap lookup.
...
With this, lighting seems to be working. I'm not certain the normals are
100% correct, but I can see something happening on rotating models.
2012-01-03 19:57:47 +09:00
Bill Currie
e8f863c76f
Remove the hedgehogs from the garden.
...
While the first frame was fine, any subsequent ones were not. I had
forgotten that hdr->poseverts held the edited vertex count rather than
hdr->mdl.numverts.
2012-01-03 18:11:39 +09:00
Bill Currie
d7bc437e2c
Fix the borked texture coordinates.
...
Silly me, doing byte based pointer math on a non-byte pointer :P
2012-01-03 18:10:35 +09:00
Bill Currie
185fded944
Re-enable the matrix optimizations.
...
Turns out my concatenations were correct.
2012-01-03 18:09:33 +09:00
Bill Currie
21c7b84379
Enable face culling and depth testing.
...
I spent way too long trying to figure out why triangle order wasn't making
any difference... :P
2012-01-03 18:08:01 +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
62e564c5cd
Send ALL of the model's verts to GL.
...
Triangles have 3 vertices, not one :P
2012-01-03 11:47:40 +09:00
Bill Currie
ba04cf73d0
Add my test tetrahedrons.
2012-01-03 09:34:17 +09:00
Bill Currie
baab15279f
Correct the alias vertex data types.
...
Vertex locations need to be unsigned byte rather than byte (GL is funy
with that). s and t need to be at least short, and since the normal index
is embedded in the st vector, it needs to be the same type. With this, my
test tetrahedrons seem to be working.
2012-01-03 09:34:17 +09:00
Bill Currie
c378acab6b
Actually load up the mvp and normal matrices.
...
Rather critical. I thought I'd done that :/
2012-01-03 09:34:17 +09:00
Jeff Teunissen
86edf54c40
Build and ignore cleanups
...
GLSL renderer build was checking for BUILD_GL instead of BUILD_GLSL in a
few places. Also, ignore the GLSL .fc and .vc files and the binaries.
2012-01-02 14:16:19 -05:00
Bill Currie
2a3151cecd
Hook in alias model drawing.
...
Nothing is visible yet.
2012-01-02 20:28:40 +09:00
Bill Currie
72e3a8d507
Merge sw and sw32 alias frame selection.
...
I'm leaving GL for later because lerping complicates things. I'll sort it
out when I implement lerping in GLSL.
2012-01-02 17:47:22 +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
540bccbc27
Load all the alias vertex data as bytes.
...
I had forgotten I wanted to do it this way.
2012-01-02 13:41:12 +09:00
Bill Currie
a57835866a
Build the vertex normals texture.
2012-01-02 13:40:48 +09:00
Bill Currie
6b4a10819a
Add an RGB texture loader.
2012-01-02 13:15:19 +09:00
Bill Currie
7e5b3304fc
Create the colormap texture.
2012-01-02 11:19:23 +09:00
Bill Currie
fd67f3500b
Load the alias model shaders.
2012-01-02 11:18:34 +09:00
Bill Currie
df3d9fe4df
Correct the fullbright start color extraction.
...
I don't know what despair and I were thinking, but we obviously didn't
understand the colormap code at the time.
2012-01-02 10:53:57 +09:00
Bill Currie
7be08534be
Clearify the program dump info a little.
...
Calling programs shaders was a little confusing when I use shader to refer
to the sub-programs (vertex and fragment shaders). Also, print the program
number as well.
2012-01-02 10:22:03 +09:00
Bill Currie
2ad5aa7aed
Unbind the array and element array buffers when done.
...
Not doing so wreaked havoc on my 2d rendering (what's he doing here, and
why's he messing with my redering? ;)
2012-01-02 10:08:56 +09:00
Bill Currie
d1419c30db
Make a start on alias model rendering.
...
The vertex and fragment shaders are written, and R_InitAlias is stubbed,
but that's it so far.
2012-01-01 23:58:12 +09:00
Bill Currie
f3884c659c
Finish alias skin loading and load vertex data into GL.
2012-01-01 23:55:27 +09:00
Bill Currie
f18cd65526
Implement the "cache" in Draw_CachePic.
2011-12-31 20:36:24 +09:00
Bill Currie
3eae8426e6
Implement in-game screenshots.
2011-12-31 17:24:20 +09:00
Bill Currie
d8dbfa9c24
Create WritePNGqfs so screenshots can be written as png.
2011-12-31 17:23:32 +09:00
Bill Currie
718595db45
Implement sprite rendering.
...
Sprite interpolation seems to work, even :) (maybe)
2011-12-31 14:39:33 +09:00
Bill Currie
091e16f9d2
Bring in GL's R_RecursiveWorldNode as R_VisiteWorldNodes.
...
No surface queuing is done, but entities get queued.
2011-12-31 14:33:20 +09:00
Bill Currie
ea2ae1436c
Fix some bugs in the new matrix functions/macros.
2011-12-31 13:20:31 +09:00
Bill Currie
55e53b796d
Make a start on getting sprites rendering.
...
The plan is to do interpolated sprites based on a discussion I had with
LordHavoc about them: blending between the two sprite frames. He didn't
mention it, but it looks like blending between the sprite frames' verts is
necessary too.
2011-12-30 21:11:59 +09:00
Bill Currie
16f84cd496
Hopefully get the 3d view and projection transforms setup.
2011-12-30 21:10:24 +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
35bf957d08
Add a 4x4 matrix type and some functions for it.
2011-12-30 20:11:53 +09:00
Bill Currie
edb05fdfce
Rename Vector3Scale and QuatCompScale.
...
They are now VectorCompMult and QuatCompMult.
2011-12-30 20:04:55 +09:00
Bill Currie
bcdcd7b36d
Implement sprint glsl loading.
...
That was... easy.
2011-12-30 09:36:57 +09:00