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
15fd3be73a
Allow iqm models when storing efrags.
2012-05-15 21:08:45 +09:00
Bill Currie
41e7a6c70c
Search for the "nearest" dlights.
...
Nearness is a function of both distance and intensity: distant bright
lights can take priority over close dim lights.
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
26a878da48
Stub out the iqm loader.
2012-05-15 21:08:43 +09:00
Bill Currie
099d9ec3f2
Move the increment of order out of the loop.
...
I don't know what gcc's optimizations would do with it, but it seems quite
reasonable to pull the code out of the loop by hand.
2012-05-05 18:01:00 +09:00
Bill Currie
cf5c9f067f
Make GL_DrawAliasShadow const correct.
...
Despair's having troubles with segfaults that I can't reproduce. If it's a
strict aliasing problem, this might help.
2012-05-05 17:55:30 +09:00
Bill Currie
a43bd755ca
Fix the 32-bit x86 build of the software renderer.
...
I really need to remove the sledge-hammer approach, but this at least gets
QF working out-of-the-box on 32-bit x86 systems.
2012-04-28 13:02:36 +09:00
Bill Currie
20b7a46100
Remove a bogus model type check.
...
This allows 16-bit alias models to render when viewd straight on.
2012-04-25 11:50:20 +09:00
Bill Currie
ba7046ea09
Allow large skins in sw32.
...
Dirty rotten magic numbers :P
2012-04-25 10:47:44 +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
e167300a84
Fix a segfault in the sw32 renderer on entering e1m7
...
While this particular tigger of the real bug was caused by 659d95221e
(hopefully fix both the "get stuck waiting for 3d" bug and the null
worldmode bug.), the real bug was lurking in the code since the dawn of
time (from sw32's perspective). This fix is as per LordHavoc's suggestion
(heh, despite the years, he knows his code), but I spent the time hunting
down the trigger to understand just what was going on.
It turns out that (0,0,0) is too close to a wall (probably on, but the
slight default offset is too close) and the above commit changed the first
rendered frame to be before the player origin was set rather than after.
This fix feels correct to me because noclipping around with the sw32
renderer would probably hit the same bug with a bit of bad luck. Thus
ensure the index resulting from zi never exceeds 65535.
2012-04-24 22:02:20 +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
bbd277cb72
Fix building libQFrenderer as a helper library.
2012-04-12 17:16:40 +09:00
Bill Currie
61ae793367
Fix two broken symbols for sw32.
...
Now all 4 render plugins load as standard plugins (though there's still a
problem with libQFrenderer.so)
2012-04-12 17:12:24 +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
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
799a0ae018
Fix a bogus cshift calculation in sw32.
...
Found via valgrind and gammatable having become malloced instead of static.
2012-04-11 14:58:55 +09:00
Bill Currie
07ab5600c9
Recache viddef in *D_InitCaches.
...
sw32 now at least doesn't seg, but doesn't draw any 3d. sw renderer seems
to work.
2012-04-11 14:58:55 +09:00
Bill Currie
42868d308e
Initialize the skins and particles subsystems.
2012-04-11 14:58:55 +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
f5d6959f4b
Copy out the model functions pointer.
2012-04-11 14:58:55 +09:00
Bill Currie
6f7b4276e9
Move VID_InitBuffers back from the renderer to targets.
...
First, it was nearly identical between sw and sw32 (one paranoia line in
sw32), and second, it's common enough.
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
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
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
db4a463727
Remove VISIBLE from the files that will go into the plugins.
2012-04-11 14:58:54 +09:00
Bill Currie
eb536dc995
Remove D_BeginDirectRect and D_EndDirectRect from gl/glsl.
...
They were never really needed anyway (they're for the sw renderer).
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
eff8ebd9ba
Fix a snafu.
...
In all that, I forgot to test non-asm builds.
2012-02-18 14:54:20 +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
057da55385
Fix the incorrect linkage of libQFrenderer*
...
They're now currently not installed, but they were still building as shared
libs, and thus the installed bins were broken.
2012-02-18 11:46:46 +09:00
Bill Currie
78789a6833
Add support for blender's environment maps.
...
QF will now load a single image with (${skyname}_map.*) using blender's
layout. That is, 3x2 with the top row being back, right, front and the
bottom row being bottom, top, left.
2012-02-16 20:47:38 +09:00
Bill Currie
bfdb2b20d5
Clearify skybox layout.
...
Turns out quake skynames have left and right backwards.
2012-02-16 20:42:49 +09:00
Bill Currie
4707706f5d
Use QF_NEED for the renderer and model libraries.
...
This breaks RPM building, but I can fix that later.
2012-02-10 13:29:45 +09:00
Bill Currie
9fbff2f4d5
Do an audit of the Makefile.am files.
...
o All instances of LIBADD/LDADD have a corresponding DEPENDENCIES
specificatiion.
o libraries now use a lib_ldflags macro to keep things consistent
o duplication of source/lib names has been minimized (particularly in
the libraries; more work needs to be done for the executables)
o automake spec blocks have been organized (again, more work needs to be
done for the executables)
2012-02-07 16:04:19 +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
14c0e22494
Tweak Draw_MakePic to be a little more usable.
2012-02-06 15:50:32 +09:00
Bill Currie
42b87ee80c
Fix the memory leak in rua Draw_CachePic.
2012-02-06 12:49:57 +09:00
Bill Currie
6f10f0cea6
Fix the x86 sw renderer (intel asm).
...
I'd forgotten about assembly code versions when I was doing my testing
when I redid skins. Thanks to Sander for pointing it out.
2012-02-02 17:32:27 +09:00
Sander van Dijk
49453b690f
glsl_main.c: initialize t[] to silence compiler warning.
2012-02-02 16:55:33 +09:00
Sander van Dijk
82adc67a67
glsl_bsp.c: __builtin_expect() to avoid compiler warnings.
2012-02-02 16:55:25 +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
b9bb7d95bb
Remove calls to Sbar_Changed from the libraries.
...
If this breaks things, we'll have to sort something out, but again, no libs
reaching into the exe.
2012-02-01 20:06:14 +09:00
Bill Currie
5efc78b920
Move the call to R_Particles_Init_Cvars into R_Init_Cvars.
2012-02-01 20:05:11 +09:00
Bill Currie
4b390909f2
Move r_gravity to it's rightful home.
...
r_part.c makes much more sense.
2012-02-01 20:03:16 +09:00
Bill Currie
d76e4608ab
Rewrite the ruamoko draw api internals.
...
Update for using resources, and add wrappers for Draw_MakePic and
Draw_DestroyPic/Draw_UncachePic.
2012-02-01 18:19:54 +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
a849cf7698
Fix a stale include problem.
...
Thanks to iku for pointing it out.
2012-02-01 14:13:00 +09:00
Bill Currie
706f09b247
Put the transparent surfaces on the water chain.
...
I'd actually done this the first time, but then got confused and forgot the
waterchain works with multiple textures. This is actually the right place
as all transparent surfaces need to be sorted irrespective to their
textures. Really, waterchain needs to be renamed.
2012-01-31 18:08:06 +09:00
Bill Currie
b286a35281
Sort transparent surfaces back to front.
...
This allows overlapping transparent surfaces to look like they are
overlapping each other rather than only the nearest one showing.
2012-01-31 16:17:09 +09:00
Bill Currie
c3d2365bd8
Fix a missed default_color init.
...
Wish I'd caught this earlier :/
2012-01-30 21:02:13 +09:00
Bill Currie
c01255a387
Fix a case&paste error.
...
Doesn't fix the color problem for water surfaces on my eeepc, though :(
2012-01-30 20:31:58 +09:00
Bill Currie
8f0ce733ff
Sanitize color handling a little.
2012-01-30 20:31:37 +09:00
Bill Currie
4b948de225
Ensure the lightmap gets rebuilt when the dlights disappear.
...
I didn't realize what that line was for when I copied the code from GL :/
2012-01-30 18:41:27 +09:00
Bill Currie
e4f63fba6c
Fix some integer shift overflows.
...
Thanks to Ozkan Sezer for pointing them out.
2012-01-30 09:13:06 +09:00
Bill Currie
f8dfee6de7
Merge branch 'master' into glsl
2012-01-29 22:36: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
8f869c001b
Fix the missing world on map reload.
...
If the map got reloaded but the current leaf didn't change the world (and
most entities) didn't get drawn. Forcing a vis update by first setting
r_viewleaf to null and marking surfaces does the trick :)
2012-01-29 16:09:35 +09:00
Bill Currie
462a9047c6
Fix the missing fog on particles and sprites.
...
Bah, definitely need a metter method of parameter interrogation.
2012-01-29 10:35:23 +09:00
Bill Currie
731236ee07
Implement global fog.
...
Sprites and particles don't seem to be getting fogged correctly, but bsp
and alias models are working.
2012-01-29 10:27:28 +09:00
Bill Currie
4734c5b64a
Implement water alpha.
2012-01-28 21:20:34 +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
315db554b5
Add some instrumentation to check render speeds.
2012-01-28 14:10:47 +09:00
Bill Currie
2595251162
Do not update every visible lightmap every frame.
...
This takes nq from ~25fps to 65-72 fps on Unforgiven's start map.
2012-01-27 21:48:25 +09:00
Bill Currie
df87cffe15
Start working on the new GL skin code.
2012-01-24 23:06:07 +09:00
Bill Currie
6104db50e1
Fix a gl matrix stack overflow.
...
I'd missed a couple of places for glPopMatrix (worse, one was push!).
2012-01-24 12:10:37 +09:00
Bill Currie
1ef24e0404
Fix a gl matrix stack overflow.
...
I'd missed a couple of places for glPopMatrix (worse, one was push!).
2012-01-24 12:08:12 +09:00