Bill Currie
8fd5be0ee0
Fix a pile of sizeof goofs.
...
While scan-build wasn't what I was looking for, it has proven useful
anyway: many of the sizeof errors were just noise, but a few were actual
bugs (allocating too much or too little memory).
2018-09-07 20:00:57 +09:00
Bill Currie
4f58429137
Fix an unhealthy pile of gcc 8 warnings.
...
While some of the warnings were merely annoying, some where actual bugs or
unearthed bugs in related code.
2018-08-20 00:05:00 +09:00
Johnny
d1a8c1b277
Color swizzle & software lighting fix
2014-02-03 16:20:54 +09:00
Bill Currie
d80342e0a8
Fix some compile errors from Johnny's patch.
...
Turns out he has to compile without -Werror.
2014-02-02 16:42:08 +09:00
Johnny
850382eed4
Fixes crashes when sw32_r_pixbytes is set to 2 or 4
2014-02-02 16:22:53 +09:00
Bill Currie
9d71d9bb7a
Remove maxwarpwidth and maxwarpheight.
...
Only the sw32 renderer even tried to use them, and they didn't get set
properly. This fixes JohnnyonFlame's waterwarp issue.
2014-02-02 14:41:58 +09:00
Bill Currie
99678a571b
Remove *.slc on make clean.
2014-01-28 16:26:24 +09:00
Bill Currie
3efb0c538f
Separate file search from loading.
...
QFS_LoadFile (and its wrappers) now take a file handle rather than a
path. This will make vpath usage a little cleaner to implement.
2014-01-28 16:22:05 +09:00
Bill Currie
4d59282641
Find the remaining vertex attribute order issues.
...
I hope. I do need to figure out why I made sprite blend an attribute
rather than a uniform.
2014-01-28 16:22:04 +09:00
Bill Currie
a5db0b1a65
Remove the now unnecessary GLSL_CompileShaderS().
...
Now that the transition to using shader effects is comlete, there's no
need for the wrapper.
2014-01-28 16:22:04 +09:00
Bill Currie
57d2198140
Use the new shader system for iqm models.
2014-01-28 16:22:04 +09:00
Bill Currie
385175ca65
Use the new shader system for 2d drawing.
2014-01-28 16:22:04 +09:00
Bill Currie
c89e612cd4
Remove redundant fog and palette shader code.
2014-01-28 16:22:04 +09:00
Bill Currie
50bb40be29
Use the new shader system for sprites.
2014-01-28 16:22:04 +09:00
Bill Currie
68bd7e643d
Remove the long dead text vertex shader.
2014-01-28 16:22:04 +09:00
Bill Currie
1d67f8f0c3
Use the new shader system for textured particles.
2014-01-28 16:22:04 +09:00
Bill Currie
1a7b532927
Use the new shader system for point particles.
2014-01-28 16:22:04 +09:00
Bill Currie
3af6a640fe
Missed the old turb frag shader.
2014-01-28 16:22:04 +09:00
Bill Currie
a419fb2c92
Ensure the vertex coord attribute is attribute 0.
...
It seems mesa still has the bug where non-array attributes don't work
when set as attribute 0, and that the allocation order changed sometime
since I last tested with mesa. This fixes the black world and flickering
alias models on my eeepc.
2014-01-28 16:22:04 +09:00
Bill Currie
042d6e5728
Remove a couple of stale files.
...
Missed these in the bsp related commit.
2014-01-28 16:22:04 +09:00
Bill Currie
26fc0b74e6
Fix bsp water surfaces.
...
Everything seems to be working for the bsp renderer.
2014-01-28 16:22:04 +09:00
Bill Currie
f43592589d
Use the new shader system in the bsp renderer.
...
It mostly works. Skybox is untested, and water surfaces are broken.
2014-01-28 16:22:04 +09:00
Bill Currie
b269338947
Start using the new shader system.
...
So far, alias model rendering is the only victim, but things are working,
even if only color map lookup and fog blending are broken out at this
stage.
I expect the effect naming scheme will go through some changes until I'm
happy with it.
2014-01-28 16:22:04 +09:00
Bill Currie
323fbe1927
Fix an allocation oopsie.
...
I must have been tired when I wrote that line.
2014-01-28 16:22:04 +09:00
Bill Currie
550f1ae788
Fix some bitrot.
...
Just updating for the changes to the ALLOC/FREE macros.
2014-01-28 16:22:03 +09:00
Bill Currie
96c40cb9a1
Add basic support for shader "effects".
...
Again, based on The OpenGL Shader Wrangler. The wrangling part is not used
yet, but the shader compiler has been modified to take the built up shader.
Just to keep things compiling, a wrapper has been temporarily created.
2014-01-28 16:22:03 +09:00
Bill Currie
f5501fbf24
Fix a pile of automake deprecation warnings.
...
s/INCLUDES/AM_CPPFLAGS/g
I <3 sed :)
2013-11-24 13:11:50 +09:00
Bill Currie
6288684fa2
Fix more gcc 4.8 errors.
...
More actual bugs found, too.
2013-09-27 23:09:37 +09:00
Bill Currie
88692f92d9
Fix the calls for Draw_Init in the gl renderers.
...
While namehack.h took care of the symbol mangling, I do prefer the calls to
be correct as it reduces confusion.
2013-05-09 17:58:33 +09:00
Bill Currie
6d7f747577
Add timerefresh to the glsl renderer.
...
Also, tweak the formatting of the output for the other renderers (%g
instead of %f) and make gl's timerefresh output unconditional.
2013-02-18 13:57:45 +09:00
Bill Currie
bc12567572
Clean out a leftover from the 128 dlight change.
...
I'd missed a set of bit->lightnum conversions that resulting in lightnum
becoming much greater than 128 and thus trashing memory when the surface
was marked.
2013-01-31 22:39:23 +09:00
Bill Currie
e27d7cbd2d
Handle alloca "correctly".
...
Use AC_FUNC_ALLOCA and the #ifdef mess suggested by the autoconf docs
(hidden in qfalloca.h).
2013-01-22 21:02:50 +09:00
Bill Currie
f1aefc969d
Fix some 64-bit mingw compile issues.
...
Just one more issue to fix (alloca), but with a hack, QF compiles (no clue
yet if it works: wine doesn't seem to be an option at this stage)
2013-01-22 21:02:49 +09:00
Bill Currie
cb45d248c4
Use the Mersenne Twister for particles.
...
The seed is currently 0xdeadbeef, but I intend on fixing that soon. Now the
particle velocities and origins use fully independent bits (though a big
chunk is wasted right now).
2013-01-21 20:06:54 +09:00
Bill Currie
3de67589a3
Fix random particle origin/velocity z component.
...
This is a quick fix until I get a random number generator into QF.
Mingw's RAND_MAX is only 0x7fff and so the (((rnd >> 10) & 63) - 31.5) / 63.0
used for the z component of origin and velocity would never go positive.
For now, change the 10 to 9 (reusing another bit from Y). I plan on
implementing a full 32-bit PRNG in QF so we always have a reliable
generator.
2013-01-21 14:53:13 +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
a05e7253e4
Force a full update when the fade screen is drawn.
2013-01-13 20:34:39 +09:00
Bill Currie
0c81364da8
Fix scr_copyeverything in gl and glsl.
...
Now the gl renderers unconditionally set it to 1. This is required because
the screen is cleared every frame.
2013-01-13 17:23:00 +09:00
Bill Currie
4a95f89760
Correct the handling of r_viewsize and lineadj.
...
r_viewsize is meant to be clamped to 100, but not limit linadj.
2013-01-13 16:53:22 +09:00
Bill Currie
86b95629cf
Complete the move of some vars into vid_render_data.
...
scr_fullupdate and scr_copyeverything were missed. Possibly others too, but
this is enough for the moment.
2013-01-13 16:46:41 +09:00
Bill Currie
9c812f39ce
Apply some wart remover.
...
hungarian notation... *twitch*
2013-01-13 16:07:11 +09:00
Bill Currie
82a6861233
Move the call to VID_Update out of the if blocks.
...
This makes it obvious that VID_Update is unconditionally called when
SCR_UpdateScreen is called.
2013-01-13 14:43:19 +09:00
Bill Currie
5bbb76194f
Use stdlib.h instead of alloca.h.
...
While the manpage does say alloca.h, that's not very portable, it seems.
stdlib.h seems to be better (at least for mingw, anyway)
2013-01-10 21:54:37 +09:00
Bill Currie
751417ffb2
Rename R_RecursiveWorldNode to R_VisitWorldNodes.
...
Finally, the name reflects its actual purpose.
2013-01-07 19:59:49 +09:00
Bill Currie
a852eeb711
Remove the recursive versions of R_RecursiveWorldNode.
...
They seem to not be needed any more.
2013-01-07 19:57:21 +09:00
Bill Currie
9758302023
Fix sw and sw32's R_RecursiveWorldNode node stack.
...
I guess I had forgotten to make the node stack dynamically allocated for
these renderers. Now ITS works in all four renderers.
2013-01-07 19:51:36 +09:00
Bill Currie
43702580f5
Clear the texture element chain after drawing.
...
It was properly cleared after drawing water chains and sky chains, but I
had missed normal surfaces. It took the use of the same texture for both
normal surfaces and water surfaces to trigger the bug. Thanks go to Simon
'Sock' O'Callaghan and his In The Shadows mod.
2013-01-06 20:05:59 +09:00
Bill Currie
6eb6b6c0ba
Change pointer_t to unsigned and clean up the mess.
...
It doesn't make sense to have negative pointers. The size of the commit is
from enabling gcc's -Wtype-limits warning and cleaning up that mess too.
2012-12-21 21:53:13 +09:00
Bill Currie
cb259823af
Scale the glsl crosshairs to match gl.
2012-12-12 21:37:55 +09:00
Bill Currie
f71affdfba
Use exact texture coords for 2d pics in glsl.
...
Moving the texture coordinates in 1/4 pixel made a mess of the 2d pics
(very noticable on the round crosshair).
2012-12-12 21:34:37 +09:00