Commit graph

1480 commits

Author SHA1 Message Date
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
08990ebb5a Make top/bottom color work for GLSL.
Works quite nicely (love those colormaps).
2012-01-23 19:24:12 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
a87a60a6fd Flush the text buffer before drawing conback or menus.
Ok, now really done until I notice something else (I forgot this one
momentarily).
2011-12-29 18:23:09 +09:00
Bill Currie
047b7bcc32 Implement Draw_TileClear.
With this, 2d seems to be finished. YAY.
2011-12-29 18:15:15 +09:00
Bill Currie
a1035aafe9 Implement Draw_TextBox. 2011-12-29 17:51:31 +09:00
Bill Currie
2b44a25c6b Flush console text after each screen function.
This on its own doesn't fix menus being overwritten with console text, but
it's an important step.
2011-12-29 11:26:14 +09:00
Bill Currie
9fec4d5be0 Implement Draw_Fill.
Almost there with 2d.
2011-12-29 11:25:27 +09:00
Bill Currie
9d0ed6b885 Fix the missing text.
Silly case and paste error cleared out my text vertex array prematurely.
2011-12-29 08:47:32 +09:00
Bill Currie
bece72e746 Use a quick hack to get colored crosshairs working. 2011-12-28 21:45:20 +09:00
Bill Currie
e69a583f1b Work around a bug in mesa.
Since I'm not specifying the api when creating my context, mesa is giving
me GL2. This is fair enough, but in GL2, vertex attribute 0 is the vertex
position. This too, is fair enough. The problem is, mesa is assigning 0 to
my vcolor attribute and thus I can't set it. The work around is simply to
swap the declaration order of vcolor and vertex (this really shouldn't work
eiter, I suspect).
2011-12-28 20:43:56 +09:00
Bill Currie
6a44978a0f Fix reading of GL_CURRENT_VERTEX_ATTRIB.
Turns out it returns a vec4. oops.
2011-12-28 20:41:26 +09:00
Bill Currie
8ee13ef8c2 Do some clipping in the draw routines.
After fixing Maraakate's crash, I thought it would be a good idea to put
the fixes into QF, too.
2011-12-28 19:20:18 +09:00
Bill Currie
4e7af5c3e0 Add a function to dump the info for all attribute arrays. 2011-12-28 14:27:59 +09:00
Bill Currie
411ab8f359 Be noisy when resolving uniforms and attributes. 2011-12-28 12:58:26 +09:00
Bill Currie
be9530afb6 Dump a lot of info about shader programs.
New developer bit: SYS_GLSL (2048).
2011-12-28 12:40:28 +09:00
Bill Currie
b657905c83 Bring in Despair's gl error checking from the gl renderer. 2011-12-28 09:05:36 +09:00
Bill Currie
151cc05882 Add support for vertex colors.
As I need to control the alpha, they're sent as rgba rather than quake
palette indices. Text works well. All other 2d stuff does not :(.
2011-12-28 09:04:26 +09:00
Bill Currie
b943b6d6e8 Implement crosshairs, mostly.
Colored crosshairs aren't supported yet (next).
2011-12-27 17:59:58 +09:00
Bill Currie
db8573b774 Make the cross-hair data sharable between renderers. 2011-12-26 21:43:15 +09:00
Bill Currie
705d07fa39 Implement most of the 2d rendering functions.
textbox, crosshair, tileclear, fill and fadescreen are the remaining
functions.

There's a problem with 2d icons being drawn over the text (instead of
under), but I'll leave that for later.
2011-12-26 20:33:40 +09:00
Bill Currie
e2a8de33cc First real texture support function for glsl. 2011-12-26 18:34:51 +09:00
Bill Currie
42034acc03 Organize the text program data.
Also, rename the charmap uniform in quake2d.frag as it's more generic than
that.
2011-12-26 18:00:55 +09:00
Bill Currie
2ccfbb0c1c Move the shader program code into vid_common_glsl.
Much more useful in the long run.
2011-12-26 17:17:29 +09:00
Bill Currie
5bed38dcd9 Rename quaketxt.frag to quake2d.frag.
It's actually fairly generic for 2d rendering (no lighting, palette lookup)
2011-12-26 17:11:31 +09:00
Bill Currie
f78db6c570 Clean up the generated shader files. 2011-12-26 16:39:02 +09:00
Bill Currie
d743c6c55f Make a clean break heading for GLES compatibility.
Add GLSL directory to QF and use it for all gsls based code (instead of
GL). defines.h, types.h and funcs.h are derived from gl2.h from khronos.

