Commit Graph

1503 Commits

Author SHA1 Message Date
Bill Currie 9f253454e4 Implement and test Mat4Inverse(). 2012-05-15 21:08:44 +09:00
Bill Currie fa6270322f Make Mat4Decompose a little more intuitive.
Params are now in application order (good thing not much code uses it yet).
2012-05-15 21:08:44 +09:00
Bill Currie 1473dbd526 Add a comment about the evaluation order in VectorShear. 2012-05-15 21:08:44 +09:00
Bill Currie de131c18ad Add VectorShear and really test Mat4Decompose.
And the tests really exercised VectorShear (first attempt had things
messed up when more than one shear value was non-zero). Also,
Mat4Decompose wasn't orthogonalizing the z axis row. Oops. Anyway,
Mat4Decompose is now known to work well, and the usage of its output is
understood :)
2012-05-15 21:08:44 +09:00
Bill Currie 82abd5e426 More matrix tests. 2012-05-15 21:08:44 +09:00
Bill Currie 730f9668bd Add support for mat4 * vec3 2012-05-15 21:08:44 +09:00
Bill Currie 50af8a562e Add tests for matrix decomposition and fix the bugs. 2012-05-15 21:08:44 +09:00
Bill Currie 724427a976 Add component-wise vector and quaternion division.
Mostly for non-uniform scaling.
2012-05-15 21:08:44 +09:00
Bill Currie 215d2e9747 Add a function to decompose a matrix.
The function gives rotation(quaternion), scale, shear, and translation (all
three as vectors), shear is (XY, XZ, YZ).
2012-05-15 21:08:44 +09:00
Bill Currie 1be9384f10 Load the iqm vertex and triangle data.
Still have the meshes, joints and animations to go.
2012-05-15 21:08:43 +09:00
Bill Currie 890223ef8e Correct the definition of DualQuatNorm.
I'd gotten the norm and magnitude mixed up (partly because the document I
was following got the names mixed up), and then munged the formulas
together.
2012-05-15 21:08:43 +09:00
Bill Currie f874aeb941 Add support for duals and dual quaternions.
Not everything is unit-tested, but the currently important stuff is.
2012-05-15 21:08:43 +09:00
Bill Currie 26a878da48 Stub out the iqm loader. 2012-05-15 21:08:43 +09:00
Bill Currie f9a384ffd4 Make simple gravity acceleration framerate independent.
Now it doesn't matter if you get 22 fps or 72, you jump the same height,
which actually happens to be slightly higher than the previous 72fps jump.
Effectively, you jump the height you would if you got infinite fps ;)
2012-04-28 14:54:58 +09:00
Bill Currie 8791b35e55 Add support for half floats.
iqm and OpenGL use them, so they might come in handy. The tests use values
from wikipedia and a couple extra.
2012-04-26 20:55:11 +09:00
Bill Currie 1a0ccf6a92 Add vec = quat * vec to the progs engine. 2012-04-26 11:58:20 +09:00
Bill Currie efaef89c5f Add a shortcut function for quaterion/vector multiplication.
I got the idea from blender when I discovered by accident that quat * vect
produces the same result as quat * qvect * quat* and looked up the code to
check what was going on. While matrix/vector multiplication still beats the
pants off quaternion/vector multiplication, QuatMultVec is a slight
optimization over quat * qvect * quat* (17+,24* vs 24+,32*, plus no need to
to generate quat*).
2012-04-26 09:48:08 +09:00
Bill Currie 866c56c236 Do not try to lerp entities when their model changes.
This avoids sending invalid pose data to the renderer. The symptom was a
vertex array offset higher than the vertex array size. Discovered by calim
of nouveau while he was debugging a driver problem found by QF. Many
thanks.
2012-04-25 10:09:23 +09:00
Bill Currie 87e56e0655 Fix some doxygen issues. 2012-04-22 22:20:45 +09:00
Bill Currie bc1b483525 Nuke the rcsid stuff.
It's pretty useless in git.
2012-04-22 10:56:32 +09:00
Bill Currie 7fc700b802 Allow alias textures up to 1024x1024.
Blender's default texture size is 1024x1024, and there doesn't seem to be
any reason not to support it.
2012-04-15 14:13:05 +09:00
Bill Currie 633f70b2f1 Remove a functionally dead symbol.
The only purpose clearnotify seemed to be serving was to stop the console
plugin from loading :P
2012-04-12 17:05:42 +09:00
Bill Currie 7fc99f9c60 Fix gl and glsl support in sdl. 2012-04-12 16:47:37 +09:00
Bill Currie 8401704c4e Connect up palette setting for gl and glsl.
The GL plugin now seems to work. GLSL still segs :(
2012-04-12 13:57:05 +09:00
Bill Currie 525dbcc13e Ensure code paths stay within the one renderer.
The gl renderer calling sw functions is bad news. Still all black, but I
think that's because palette setting is disabled.
2012-04-11 22:45:23 +09:00
Bill Currie 898bfa5e5f Split up the vid plugin init sequence.
This gets gl so it no longer segs. However, the screen remains black
(expect for cshifts).
2012-04-11 16:44:38 +09:00
Bill Currie d62772e9cc Separate render module loading from initialization.
This allows the vid module to load the render module and access render
specific functions before the renderer initializes, which happens to need
an initialized vid module...
2012-04-11 14:58:56 +09:00
Bill Currie 6ea4e6617a Connect up viddef properly.
Or mostly so, anyway. sw32 is actually putting stuff on the screen.
2012-04-11 14:58:55 +09:00
Bill Currie 4d9c3408a1 Start putting the pieces back together.
The renderer now gets initialized and things sort of work (qw-client will
idle, though nothing is displayed). However, as the viddef stuff is broken,
it segs on trying to run the overkill demo.
2012-04-11 14:58:55 +09:00
Bill Currie 1d864521e9 Fix the sprite model loader for plugins. 2012-04-11 14:58:55 +09:00
Bill Currie cbdbfdd12f Fix the alias model loader for plugins. 2012-04-11 14:58:55 +09:00
Bill Currie 52e518bb1b Fix skin functions for plugins. 2012-04-11 14:58:55 +09:00
Bill Currie a093e6af97 Move palette setting into viddef_t. 2012-04-11 14:58:55 +09:00
Bill Currie e08d5ccb41 Move the gl util functions into viddef_t.
Static plugins almost link now, just two more symbols to sort out.
2012-04-11 14:58:55 +09:00
Bill Currie 7ed33f6345 Hide D_FlushCaches.
There'd been a way to do so all along :/ There might be some issues with
this, but those will be easy to fix :)
2012-04-11 14:58:55 +09:00
Bill Currie 7865f6afe1 Rename sw's R_Init to sw_R_Init.
For now, the only symbol I'll bother messing with in the sw renderer.
2012-04-11 14:58:54 +09:00
Bill Currie 1dd1aec48f Make libgl_handle static.
This will make life interesting for getting the final stages working, but
it helps for now.
2012-04-11 14:58:54 +09:00
Bill Currie 65bd29353c Make a start on putting the pieces together.
Still many undefined and multiply defined symbols, but there seems to be a
light in this darkness. I just hope it's not an oncoming train :)
2012-04-11 14:58:54 +09:00
Bill Currie d445b4ef88 Rename the glsl qfgl functions to qfegl.
Keep them separate from the gl renderer :)
2012-04-11 14:58:54 +09:00
Bill Currie 36504547a8 Rename the public symbols for gl, glsl and sw32.
Evil hack, but it does the job.
2012-04-11 14:58:54 +09:00
Bill Currie 8de5c9ae3f Do a final cleanup before doing the big rename. 2012-04-11 14:58:54 +09:00
Bill Currie f7007825e4 Run the vacuum cleaner over sw32's global variables.
This seems to be everything that can be made static.
2012-04-11 14:58:54 +09:00
Bill Currie e991c1fed3 Make a bit of progress cleaning up vid for plugins. 2012-04-11 14:58:54 +09:00
Bill Currie 96b80433d8 Make some progress in getting static plugins to link.
Still many redefined symbols (and I expect more to come), and many
undefined symbols too.
2012-04-11 14:58:54 +09:00
Bill Currie 5f5305d61d Map vr_data/funcs to vid_render_data/funcs. 2012-04-11 14:58:54 +09:00
Bill Currie ad61c7a30c Start working on creating the render plugins.
Things blow up quite nicely. :)
2012-04-11 14:58:53 +09:00
Bill Currie 8530959752 Link the model libs to the render plugins. 2012-04-11 14:58:53 +09:00
Bill Currie 8e91fb7bc1 Get the basics linking.
Still, nothing will work: no plugins are loaded and they're all broken
anyway.

