Bill Currie
5f93c115ff
[util] Make developer flag names easier to manage
...
They're now an enum, and the flag part of the name is all lowercase, but
now the flag definitions and names list will never get out of sync.
2021-03-29 22:38:47 +09:00
Bill Currie
bb6c6963d2
[model] Clean up the globals around model loading
...
Covers only the generic load code (alias etc to follow), but this should
take care of a lot of issues in the future.
2021-02-01 14:39:00 +09:00
Bill Currie
4cef9792f4
[util] Make hash-tables semi-thread-safe
...
They take a pointer to a free-list used for hashlinks so the hashlink
pools can be per-thread. However, hash tables that are not updated are
always thread-safe, so this affects only updates. progs_t has been set
up such that it is easy for multiple progs within one thread can share
hashlinks.
2020-03-25 15:43:16 +09:00
Bill Currie
f58c2fef5a
Switch QF's quaterions from wxyz to xyzw.
...
After messing with SIMD stuff for a little, I think I now understand why
the industry went with xyzw instead of the mathematical wxyz. Anyway, this
will make for less pain in the future (assuming I got everything).
2018-10-12 14:33:55 +09:00
Bill Currie
ec6ba8a03c
Make key_dest private to keys.c
...
This has the bonus feature of making nq pause the game when input focus is
lost (same conditions as dropping the console or bringing up the menu).
2013-01-16 19:48:54 +09:00
Bill Currie
ec42bde527
Make hash tables more const correct.
...
And clean up the resulting mess :/
2012-10-27 11:44:31 +09:00
Bill Currie
23a38738fc
Massive whitespace cleanup.
...
Lots of trailing whitespace and otherwise blank lines.
2012-05-22 08:23:22 +09:00
Bill Currie
c0df07b607
Enable loading of iqm models in gl.
...
They don't render yet, but the engine doesn't segfault.
The vertex blend indices are rewritten with blend palette indices.
2012-05-17 15:55:38 +09:00
Bill Currie
23284536b5
Move IQM freeing into common code.
2012-05-16 18:09:44 +09:00
Bill Currie
111377f1be
Use buffer objects for iqm vertex arrays and elements.
2012-05-15 21:08:47 +09:00
Bill Currie
1375c3cf03
Finally, load textures for iqm :)
2012-05-15 21:08:47 +09:00
Bill Currie
202ab04572
Ensure the rotation quats are normalized.
...
Doesn't make any noticeable difference, but it doesn't hurt.
2012-05-15 21:08:46 +09:00
Bill Currie
31d89782ef
Use the correct index variable when byteswapping the arrays.
...
Not the cause of the broken animations :(
2012-05-15 21:08:46 +09:00
Bill Currie
7cda91a879
Temporarily disable dual quaternions.
...
The animation data isn't getting loaded or used properly (not sure yet).
This helps ensure it's not something I've done wrong with dual quats.
2012-05-15 21:08:46 +09:00
Bill Currie
551dfc47fb
Build the iqm vertex arrays in the correct order.
...
They need to be built in ascending type order (makes life easier in the
renderer).
2012-05-15 21:08:45 +09:00
Bill Currie
2e98c31175
Check the corrent bits when reading scale frame data.
...
Fixes the invalid reads when loading an iqm (at least for mrfixit).
2012-05-15 21:08:45 +09:00
Bill Currie
a880f33152
Set the model type for iqm.
...
Forgot this rather important step :P
2012-05-15 21:08:45 +09:00
Bill Currie
078cb10caf
Add a stride field to iqm_t.
...
Since iqm vertex arrays are variable, and I don't want to calculate the
stride every time I render a model, cached the value used when building the
arrays.
2012-05-15 21:08:45 +09:00
Bill Currie
6ab3bd45e5
Implement IQM animation loading.
...
Bone poses are converted to dual quaternions + shear + scale for nice
skinning. Will likely be slow for software skinning, but too bad.
2012-05-15 21:08:45 +09:00
Bill Currie
bf38e6073e
Implement iqm joint loading.
2012-05-15 21:08:44 +09:00
Bill Currie
52ab4f64f9
Add code for loading vertex colors.
...
And correct an oopsie in bledweights.
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
26a878da48
Stub out the iqm loader.
2012-05-15 21:08:43 +09:00