Commit graph

8487 commits

Author SHA1 Message Date
Bill Currie
df87cffe15 Start working on the new GL skin code. 2012-01-24 23:06:07 +09:00
Bill Currie
695b38e5e5 Fix a segfault when merging rects. 2012-01-24 19:56:59 +09:00
Bill Currie
d8d21b00f4 Fix some issues found found by valgrind.
Buffer underflow and though strcpy has always been safe there, change to
memmove. Had the added benefit of helping me create more test cases for
better coverage.
2012-01-24 19:54:21 +09:00
Bill Currie
6104db50e1 Fix a gl matrix stack overflow.
I'd missed a couple of places for glPopMatrix (worse, one was push!).
2012-01-24 12:10:37 +09:00
Bill Currie
1ef24e0404 Fix a gl matrix stack overflow.
I'd missed a couple of places for glPopMatrix (worse, one was push!).
2012-01-24 12:08:12 +09:00
Bill Currie
8448a8f332 Minimize the skin calls in nq. 2012-01-24 11:59:49 +09:00
Bill Currie
fb2568e681 Fix team colors in glsl for nq.
I forgot to ensure Skin_Init was called in nq. Doing things with texture 0
doesn't work too well.
2012-01-24 11:49:42 +09:00
Bill Currie
4d66fc175a Avoid processing skins every frame.
Processing skins every frame would slow things down unnecessarily, so call
the skin functions only when something changes.
2012-01-24 10:28:07 +09:00
Bill Currie
6df8867d69 Implement custom skins for glsl. 2012-01-24 10:27:05 +09:00
Bill Currie
d6683711f4 Clean up some redundant defines. 2012-01-24 09:37:46 +09:00
Bill Currie
19dc579a5a Fix custom player skins for the sw renderers. 2012-01-23 23:38:32 +09:00
Bill Currie
1f3eaaf2e0 Fix the importer for blender 2.61.
The use_image field of faces disappeared somewhere between 2.59 and 2.61.
2012-01-23 23:10:25 +09:00
Bill Currie
3b6e412bba Clean up skin.h a little. 2012-01-23 21:42:28 +09:00
Bill Currie
3dbb5724db Rename Skin_SetColormap_ to Skin_SetupSkin. 2012-01-23 21:40:12 +09:00
Bill Currie
08990ebb5a Make top/bottom color work for GLSL.
Works quite nicely (love those colormaps).
2012-01-23 19:24:12 +09:00
Bill Currie
9a4b065eaf Fix top/bottom colors for the SW renderers. 2012-01-23 17:33:19 +09:00
Bill Currie
6437a77021 Fix glsl qw alias model crc checking.
GLSL alias models don't use the cache, so don't try to access the data via
the cache.
2012-01-23 16:47:43 +09:00
Bill Currie
e3f76de898 Avoid a division by zero.
Doing a cache profile on an unused cache wasn't nice.
2012-01-23 16:46:52 +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
86a401b025 Fix the importer for blender 2.61.
The use_image field of faces disappeared somewhere between 2.59 and 2.61.
2012-01-22 19:23:02 +09:00
Bill Currie
61c127abc0 Make a start on skin support.
I had this lying around for a while since it was more important to get
other things working first.
2012-01-22 15:49:01 +09:00
Bill Currie
76cb60461d Tweak the size of point particles.
This looks fairly reasonable, but should probably be tweaked further to
base the point size on resolution.
2012-01-21 22:05:24 +09:00
Bill Currie
5080a6f37e Enable the point size shader variable.
This is a rather "evil" hack because GLES doesn't seem to need
GL_VERTEX_PROGRAM_POINT_SIZE, but GL does, and all my work is currently
done in GL rather than GLES. Point particles now work, but the sizes are
all wrong.
2012-01-21 21:54:36 +09:00
Bill Currie
68d956583d Draw ALL of the particles, not just 2/3 of them.
Using quads requires 4 elements, but triangles require 6. I'd gotten the
element array setup right, but I'd forgotten to tweak vacount when drawing
the particles.
2012-01-21 20:16:18 +09:00
Bill Currie
8345f07db2 Implement QF style particles.
Actually looks pretty good against the sw style world.
2012-01-21 19:51:18 +09:00
Bill Currie
4955caafe5 Make the dynamic textures more readily available.
I want to get QF style particles going in glsl (since id style is currently
stuck at one pixel), but I don't want multiple copies of the texture code.
2012-01-21 19:13:01 +09:00
Bill Currie
358bbc4439 Disable the sky spin effect.
It's cool, but not appropriate as a default. All that's needed is a way to
set (and optionally update) sky_velocity (map vars? qc?).
2012-01-21 17:18:29 +09:00
Bill Currie
3c3a9d0a33 Ensure the beam entitys' angles get set.
This fixes the incorrectly oriented beam entities.
2012-01-21 16:26:30 +09:00
Bill Currie
6fe557b407 Ensure the beam entitys' angles get set.
This fixes the incorrectly oriented beam entities.
2012-01-21 16:18:20 +09:00
Bill Currie
62c5070d8b Use the correct type for particle colors.
Sending byte data as floats doesn't work too well :P Fixes the colors of
the particles, but not the size :(.
2012-01-21 16:17:54 +09:00
Bill Currie
2cb2f230fd Print out the point size range.
I'm not sure if there's a bug in mesa, or if I'm doing something wrong, but
GL_POINTS doesn't seem to be working properly. I get the points, but
writing to gl_PointSize doesn't make a difference despite the size range
being 1-255.
2012-01-21 15:48:21 +09:00
Sander van Dijk
197481bdbb in_sdl.c: default to "have_focus" to "1". 2012-01-21 09:27:35 +09:00
Sander van Dijk
25ffe6bc3e cd_sdl.c: fix typo. 2012-01-21 09:27:30 +09:00
Sander van Dijk
8e6c3f7bf8 Make gl_rsurf.c compile without warnings with "gcc (GCC) 4.4.5 20101112 (Red Hat 4.4.5-2)". 2012-01-20 20:51:29 +09:00
Bill Currie
5e1a80e016 Implement particles as points.
Unfortunately, the maximum point size on Intel hardwar seems to be 1, so I
can't tell if the colors are right.

This is largely just a hacked version of GL's particle code.
2012-01-19 10:39:03 +09:00
Bill Currie
63893b6a2f Zap some magic numbers. 2012-01-19 10:36:10 +09:00
Sander van Dijk
d8432e78bb Fix a wrongly negated condition in snd_win.c:SNDDMA_UnblockSound(). 2012-01-18 21:39:17 +09:00
Bill Currie
470500f79d Fix an oopsie between pahdr and paliashdr.
I understand the reasons, but ooh, the sw renderer is ugly in places.
2012-01-17 21:00:19 +09:00
Bill Currie
42bb10a3d7 Clear out the lightmap scrap at each level change.
This allows the demo loop to run more than 4 times (12 demos). Once the
rest of the resource management is done, demos should run indefinitely.
2012-01-17 19:31:50 +09:00
Bill Currie
fc43e5a307 Allow clearing of a scrap.
This "frees" all rectangles and subpics allocated from a scrap. subpics
are owned by the scrap from which they are allocated.
2012-01-17 19:31:50 +09:00
Bill Currie
3669e3aa2e Make alias model caching optional.
For now, only the glsl loader disables caching, but it stores the frame
vertices in GL memory, so its hunk usage is relatively lower (and will be
lower still when I get skins sorted out).
2012-01-17 19:31:50 +09:00
Bill Currie
fb428f8067 Rename mod_flood.c to floodfill.c 2012-01-17 19:31:50 +09:00
Bill Currie
05bf637466 SDL sound patches from SVD.
Thanks to "Sander van Dijk" <a.h.vandijk@gmail.com>, we now have much
better SDL sound support.

Here's the promised cleaned up version of the "double buffer" approach
patch for "snd_sdl.c". I've taken some more time to re-read and test
it this time, and it seems to behave well. All memory that is used by
both the main thread and the SDL audio thread is prefixed with "shm_",
and locking is used to ensure that only one thread accesses it at the
same time.
2012-01-17 19:14:42 +09:00
Bill Currie
0abb8a7554 Merge the particle physics. 2012-01-15 20:14:36 +09:00
Bill Currie
ece78f7605 Clean out some useless functions.
D_Start/EndParticles in the sw renderers will likely never have any
content, so no point in calling or even having them.
2012-01-15 09:34:10 +09:00
Bill Currie
e7b01bb6b6 Put the transparent color back to 0,0,0,0 rgba.
Blended sprites were a tad ugly without that.
2012-01-14 22:20:23 +09:00
Bill Currie
c884ef5f80 Convert the colormap to a 2D palette.
This skips one level of indirection in the alias model and brush shaders.
Hopefully, this will improve performance on my eeepc.
2012-01-14 21:42:42 +09:00
Bill Currie
928dd92276 Use 0.0 instead of 0.5 for t for palette lookups.
I realized it's pretty silly using colormap + palette when I can just
combine the two into one and have a 2D palette. This is in preparation for
that.
2012-01-14 20:51:43 +09:00
Bill Currie
2425498479 Enable the view model. 2012-01-14 20:07:43 +09:00
Bill Currie
de022ae72d Rewrite GL_LoadQuakeMipTex to generate mips itself.
Relying on GL to generate mips for 8 bit textures doesn't produce nice
results. These aren't the greatest, either, but they're better.
2012-01-14 19:02:06 +09:00