Text drawing now uses triangles instead of quads.
2011-12-26 16:08:55 +09:00
Bill Currie
e6c6de3a2a Fix the palette uploading.
Ooooops :P
2011-12-26 10:41:16 +09:00
Bill Currie
7bd5ab882c Get text rendering working.
It comes out as a funky green (that's not in the quake palette!!!), but
it's mostly readable.
2011-12-26 10:16:16 +09:00
Bill Currie
9f5eacd1fb Try to get text rendering.
Still a black screen :(
2011-12-26 08:12:05 +09:00
Bill Currie
c161a91d4a Split out and partially implement the screen code. 2011-12-26 08:09:47 +09:00
Bill Currie
1268830082 Split out the particle code. 2011-12-26 08:02:18 +09:00
Bill Currie
7d653f3676 Start work on outputting text.
The shaders now compile. No linking is done yet. Char quads are generated,
but not sent to the card.
2011-12-25 19:42:39 +09:00
Bill Currie
55a0ed49cd Build qw-client-glslx too.
I was asked about timedemo overkill (bigass1 currently gets 40kfps, haha),
so I had to add qw-client-glslx to the build.
2011-12-25 16:41:14 +09:00
Bill Currie
9df7370bcd Create some shaders for quake text.
Still nothing drawn, but this gets my shader scripts into C without me
having to look at ugly strings.
2011-12-25 15:53:12 +09:00
Bill Currie
b7c90fa02d Load the quake palete as a texture.
256x1 rgba.
2011-12-25 13:53:52 +09:00
Bill Currie
99c490ce52 Get glsl running as a null renderer.
This means that nq-glslx can get through demo1, demo2, demo3 and bigass1
without crashing. However, nothing is rendered, so unless you like black,
it's not very interesting.
2011-12-25 13:02:26 +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
6fe9557dae Put in the final pieces so nq-glslx can link.
Everything is still stubs. Trying to run nq-glslx results in a segfault :)
2011-12-23 12:52:55 +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
497461b4c2 Make a start on making a pure GLSL renderer.
For now, only nq-glslx will be built, but as there is no actual code, it
doesn't link. However, this gets the glsl stuff into the build system.
2011-12-23 12:19:13 +09:00
Bill Currie
858d95de58 Add a bunch more keys to the X11 clients.
Now, QF does something reasonable for every key on my keyboar for which X
gives us a keycode.
2011-12-19 16:37:48 +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
5cd1f6f5cf Fix a GL version check snafu.
Thanks to MH (on inside3d.com) for pointing this out to me.
2011-12-16 09:43:22 +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
f6ebb78140 More GL_Init_Common() cleanup.
Move the call to GL_Common_Init_Cvars() out of the block of check calls.
2011-12-15 17:09:01 +09:00
Bill Currie
51aaee5c3b Put that OpenGL error message to rest.
The error was quite valid: setting GL_TEXTURE_MAX_ANISOTROPY_EXT to 0 is
incorrect. The problem was caused by the call to glTexParameterf being
before the gl_anisotropy cvar was initialized. Thus, move all of the setup
code in GL_Init_Common() to after all the checks and, more importantly,
after the call to GL_Common_Init_Cvars().
2011-12-15 17:09:01 +09:00
Bill Currie
da552e33e7 Remove execinfo checks.
It seems we no longer need it (if we ever really did).
2011-12-13 21:25:41 +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
c3d41326b3 Do key dest changing properly.
key_demo wasn't so well thought out. This seems to be much better (and nq
is known to be working nicely).
2011-12-10 16:14:25 +09:00
Bill Currie
3ae17e4d37 Fix a silly omission.
Must not check for IMT_MOD bindings when using IMT_CONSOLE etc.
2011-12-10 14:49:56 +09:00
Bill Currie
81a16c925b Add IMT_DEMO for demo playback bindings.
This will allow special key bindings for use during demo playback without
interfering with normal keys.
2011-12-10 14:21:12 +09:00
Bill Currie
14d8e8669f Rework the legacy bind/unbind commands.
in_bind_imt is now gone. I guess mercury was right in that it was a poor
design. However, it was (and still is necessary) to support "bind" and
"unbind". Now, instead, they work only with the IMT_MOD table. IMT_MOD sits
below IMT_0 in the imt hierarchy. If the key is not bound in IMT_0+, then
IMT_MOD will be checked. This way, "bind" and "unbind" can never mess with
a user's more sophisticated binding setup.
2011-12-10 13:56:02 +09:00
Bill Currie
49451eea80 Use the new menu/console bingings.
Now, the console toggle will always work (so long as the console is
toggleable in the first place).
2011-12-10 13:24:32 +09:00
Bill Currie
d9d56760e1 Add cvars to control the keys for menus and console.
The backquote is not always usable for toggling the console, and the new
bind system doesn't automatically bind a key to both game and console imts
(by design). Thus create a cvar that allows the "always works" console
toggle to be specified in eg $fs_globalcfg. While I'm at it, do one for the
menus, too.
2011-12-10 13:24:32 +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
8e30d3098e Fix asm ilnking in mingw.
It seems that recent binutils/libtool doesn't like exporting symbols that
don't begin with a _.
2011-09-10 17:49:14 +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
290ac30efc Fix x11 gamma control.
Seems we lost a header include at one stage.
2011-08-11 16:08:20 +09:00
Bill Currie
e89532cb9f Fix a couple of missed view.h->clview.h changes. 2011-08-02 11:29:20 +09:00
Bill Currie
efa0105748 Rename some headers to fix doxygen warnings. 2011-07-23 15:58:45 +09:00
Antti Harri
358a844a42 Implement --version-info configure switch to override QuakeForge
library versioning. From Lasse Collin, thanks!
2011-07-09 01:23:36 +03: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
42ab0a7dbb Ensure consize is correct in the software renderers.
The software renderers force the console size to be the same as the window
size (no scaling), but they weren't telling the console of the resize.
oops. Fixes the crash when running the software renderers with default
sizes.
2011-06-14 17:54:53 +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
e65d1a7ccf Remove a redundant assignment. 2010-12-25 19:59:34 +09:00
Jeff Teunissen
bbc8154ec7 joystick fixes
Make /dev/input/js0 the default joy_device, and temporarily bump max
buttons to 18 (until I kill the maximums entirely)
2010-12-24 05:03:32 -05:00
Bill Currie
de04e1b602 Lots of win32 (mingw cross) build fixes.
HTTP (curl) support is missing, but everything else builds.
2010-12-23 11:40:16 +09:00
Bill Currie
23d3407622 Change a few defaults as suggested by bigfoot.
in_dga -> 0 (until X is fixed)
gl_multitexture -> 1 (why was this 0? not enough support back then?)
cl_usleep -> 1 (seems to be ok)
host_mem_size -> 40 (even 32 isn't enough these days)
rate -> 10000 (we're not in the modem era any more)
cl_mem_size -> 32 (16 is not enough, 32 sounds better than 24)
2010-12-16 11:34:39 +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
b1b1a02c6c Get entity allocation and freeing working correctly.
This fixes the missing static entities.
2010-12-04 23:37:58 +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
085b0f4448 Remove R_SplitEntityOnNode2
When R_AddEfrags is used (as is the case in nq), this function is
redundant. Brush models in qw are currently broken (invisible), but that's
just a matter of getting qw to use R_AddEfrags instead of R_NewEntity.

This removal should speed up the software renderers a little bit.
2010-12-02 08:31:48 +09:00
Bill Currie
9900aa3d02 Fix vid_fullscreen for modern X window managers.
We are now compliant with wm-spec 1.4, so fullscreen toggling should always
work.
2010-11-27 16:19:04 +09:00
Bill Currie
e53ff2a36d A bit of house keeping. 2010-11-27 15:10:34 +09:00
Bill Currie
dd87274027 DGA mouse tweaks.
o  Check the return value of XF86DGADirectVideo.
 o  Use input_grabbed instead of in_grab for checking whether to enable dga
    mouse and other grabbed actions.
2010-11-27 09:25:29 +09:00
Bill Currie
f31595781c Add and used SYS_VID for video/targets masked prints. 2010-11-27 08:48:00 +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
Bill Currie
232d2f7e18 Fix an undefined operation thanks to spirit of the domain quaddicted.com. 2010-11-16 17:13:22 +09:00
Bill Currie
6260130ae5 Fix borked autoconf of dga/vidmode headers. 2010-11-16 00:58:19 +09:00
Bill Currie
a51e888a1b Nuke MAX_OSPATH and clean up the mess. 2010-08-25 13:31:08 +09:00
Bill Currie
669771681a split up and modernize configure.ac
Most of the guts of configure.ac have been moved to config.d and are then
brought in by m4_include. This will make maintaining configure.ac much easier.

Also drop use of PROGRAM and VERSION, using PACKAGE_NAME, PACKAGE_VERSION, and
on occasion, PACKAGE_STRING instead, and clean out some old files we no longer
need.
2010-08-19 15:01:43 +09:00
Bill Currie
0bbb805b94 fix a case&paste error pointed out by grg 2010-08-08 01:58:17 +00:00
Bill Currie
0dfff8fd58 ignore stuff 2010-08-07 10:42:09 +00:00
Bill Currie
ace5e7a702 oops 2010-08-05 02:38:47 +00:00
Bill Currie
970dd0b872 avoid the old dga headers if we can (they're now deprecated) 2010-08-05 02:35:16 +00:00
Bill Currie
997102fea8 audit the usage of "only"
There are still a few iffy places (notably around certain prepositions), but
the relevant sentences are now much easier to read.
2010-01-13 06:42:26 +00:00
Bill Currie
dbe0c763d5 fix the placement of the "paused" icon 2010-01-13 06:35:33 +00:00
Bill Currie
cb5bd43d4c warning fix from shortcircuit 2009-12-24 07:33:24 +00:00
Bill Currie
bf04589510 conheight proved to be eaiser than expected (d'oh, don't know why I couldn't see the obvious) 2009-12-24 05:46:16 +00:00
Bill Currie
a5f0fbc821 Proper widescreen support. The GL renderer now respects the pixel aspect calculated by the vid init code. Also, a new cvar: vid_aspect. The format is width:height and the values may be any float greater than 0. The default is 4:3, but any units may be used. 2009-12-24 05:33:41 +00:00
Bill Currie
4b0320f341 glx, gly, glwidth and glheight are now gone too. also GL_BeginRendering 2009-12-23 08:20:29 +00:00
Bill Currie
ee0de1b4e1 got it right this time 2009-12-23 08:05:03 +00:00
Bill Currie
c2945605bc oops 2009-12-23 07:57:07 +00:00
Bill Currie
8ddfdf03b2 with the changes in size handling, viewport setup becomes much simpler 2009-12-23 07:53:05 +00:00
Bill Currie
f2004abecc nuke scr_width and scr_height 2009-12-23 07:00:42 +00:00
Bill Currie
a2fa2d425b fix viewsize interaction with the cleaned up screen size handling 2009-12-23 06:29:11 +00:00
Bill Currie
e0cfe795b0 fix a bogus range check. this could have caused an infinite loop 2009-12-23 06:28:11 +00:00
Bill Currie
97f54e22df fix the broken sdl/sdl32 hud 2009-12-23 02:08:49 +00:00
Bill Currie
018a0b3bb6 fix the missing crosshair 2009-12-23 01:26:14 +00:00
Bill Currie
28601c8ea4 more screen size cleanup 2009-12-22 13:12:03 +00:00
Bill Currie
5d15c70a0d progress in cleaning up the screen size mess 2009-12-22 06:02:53 +00:00
Bill Currie
52b2631341 sanitize con_width and con_height handling. con_height cvar was being ignored. 2009-12-21 12:36:12 +00:00
Bill Currie
b6a4fc1b58 fix the glaring error of the sw renderer's aspect ratio. still not quite right for non-4:3 screens, but it's better. 2009-12-21 10:10:45 +00:00
Bill Currie
236e89ed6b newest x11 seems to not define X_XF86VidModeGetGamma. thanks to witukind 2009-12-21 06:03:19 +00:00
Bill Currie
61366f081b fbdev patch from Philippe Troin 2009-12-20 05:41:08 +00:00
Bill Currie
4ff2cb88cf bigscreen patch from Philippe Troin 2009-12-20 05:34:41 +00:00
Bill Currie
b14fcccd8f get qf compiling with gcc 4.4 2009-12-19 10:54:23 +00:00
Bill Currie
0b1cc3d21f Support Japanese keyoards (yay, I can finally toggle the console :P) 2009-03-18 00:26:34 +00:00
Bill Currie
fe95805d86 various gcc 4.3 fixes 2008-07-19 05:40:57 +00:00
Bill Currie
e3b47c9c6d This should make stdint stuff work better in general (can't test properly due to my mingw setup being borked) 2007-11-25 04:44:53 +00:00
Bill Currie
2b81eaea6c console.h include cleanup 2007-11-06 12:40:38 +00:00
Bill Currie
6d6dc27592 make startup and shutdown a little quieter 2007-11-06 10:39:49 +00:00
Bill Currie
d66934942d nuke Con_Printf and Con_DPrintf and use Sys_* instead 2007-11-06 10:17:14 +00:00
Bill Currie
e38bf6dd98 fix a signed/unsigned comparison warning 2007-09-21 09:01:21 +00:00
Bill Currie
d1e2b6b7d2 make the raw particle creation functions available and use them for creating the location marker effect rather than WizSpikeEffect 2007-09-15 04:20:45 +00:00
Bill Currie
6884f97694 allow marcher.bsp to work (initially, anyway) 2007-05-23 10:45:33 +00:00
Bill Currie
0301cd6fa8 fix hud scaling 2007-05-13 04:21:37 +00:00
Bill Currie
b5809eaa4f this /should/ fix the scaling of high-res hud items 2007-05-13 01:29:29 +00:00
Bill Currie
93ee2e489b more vc2005 patches from phrosty 2007-04-11 22:03:36 +00:00
Bill Currie
58112a6407 fix a couple of missed VISIBLE tags 2007-03-24 12:28:47 +00:00
Bill Currie
02c41feabc make gamedir change a two phase operation so things can be done both before and after the cache is flushed. (still having problems with cached sounds, though) 2007-03-24 10:13:10 +00:00
Bill Currie
81a57bb3fa patch from phrosty for vc2005 support. includes fixes for a bunch of gcc-isms that crept in over the years. 2007-03-22 23:20:57 +00:00
Bill Currie
99c0954b47 the big dso visibility patch :). Sure, we have to have unique names for static builds, but with controlled visibitly we should get faster program loads (although this isn't C++, so it's not as bad) and complex plugins are cleaner. 2007-03-10 12:00:59 +00:00
Bill Currie
99e05d2188 warning cleanup patch from raorn 2007-01-06 21:31:03 +00:00
Bill Currie
5062930bad bit more cleanup and some documentation 2006-12-03 06:25:57 +00:00
Bill Currie
7bca4cf8af clean up the draw interface a bit 2006-12-02 10:07:08 +00:00
Ragnvald Maartmann-Moe IV
9390a195e1 Separate out particle physics from particle rendering. 2006-12-01 07:03:13 +00:00
Ragnvald Maartmann-Moe IV
42d51bc486 Remove SDLK_WORLD_*, as they are no longer supported. Add SDLK_UNDO. 2006-12-01 06:58:23 +00:00
Ragnvald Maartmann-Moe IV
630d4b8587 Fix black halo bugs in even the smallest particles. Same issue as smoke, same solution. 2006-10-18 07:57:10 +00:00
Bill Currie
215951bc79 yay for testers :) 2006-05-24 09:24:00 +00:00
Bill Currie
6b03d8413e don't compile GetGamme (Set/Restor)ScreenSaver at all when vidmode isn't available 2006-05-24 09:20:53 +00:00
Bill Currie
87cc09233c "long" audit. can't use long when we want 32 bits. May be a few more cases. 2005-10-23 13:19:21 +00:00
Brian Koropoff
82b389a720 Fixes -x11 target on x86-64. Shouldn't break anything on other supported architectures. 2005-09-03 03:31:02 +00:00
Bill Currie
3fb03fc2be hah, should have been using __attribute__((used)) all that time (rather
than __attribute__((unused))). fixes the missing console in -x11
2005-08-04 15:27:09 +00:00
Bill Currie
501180aaac gcc-4.0 fixes. even found some bugs :) (names /not/ mangled this time) 2005-06-08 06:35:48 +00:00
Bill Currie
616f094369 don't mangle the angle. no idea why it was there and it shouldn't normally
get there /anyway/
2005-04-27 08:07:09 +00:00
Bill Currie
63f9c77e11 d'oh 2005-03-06 08:25:30 +00:00
Bill Currie
1a1d461f0c "debounce" (Despair's term:) focus handling in X. Seems multiple focusout
events can arrive when switching workplaces, but only one focusin when
returning. Not good...
2005-03-06 08:22:15 +00:00
Ragnvald Maartmann-Moe IV
b209e8607e *grmbl* 2005-01-13 15:11:55 +00:00
Ragnvald Maartmann-Moe IV
b72a8755ca Move pr_keys.c to console, fixes missing Key_Progs_Init symbol for dynamic
builds with automake 1.9.
2005-01-13 15:10:42 +00:00
Ragnvald Maartmann-Moe IV
ea2ff1070b Whitespace, plus remove unused key_progs_init from keys.c 2005-01-13 14:44:57 +00:00
Bill Currie
23f71485d1 more tree recovering. This includes Despair's anisotropy support work. 2005-01-02 14:23:20 +00:00
Bill Currie
0bfac8dd88 win32 compile fixes
This is an imperfect revision of history.
2004-11-06 02:21:00 +00:00
Bill Currie
b95dce5deb unlimited efrags :)
This is an imperfect revision of history.
2004-11-02 07:42:00 +00:00
Bill Currie
ca46503607 add -Wsign-compare (default for -Wall only in C++) and fix up the warnings 2004-07-13 19:14:01 +00:00
Bill Currie
b36569eb9f grievre's patch to make entity minlight and fullbright fields work properly 2004-07-11 00:37:48 +00:00
Bill Currie
cefc6df98c grievre's patch to trade (minor) frame rate for frame (non-)latency 2004-07-10 02:32:30 +00:00
Bill Currie
f2d7d97319 Grievre's fix for his weirdness when toggling fullscren. Thanks Grievre 2004-05-10 01:17:55 +00:00
Bill Currie
8a237169c3 patches to allow for multiple view ports 2004-05-07 03:54:35 +00:00
Bill Currie
4f71b39827 it seems glGetProcAddressARB is obsolete so check for glGetProcAddress first 2004-05-06 07:13:18 +00: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
57ffcae9fe remove some dead code 2004-05-03 04:52:00 +00:00
Bill Currie
fc4211c257 the rest of Grievre's lighting tweaks 2004-05-02 21:21:00 +00:00
Bill Currie
adf50949e2 slightly modified version of Grievre's fix for black models on an unlit map 2004-05-02 20:40:09 +00:00
Ragnvald Maartmann-Moe IV
f0d9008fa4 Swap normal/vertex order to match order they are accessed in during render.
Optimization from Grievre.
Also fix a minimum light clamping to actually be applied.
2004-04-28 20:27:11 +00:00
Bill Currie
1c0735d0c9 * taniwha mutters about end-runs (sorry, Grievre) 2004-04-28 04:07:50 +00:00
Bill Currie
785307fd9a Grievre's lighting tweeks 2004-04-27 22:18:23 +00:00
Bill Currie
dd989c18ff fix a braino 2004-04-16 04:21:16 +00:00
Bill Currie
1f9d75a7c7 add r_norefresh support to sw and sw32 and rename the console side of the
cvar to get around the evil in customtf
2004-04-16 03:24:10 +00:00
Bill Currie
b62f3c98d9 full path reporting when writing screenshots 2004-04-14 03:31:08 +00:00
Bill Currie
45c304ffc0 add a -novideo option to allow for headless operation 2004-04-13 02:13:35 +00:00
Bill Currie
969cf7ac66 make sure the mouse input updates properly when going from fullscreen to
windowed
2004-03-22 03:23:59 +00:00
Bill Currie
23e8ef1dd8 do the viewport forcing in configure_notify. fixes Grievre's uncentered
viewport
2004-03-22 02:16:41 +00:00
Bill Currie
4b33ba547a don't know why the expose event was being waited for. doesn't seem to be
needed (now, anyway) when going windowed and causes lockup when starting
fullscreen
2004-03-21 20:21:57 +00:00
Bill Currie
7feaa3d631 Want for the mouse to move when going fullscreen before moving the
viewport. This should fix the uncetnered viewport when going fullscreen.
Also discard mouse events caused by fullscreen toggling to avoid chaning
orientation.
2004-03-21 05:21:27 +00:00
Bill Currie
0b808b0c49 so that's why you would want to use XMaskEvent... don't lose the FocusIn
and EnterNotify events when starting fullscreened
2004-03-21 00:34:24 +00:00
Bill Currie
60ca9854aa dead code removal 2004-03-19 21:12:12 +00:00
Bill Currie
78fd6d2513 minor cleanup of window position handling. hopefully no more window off
screen issues (wait for ConfigureNotify instead of MapNotify on window
creation (ConfigureNotify gives us our window position)).
2004-03-19 20:24:26 +00:00
Bill Currie
9099baeb6d minor cleanups preparing for an overhaul 2004-03-18 06:05:59 +00:00
Bill Currie
4f79d8ce0a hopefully more correct surface marking for dlights 2004-03-17 04:53:10 +00:00
Bill Currie
6c1c39c4d2 don't fudge the maxdist by 0.75. no clue why that was done, but it was the
cause of the bogusly lit surfaces (not sure why, though. imaginary numbers,
maybe?). timedemo runs are a little more variable :/
2004-03-17 04:47:55 +00:00
Bill Currie
e24cbd75e0 M_BUTTON6 and M_BUTTON7. nuff said :) 2004-03-16 04:12:28 +00:00
Ragnvald Maartmann-Moe IV
509cd09491 Make nearer cloud layer speed more sane for skydomes. 2004-03-15 21:45:45 +00:00
Ragnvald Maartmann-Moe IV
6c6047ccb8 Fix from Grievre. 2004-03-15 21:44:56 +00:00
Ragnvald Maartmann-Moe IV
29502c8f5a Lots of optimizations, particularly for GL state changes, and tweak lighting a
bit more.

Also a cleanup from Grievre: Use VectorIsZero in two places in gl_mod_alias.c.
2004-03-15 21:32:19 +00:00
Ragnvald Maartmann-Moe IV
1fe06c326b More of my experimental GL lighting tweaks. 2004-03-11 01:03:51 +00:00
Ragnvald Maartmann-Moe IV
9cd16b8dfd Grievre's lighting patch, plus some of my own changes.
My changes:
Emit normals if truform is enabled.
Attempt to avoid 0,0,0 normals (makes lighting & tesselation unhappy).
Fix some (ancient) apparent bugs in GetAliasFrameVerts16().
Clamp minlight, instead of adding it.
Apply colormod as glColor, rather than adding it to emission, to prevent QSG2
 issues with fullbrights.
Rearrange init code, and don't go quite as wild with responsiveness to lights.

Material & lightmode settings will need tweaking & testing to work well on all
 cards. Feedback needed there.
2004-03-10 08:14:38 +00:00
Chris Ison
68a1a50f1f fix for gl_overbright init order bug, maybe Despair can come up with a better way 2004-03-08 18:42:42 +00:00
Ragnvald Maartmann-Moe IV
b7df0b5278 Remove gl_doublebright, remove fractional overbrights, clean up init a bit,
uglify init a bit. Stuff for taniwha to look at. Nothing to see here, move
along.
2004-03-07 23:51:29 +00:00
Bill Currie
cd1fc18ea4 gl_lightmap_subimage 2 now works, but only if using r_lightmap_components 4
(with dri, anyway, ymmv).
2004-03-05 21:53:34 +00:00
Bill Currie
37024a4419 final (?) cleanup of center printing. turns out there's no reason to keep
it in the renderer and every reason to pull it out (ok, some might
disagree:)
2004-03-02 03:55:18 +00:00
Bill Currie
39fc0fe721 more centerprint cleanup. 2004-03-02 00:58:13 +00:00
Bill Currie
2955fac550 first step of centerprint/finale cleanup. fixes the misplaced text for
end-of-episode text
2004-03-01 23:47:39 +00:00
Ragnvald Maartmann-Moe IV
7b5535cb8f Less surprising default. 2004-02-29 05:32:23 +00:00
Ragnvald Maartmann-Moe IV
58d67f9a75 Lighting init fixes. 2004-02-29 04:50:01 +00:00
Ragnvald Maartmann-Moe IV
fde6e5bf61 Reduce ifs a bit, clean up init a bit. Minor problem with gl_doublebright. LIH. 2004-02-29 01:49:41 +00:00
Ragnvald Maartmann-Moe IV
e29e469646 Multitexture state fix. Harmless so far, but testing carefully helps us avoid
state leak horrors.
2004-02-27 21:42:52 +00:00
Ragnvald Maartmann-Moe IV
8c6cc34f83 Fix overzealous optimization which did interesting things to lightmapping when
not using multitexture.
2004-02-27 21:36:41 +00:00
Ragnvald Maartmann-Moe IV
28fda91e8c If (!var) checking for a cvar setup. Can't believe that one slipped by for so
long... Also set a few globals static.
2004-02-27 20:40:26 +00:00
Ragnvald Maartmann-Moe IV
cdb02edc88 Make whitespace consistent. yay. 2004-02-27 15:49:15 +00:00
Ragnvald Maartmann-Moe IV
6059c7b4df ...space 2004-02-27 08:51:26 +00:00
Ragnvald Maartmann-Moe IV
997f5feabe Tiny bit of loop unrolling. 2004-02-27 08:29:56 +00:00
Bill Currie
3855a8e40c seem to have the itterative world rendering working now (fingers crossed:) 2004-02-26 22:53:30 +00:00
Bill Currie
228c5a0ecf don't bother binding unmodified lightmaps 2004-02-26 00:33:24 +00:00
Ragnvald Maartmann-Moe IV
beeb1822b3 Fix multipass skydome rendering. Not sure layer speeds are right, but at least
they move at different speeds like they are supposed to.
2004-02-24 20:53:09 +00:00
Ragnvald Maartmann-Moe IV
44c89c1904 Optimize fullbright testing for brushes, assorted other cleanups, test for
functions built into current GL drivers, as well as the old extensions, and
add incorrectly rendering BGRA support.
Whee!
2004-02-24 20:50:55 +00:00
Bill Currie
f9b95cee92 some micro-optimisations 2004-02-23 07:17:41 +00:00
Bill Currie
680c246e22 the inline went wandering by mistake. gives a tiny (< 0.5%) gain, but a
gain none the less
2004-02-23 04:46:55 +00:00
Ragnvald Maartmann-Moe IV
496025473c Remove no-longer needed parameters from function calls. 2004-02-23 04:25:53 +00:00
Ragnvald Maartmann-Moe IV
872498a1f0 Reorder a lot of code, removing tons of ifs. multitexture paths are a bit more
sane now. Also optimize QSG2 color handling, and fix some QSG2 bugs. Not that
anyone cares, nobody uses it anyways.
Should be faster, but isn't here. *grmbl*
2004-02-22 06:00:15 +00:00
Chris Ison
e9d57e0401 Grievres' non-mtex FB being brighter than mtex FB fix. Note: it breaks non-RGBA replacement textures 2004-02-21 10:33:43 +00:00
Chris Ison
ca6112767c Grievres' water HOM and mtex FB only rendering FB texture fix 2004-02-21 09:04:52 +00:00
Ragnvald Maartmann-Moe IV
5157f668ad Fix a bunch of state leaks that made multitextured fullbrights smear the world.
Now just have one (known) issue with bmodels with fullbright textures not
rendering their base texture. Floating fullbrights are nifty!

Also a number of optimizations, which need wider performance testing.
2004-02-21 05:36:19 +00:00
Bill Currie
551c7ee89a Grievre's patch to makes R_MarkLights and R_RecursiveMarkLights use the
same function for actual marking.. which reduces code redundancy and fixes
the fact that world submodels
2004-02-21 04:23:00 +00:00
Ragnvald Maartmann-Moe IV
1cd0ba3f8f Pale void. 2004-02-20 22:50:47 +00:00
Ragnvald Maartmann-Moe IV
79689baa83 Grievre's crash fix. 2004-02-15 19:56:28 +00:00
Ragnvald Maartmann-Moe IV
e43129316b Slightly reorder cases for legibility. (decreasing order instead of random). 2004-02-15 19:55:59 +00:00
Bill Currie
2d2173dc4e make R_RecursiveWorldNode non-recursive (needs a new name, now :). 0.4%
speedup in null-renderer gl: unknown for sw and sw32 (could be slightly
slower, left recursive version in but #if 0ed out jic)
2004-02-15 03:46:55 +00:00
Chris Ison
6642686e33 removal of legacy MGL block_drawing variable. Fixed window restore bug that prevented the screen from being updated. 2004-02-15 03:40:50 +00:00
Ragnvald Maartmann-Moe IV
fef9b30bd7 QF, now complete with underbrights, thanks to Grievre.
Play with gl_overbright and gl_doublebright. That's an order.
2004-02-15 00:02:04 +00:00
Ragnvald Maartmann-Moe IV
0dae958a5a Grievre's fix for texture state leak. 2004-02-14 19:17:51 +00:00
Timothy C. McGrath
b5b61d056f Grievre passed a one line patch to me which according to his description:
"Fixes a bug in dynamic lights (lightstyles weren't being rendered correctly
due to bad assumptions about dlightbits)"

It compiles fine, and seems to work, so, here it is.

Hikaru
2004-02-14 08:36:08 +00:00
Bill Currie
64c156653f should fix the seg on ^C early in the startup 2004-02-14 07:53:49 +00:00
Bill Currie
d35f027757 undo my incorrect commit 2004-02-14 07:39:43 +00:00
Bill Currie
0e8ba7cc12 oops, committed the wrong file 2004-02-14 07:38:01 +00:00
Bill Currie
2cdf12cd50 if a leaf isn't in the frustum, don't bother lighting it 2004-02-14 07:32:26 +00:00
Bill Currie
85a268c62f Grievre's lightmap/fullbright multitexture patch (fbs not tested due to
lack of drivers supporting 3 tmus)
2004-02-14 05:10:29 +00:00