Bill Currie
dbbd6f4535
Fix a couple of missing particle function pointers.
...
Discovered while getting the location markers working again.
2012-07-06 10:18:05 +09:00
Bill Currie
ef9e8d05c4
Avoid some unnecessary state changes.
...
Doesn't make much difference but it doesn't hurt.
2012-07-03 18:20:32 +09:00
Bill Currie
a8e0bcabf9
Call R_SetFrustum in all renderers.
...
It turns out glsl, sw and sw32 weren't getting any benefit from R_CullBox
because the frustum wasn't setup :P. Get another 8% out of bigass1
(174->184fps). bigass1 now runs 2x as fast as it did before I started this
optimisation run :)
2012-07-03 15:57:33 +09:00
Bill Currie
eefefb79b0
Rename char_queue to draw_queue.
2012-07-03 14:45:16 +09:00
Bill Currie
b25de4d995
Rewrite the 2d code to use a scrap.
...
This severely reduces the calles to BindTexture, and more importantly,
glUseProgram, EnableVertexAttribArray etc. The biggest changes are:
o icons and text are all in the one giant texture
o icons and text are mixed in the one queue
This gave ~9% speedup for bigass1 (159->174fps).
2012-07-03 13:38:35 +09:00
Bill Currie
df35b22af4
Parameterize the linear filtering of scrap textures.
2012-07-03 12:10:24 +09:00
Bill Currie
e170f4ee75
Slightly reducde the number of calls to glUniformMatrix4fv.
...
It doesn't make a big difference to bigass1 (yet ?), but it does clean up
apitrace a little.
2012-07-03 10:57:35 +09:00
Bill Currie
1a6b56b0a2
Call glTexSubImage2D only once per frame.
...
Instead of once per surface... ouch. Gives about 20% speed boost on demo1
(154.7->185.7)
2012-07-02 20:01:28 +09:00
Bill Currie
4da3be5cd6
Get a minor speed gain in glsl bsp rendering.
...
About 4% (99.5 to 104.4) from not calling VertexAttrib4fv or BindTexture
when not necessary.
2012-06-29 22:13:20 +09:00
Bill Currie
3406cad99a
Many distcheck fixes.
...
Yay, bitrot :P
2012-06-29 10:49:21 +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
f958afad53
Optionally allocate extra data for iqm blend frames.
...
Also, correct the blend parameter type (int->float. oops).
2012-05-17 15:57:07 +09:00
Bill Currie
041d63c828
Move the frame blending into common code.
2012-05-16 17:44:18 +09:00
Bill Currie
8ada7c02a3
Remove the vertex scaling.
...
It was there only because mrfixit is rather small (8qu?) and it made
finding him easier :). Anyway, any scaling should be done in the engine.
2012-05-16 08:13:59 +09:00
Bill Currie
31772afd13
Add in some ambient light for iqm models.
...
Though the bsp loader doesn't yet support colored lighting, the ambient
light will be colored when it does. With this, I guess iqm model support is
done for glsl until I figure out how I want to do dual quaternion support.
2012-05-15 21:08:47 +09:00
Bill Currie
111377f1be
Use buffer objects for iqm vertex arrays and elements.
2012-05-15 21:08:47 +09:00
Bill Currie
0fd2b01665
Update the shader to work as it should :)
...
I always thought it whould be "light - point" :P. Also, in normal maps, 127
is 0.
2012-05-15 21:08:47 +09:00
Bill Currie
c454b96d2a
Translate lights into entity space.
...
Finally, lights work "properly". Probably the nicest lighting we've ever
had :) (still have to put in ambient, though).
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
a032aa5adf
Get the lights working (as such).
...
They work nicely now when the normal map and texture are bypassed (don't
know what texture is getting used currently).
2012-05-15 21:08:47 +09:00
Bill Currie
8c5e278bf8
Implement frame blending for iqm.
...
Now that I have things working... :)
2012-05-15 21:08:47 +09:00
Bill Currie
a938c7fb14
Almost fix the animations.
...
There's still a problem with his finger tips and feet, but the rest of his
limbs seem to be working well. Much thanks to Spike for encouraging me to
do a dump of the matices that are actually sent to the card.
It turns out that animated joints remain relative right up to the last
moment.
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
4b38048a5c
Create functions for rotation and translation.
2012-05-15 21:08:46 +09:00
Bill Currie
5b4fdd2a93
Use the correct position for light calcs.
...
I should have remembered that gl_FragCoord wasn't right.
2012-05-15 21:08:46 +09:00
Bill Currie
2080c337d7
Avoid using malloc/free every model/frame.
2012-05-15 21:08:46 +09:00
Bill Currie
c2e0674d50
Implement R_IQMGetLerpedFrames().
...
Like R_AliasGetLerpedFrames, but for IQM. It calcualtes the current frame
number and blend between the previous and current frames.
2012-05-15 21:08:46 +09:00
Bill Currie
8387d987e2
Change position to vposition.
2012-05-15 21:08:46 +09:00
Bill Currie
099ef348c6
Advance the vertex attrib index.
...
Disabling the array right after enabling it was causing things to just not
work :P
2012-05-15 21:08:46 +09:00
Bill Currie
d1d4c6142c
Get the frame data from the right places.
...
Always using joint[0] of the frames wasn't very useful.
2012-05-15 21:08:46 +09:00
Bill Currie
74cb49ef7c
Free the blended frame data.
2012-05-15 21:08:45 +09:00
Bill Currie
9c69404163
Attempt to render iqm models.
...
Things are a right mess (segfaults, invalid accesses on load, etc), but
hey, it's a start :)
2012-05-15 21:08:45 +09:00
Bill Currie
0becd35b65
Begin work on rendering iqm models.
...
No chance of working yet, but the shaders compile :)
2012-05-15 21:08:45 +09:00
Bill Currie
15d35fbdc9
Add mvp_mat and some comments.
2012-05-15 21:08:45 +09:00
Bill Currie
59c5bf2f9e
Code up an initial version of the iqm vertex shader.
...
Probably more bugs than an old kitchen cupboard :P
2012-05-15 21:08:45 +09:00
Bill Currie
3b938592c3
Dump some gl limits.
2012-05-15 21:08:43 +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
bc1b483525
Nuke the rcsid stuff.
...
It's pretty useless in git.
2012-04-22 10:56:32 +09:00
Bill Currie
1fd84477a2
Rename char to dchar in the text vertex shader.
...
Thanks to Spirit :)
Turns out certain drivers (nvidia?) reserve "char" even though opengl does
not. This should fix his missing console text.
2012-04-21 20:59:04 +09:00
Bill Currie
3b07928373
Fix an inconsistent numeric constant.
...
While checking the shaders to see if there might be anything obvious to
work around the current nouveau shader issues, I found a 1 that should have
been a 1.0. I'm surprised it ever compiled.
2012-04-20 16:30:25 +09:00
Bill Currie
e784754a11
Disable the gl_triplebuffer check in glsl.
...
It doesn't seem to have any useful effect in QF (even before the plugin
project) other than setting the number of frames to update. I'm not sure if
it's a useless variable or one where the user is supposed to match it to
the system configuration. Anyway, with this, the glsl plugin now works.
2012-04-12 14:40:02 +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
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
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
772af29cb3
Move the gl cvars into gl.
...
That gets rid of the gl_overbrite_f clash. They were put in r_cvar for
saving to the config file, but that was before seta existed.
2012-04-11 14:58:54 +09:00