glx, sgl, glslx etc are going away, just the basics will be built: fbdev
(probably go away eventually), sdl, x11 and hopefully someday win. That's
actually the only reason anything links.
2012-04-11 14:58:53 +09:00
Bill Currie a4c280f2b2 Take the first step towards render plugins.
No clients link. Even if they did, nothing would work.
2012-04-11 14:58:53 +09:00
Bill Currie 82679066cc Run a vacuum cleaner over the diffs between x11 and glx init.
X11 and GLX init are nowhere near as scary as I thought they were, once
they've been tidied up.
2012-02-18 21:33:54 +09:00
Bill Currie 72fb96245f Cleanup global symbols for the sw and sw32 renderers.
Names not mangled, but those symbols that could be made static have been.
Also, many dead variables have been removed.
2012-02-18 14:34:14 +09:00
Bill Currie ef37ed39a9 Clean up global symbols for the glsl renderer.
Where possible, symbols have been made static, prefixed with glsl_/GLSL_ or
moved into the code shared by all renderers. This will make doing plugins
easier but done now for link testing. The moving was done via the gl
commit.
2012-02-18 11:48:52 +09:00
Bill Currie 447ff2f2f5 Clean up global symbols for the gl renderer.
Where possible, symbols have been made static, prefixed with gl_/GL_ or
moved into the code shared by all renderers. This will make doing plugins
easier but done now for link testing.
2012-02-18 11:48:52 +09:00
Bill Currie ce6ab908a5 Don't include the specific plugin headers in plugin.h.
This lets files that use plugins not depend on plugins they don't use.
2012-02-13 22:02:07 +09:00
Bill Currie 9a91aff93c Move the ambient level check out of the sound renderer.
Instead, the client gets the current leaf and passes ambient_sound_level
from the leaf to S_Update.
2012-02-13 13:44:29 +09:00
Bill Currie b59ffd4cf1 Fix win32 (mingw) builds. 2012-02-07 20:18:23 +09:00
Bill Currie 115ae82223 Fix an install oopsie.
VISIBLE snuck into a header while I wasn't looking.
2012-02-06 23:32:26 +09:00
Bill Currie a694eed968 Add Draw_Picf to allow smooth placement on low-res consoles. 2012-02-06 19:32:30 +09:00
Bill Currie c98ffa4eda Create a message buffer API for Ruamoko
The api hides all the gory details of message buffer setup and usage
(particularly the differences between writing and reading). Most
importantly, the api provides a safe way to read and write binary data
(always little endian).
2012-02-06 15:50:32 +09:00
Bill Currie 042f310ed7 Add MSG_WriteBytes to match MSG_ReadBytes. 2012-02-06 15:04:01 +09:00
Bill Currie be9f05ea14 Catch progs zone errors and give a stack dump. 2012-02-06 12:48:22 +09:00
Bill Currie 44c6aad7fe Add some headers for make distcheck. 2012-02-02 21:41:39 +09:00
Bill Currie f800e79a38 Make the init process more dependency based.
Most subsystems that depend on other subsystems now call the init functions
themselves. This makes for much cleaner client initialization (more work
needs to be done for the server).
2012-02-01 21:52:47 +09:00
Bill Currie c4e08bc152 Fix a compile problem with struct cvar_s. 2012-02-01 20:07:21 +09:00
Bill Currie fa0ff96533 Clean up the mess with host_basepal and vid_colormap.
Libs should not be reaching into the exe :P
2012-02-01 19:52:13 +09:00
Bill Currie bc2aca53c3 Add functions to create/destroy qpics.
The creation uses raw 8-bit data (and the system palette). Destroying a
qpic loaded via other means will probably produce nasal demons.
2012-02-01 17:46:15 +09:00
Bill Currie 2b6adaa2d4 Do some more const correctness. 2012-02-01 17:44:55 +09:00
Bill Currie 7e406c20e5 Allow uncaching of qpics.
qpics loaded via Draw_CachePic can now be uncached via Draw_UncachePic.
2012-02-01 16:55:35 +09:00
Bill Currie 497718cc40 Plug the memory/texture/vbo leaks.
QF still leaks about 3MB/run on demo1, but even 100 runs didn't show any
render issues.
2012-01-29 22:32:35 +09:00
Bill Currie b03e937b67 Implement brush entity alpha.
http://www.celephais.net/board/view_thread.php?id=60157& has a good map for
testing (you see an example straight away if you look up). (+set max_edicts
2048)
2012-01-29 16:56:50 +09:00
Bill Currie 7e078c7f9c Revamp cshifts and implement in glsl.
The renderer should now be free of any direct access to client code. Even
3d rendering is now done via a function pointer.

The cshift code is done as a 2d screen function.
2012-01-28 20:45:14 +09:00
Bill Currie df87cffe15 Start working on the new GL skin code. 2012-01-24 23:06:07 +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 19dc579a5a Fix custom player skins for the sw renderers. 2012-01-23 23:38:32 +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 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 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 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 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 cbd13ac54e Implement QuatExp and fix up QuatBlend's param names. 2012-01-12 21:22:06 +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 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 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 7428a91526 Try, but fail, to render the world. 2012-01-08 20:39:36 +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 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 179c349bb3 Change WANT to NEED.
I forgot to do this when creating the header.
2012-01-08 09:20:04 +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 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 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 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 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 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 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 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 454047ab92 Make r_novis 0 take effect immediately. 2012-01-03 23:17:49 +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 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 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 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 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 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 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 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 4e7af5c3e0 Add a function to dump the info for all attribute arrays. 2011-12-28 14:27:59 +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 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 b96ca6f0e0 Add QuatCompScale and fix a bug in QuatScale. 2011-12-28 08:59:52 +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 e2a8de33cc First real texture support function for glsl. 2011-12-26 18:34:51 +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 279ea340e5 Add the GLSL files to the headers list. 2011-12-26 16:33:15 +09:00
Bill Currie 067d3b3c2c Revert all the commits adding stuff to QF/GL.
With the new QF/GLSL directory, I don't need (or want) them any more.
2011-12-26 16:16:39 +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 4131a5998c Yet more functions.
I really need to go through this properly.
2011-12-26 10:12:30 +09:00
Bill Currie 9f5eacd1fb Try to get text rendering.
Still a black screen :(
2011-12-26 08:12:05 +09:00
Bill Currie 34d26a72cc More gl functions. 2011-12-26 07:48:27 +09:00
Bill Currie 70abd33a25 Add GL 2.0 stuff. 2011-12-25 19:40:04 +09:00
Bill Currie a7ad6c03f5 Add some defines and functions I need for glsl.
There will be more coming as I need them.
2011-12-25 11:24:57 +09:00
Bill Currie ce8c2e717a Add some more vector/quat component macros. 2011-12-24 20:10:37 +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 59ef1eae9d Split out the floodfile code into its own file. 2011-12-23 19:01:31 +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 29306f7799 Merge nq and qw sv_phys.c
sv_move and world are now identical between the two directories.
2011-12-22 16:54:22 +09:00
Bill Currie 8b78aeb666 Add component-wise vector and quaternion comparison macros.
Also, re-implement VectorCompare and QuatCompare using the new macros.

VectorCompCompare and QuatCompCompare take a parameter specifying the
comparison operator to use. All component-wise comparisons must be true
for the whole comparison to be true.
2011-12-22 16:54:21 +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 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 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 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 b38cb1e221 Create some nicer docs for AngleVectors. 2011-12-13 14:15:03 +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 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 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 f9877ce0e0 Add a function to free a hull's portal information. 2011-12-08 14:58:08 +09:00
Bill Currie 27642a080a Avoid infinite recursion. 2011-12-01 12:57:06 +09:00
Bill Currie f9d56f2941 Add MOD_HullContents().
If trace is null or point type, or the hull doesn't have portals, or the
first node is a leaf, MOD_HullContents operates in point mode (exactly the
same way as SV_HullPointContents()). However, in box mode, all leafs
touched by the trace are checked for their contents. The contents field of
trace (a bit field) will indicate the contents type of all touched leafs.
The returned contents value indicates the most important contents:

    solid > lava > slime > water > empty

The one's complement value of the contents type is the bit number of the
contents bit field. I'm not sure how useful this will be as getting the
amount of overlap is currently not supported.
2011-12-01 12:26:33 +09:00
Bill Currie 5ee552ea5b Don't normalize the portal edge vectors.
This simplifies the collision handling code.
2011-11-28 20:56:20 +09:00
Bill Currie 3a386293fc Add Vector3Scale macro.
Vector3Scale individually scales the components of one vector by the
components of another vector.
2011-11-28 20:56:19 +09:00
Bill Currie 4044f9d8e2 Shrink the default winding size.
The minimum number of points on a valid winding is 3, and the most common
will be 4 (especially useful for static structures).
2011-11-28 20:56:19 +09:00
Bill Currie 297275e3de Create edge information for the portals. 2011-11-28 20:54:35 +09:00
Bill Currie 662c04dfdc Add a function to obtain the unit vectors of a winding's edges. 2011-11-28 20:54:35 +09:00
Bill Currie d61cb25a44 Add code to rebuild the bsp brushes.
Names and locations of declarations are still up in the air, but things
seem to be working assuming my test code is correct.
2011-11-28 20:54:35 +09:00
Bill Currie 853bf13d9e Move the winding code into libQFmodels. 2011-11-28 20:54:35 +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 03abb3b27d Add support for ellipsoids.
Not that boxes work yet, but the fix is the same.
2011-11-28 20:54:33 +09:00
Bill Currie 268e732b90 Add a Quat_t union.
It isn't used yet, but it might make messing with quaternions a little
easier.
2011-11-28 09:36:09 +09:00
Bill Currie 683adf1850 Print the name and texture number for model skins.
Use SYS_GLT (1024) for gl texture debugging.
2011-09-26 13:03:53 +09:00
Bill Currie d9ab3a1f54 Move the config file/command line parsing into qargs.c
I don't like the COM prefix, but it will do for now.
2011-09-11 14:57:05 +09:00
Bill Currie 8bab548d16 Make the hud type configurable via dirconf.
Currently only "id", "hipnotic" and "rogue" are supported (anything else is
treated as "id"). Has no effect in quakeworld (good thing too: changing
gamedirs is a little broken).
2011-09-11 08:13:26 +09:00
Bill Currie 5914bb6208 QFS doc update and cleanup. 2011-09-09 17:40:15 +09:00
Bill Currie 881d4babce Fix some undefined symbols in snd_alsa.c.
Serves me right for testing with only my debug build :P
2011-09-08 18:10:09 +09:00
Bill Currie 1e827485ef Do some work on the user documentation.
Also document part of the cvar api.
2011-09-07 21:08:37 +09:00
Bill Currie a8ea3aaad9 Allow dma sound targets to specify an xfer function. 2011-09-07 17:00:18 +09:00
Bill Currie e6e1b10c58 Add support for rotating entities to QW.
Same as the rotating entities in NQ. Unfortunately, I have some problems
with certain entities doing really weird things during collisions. I'll
sort that out later.
2011-09-07 09:41:06 +09:00
Bill Currie 94362cc010 Add macros to ease printing of vectors and quaternions.
I got sick of having to pass all those parameters to printf. Let the
compiler do it for me.
2011-09-07 09:41:06 +09:00
Bill Currie f0a145a537 Compress entity_state_t a little.
Use byte and short instead of int.
2011-09-07 09:41:05 +09:00
Bill Currie db8eee502f Eliminate the is_server global.
More ugliness gone :)
2011-09-04 09:58:13 +09:00
Bill Currie 6b5b2a1622 Specified the endianess of the reads. 2011-09-04 09:58:13 +09:00
Bill Currie deddb5cb6a Partially document the message api. 2011-09-04 09:58:12 +09:00
Bill Currie 12e238f806 Add a function to convert quake angles to a quaternion.
The test works by comparing the result of AngleVectors with forward,
right, and up vectors rotated by the quaternion resulting from AngleQuat.
2011-09-04 09:58:12 +09:00
Bill Currie eb205d73fd Add a function to convert a quaternion to a rotation matrix. 2011-09-04 09:58:12 +09:00
Bill Currie a59fee5346 Add the QuatSet macro.
Same as the VectorSet macro.
2011-09-04 09:58:11 +09:00
Bill Currie 5c9ab2832f Fix win32 cross-building.
No idea if the code actually works :(
2011-09-04 09:48:16 +09:00
Bill Currie e50f0e18ba Make netmain use netadr_t, same as netchan.
Having sockaddr and friends in a header file was bad news for portability
(especially windows).
2011-09-04 09:45:19 +09:00
Bill Currie 265ff06e8d Work around OpenBSD's overzealousness.
Requiring exactly the right size (ie, no bigger) for the address buffer
 is going a little too far.
2011-08-26 11:14:51 +03:00
Bill Currie f75b0a611b Some compile fixes for OpenBSD 2011-08-25 22:35:20 +09:00
Bill Currie 0d5bebabe2 Replace qsockaddr with AF_address_t.
It seems qsockaddr's assumptions aren't necessarily portable, as OpenBSD
seems to be doing weird things with qsa_family. Even if that's not the
case, this is cleaner.
2011-08-24 09:14:02 +09:00
Jeff Teunissen a56f6b2e37 Docs: switch to SVG for the .fig files, add borders around imgs
Self-explanatory, really.
2011-08-23 01:39:40 -04:00
Bill Currie ce07000054 Make the address comparison a little more informative.
Still hunting the openbsd connection issues. It seems the address
comparision isn't working.
2011-08-22 10:30:35 +09:00
Bill Currie 6268bd2965 Tweak the property list docs a little. 2011-08-20 19:23:31 +09:00
Bill Currie a759a5a376 Make the property-list documentation useful for users. 2011-08-20 16:29:59 +09:00
Bill Currie 5feb0454ca Add and use SYS_SND for both sound and cd debug prints. 2011-08-11 17:20:33 +09:00
Bill Currie ff857a9c71 Permit control of single character tokens. 2011-08-11 14:22:27 +09:00
Bill Currie eba66b1dde Doc tweaks and some whitespace. 2011-08-02 17:32:36 +09:00