Commit Graph

1477 Commits

Author SHA1 Message Date
Bill Currie 6eb6b6c0ba Change pointer_t to unsigned and clean up the mess.
It doesn't make sense to have negative pointers. The size of the commit is
from enabling gcc's -Wtype-limits warning and cleaning up that mess too.
2012-12-21 21:53:13 +09:00
Bill Currie cb259823af Scale the glsl crosshairs to match gl. 2012-12-12 21:37:55 +09:00
Bill Currie f71affdfba Use exact texture coords for 2d pics in glsl.
Moving the texture coordinates in 1/4 pixel made a mess of the 2d pics
(very noticable on the round crosshair).
2012-12-12 21:34:37 +09:00
Bill Currie a372efee5c Add a new crosshair.
Now all 4 slots of the crosshair table are used :)

Also, fix the offset for pic based crosshairs in glsl, and use just one
func for them.
2012-12-12 19:36:50 +09:00
Bill Currie a12eb940f1 Remove the hard-coded bsp maximum depths.
The depth limits in the gl and glsl renderers and in the trace code really
bothered me, but then the fix hit me: at load-time, recurse the trees
normally and record the depth in the appropriate place. The node stacks can
then be allocated as necessary (I chose to add a paranoia buffer of 2, but
I expect the maximum depth will rarely be used).
2012-11-28 21:29:03 +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
Ozkan Sezer 6e04fd5ff6 signed int viddef_t members
The attached patch (against quakeforge git) changes the [con]width,
[con]height, and most importantly the rowbytes members of viddef_t
from unsigned to signed int, like in q2.  This allows for a properly
negative vid.rowbytes which may be needed in, e.g. a DIB sections
windows driver if needed.  Along with it, I changed a few places
where unsigned int is used along with comparisons against the relevant
vid.* members.
One thing I am not 100% sure is the signedness requirements of
d_zrowbytes and d_zwidth: q2 has them as unsigned but I am not sure
whether that is because they are needed as unsigned or it was just an
oversight of the id developers. They do look like they should be OK
as signed int to me, though: comments?

==
Note from Bill Currie: I had to do some extra changes as many
signed/unsigned comparisons were somehow missed.
2012-10-21 09:00:50 +09:00
Bill Currie 709da6e7d7 Rotate the skybox -90 degrees on the z axis (gl)
Now gl and glsl match again, and quake's skies are now "correct" (assuming
fitzquake is the standard).
2012-09-13 08:36:28 +09:00
Bill Currie 14f089d08e Correct the orientation of the skybox (for glsl).
It turns out the expected orientation of the sky cube is exactly that of
Blender's default cube looked at from the front view (num-1) and the front
face being the nearest face. This put's Marcher's sun nicely in the view
when exiting the cave.
2012-09-12 19:06:07 +09:00
Bill Currie 536ee48a97 Some minor skybox improvements suggested by mh.
Rearrange the sky_suffix and sky_coords arrays and remove the sky_target
array such that the faces can be loaded using
GL_TEXTURE_CUBE_MAP_POSITIVE_X + i (apparently certain drivers break if
the faces aren't loaded in the correct order).

Also, the nomalization of the direction vector in the fragment isn't
necessary.
2012-09-12 15:20:35 +09:00
Bill Currie 433d9d138b Hook up the pointfile loader in glsl.
I was always wondering what that was for (never bothered looking at the
command registration, I guess :P).
2012-09-12 09:54:24 +09:00
Bill Currie a37c5465e1 First step for BSP2 support. DOES NOT WORK!
All of the nastiness is hidden in bspfile.c (including the old bsp29
specific data types). However, the conversions between bsp29 and bsp2 are
implemented but not yet hooked up properly. This commit just gets the data
structures in place and the obvious changes necessary to the rest of the
engine to get it to compile, plus a few obvious "make it work" changes.
2012-09-07 16:09:24 +09:00
Bill Currie d6a1daaf30 Force a refdef update when nearclip or farclip change. 2012-08-29 09:55:17 +09:00
Bill Currie 78f7604efc Evil hack to handle duplicated sdl key syms. 2012-08-18 21:44:51 +09:00
Bill Currie 9250eb83bf Yet more char index issues.
Should be getting near the end of these as qfcc tries to link in my hacked
up tree :)
2012-08-18 21:42:49 +09:00
Bill Currie 5b054dd98b Add "slow grav" for smoke.
Removes one more set of hard codings from particle types.
2012-08-12 11:42:18 +09:00
Bill Currie 5a5b31bae4 Correct the direction of pt_fire particles.
sub_grav() was accelerating the particle in the wrong direction. Down being
+ve gravity caused a bit of confusion (though it was a c&p error).
2012-08-10 13:56:01 +09:00
Bill Currie 372defc1be Support up to 128 dlights.
More or less as per MH's tut, but really just finishing something that
should have been done years ago.
2012-07-21 13:58:54 +09:00
Bill Currie 7d8b0f96d6 Correct the fog distance calculations.
It turns out the pixel's z coord is correctly obtailed by
gl_FragCoord.z/gl_FragCoord.w.
2012-07-17 19:10:10 +09:00
Bill Currie c4309e7abc Correct the fog blend calculation for transparency.
The incoming pixel's alpha should not be affected by fog. This fixes the
ugly square smoke particles in foggy maps.
2012-07-17 19:08:36 +09:00
Bill Currie a7327acb80 Set up shadevector for gl alias models.
The setup had been lost at some stage, thus shadows were always directly
under the entity. Unlike the original quake shadow code, the vector is
correctly transformed into the entity's space.
2012-07-17 17:10:48 +09:00
Bill Currie fbc0ad59df Implement gl shadows for pure triangle alias models.
I finally found the cause of Despair's gl shadows non-rendering+segfault...
the shadow code expected triangle fans and strips but was getting simple
triangles. Oops.
2012-07-17 16:11:42 +09:00
Sander van Dijk 3c04de1116 Better default vid_gamma value. 2012-07-17 06:30:01 +09:00
Bill Currie 134f9b0e9e Force pr_keys.c to get linked in.
Nothing in the main program currently uses Key_Progs_Init, so the object
file wasn't getting pulled into the link. However, it's quite necessary for
the client console plugin :/
2012-07-16 18:18:13 +09:00
Bill Currie 8333e6578c Fix non-static sw renderer for 32bit x86.
Yet another undefined symbol caused by iqm support. This time caused by
asm/not asm.
2012-07-15 22:34:00 +09:00
Bill Currie 0f34ab8762 Move pr_keys.c from console to video/targets.
It wasn't very accessible/usable in the client console plugin.
2012-07-15 07:39:50 +09:00
Bill Currie f9c6eacb84 Really fix sw32 renderer loading.
It seems I never tested the sw32 renderer in a non-static build since I put
in IQM support.
2012-07-15 07:30:17 +09:00
Bill Currie fd6b5edb73 Don't set triangle draw type in sw32 iqm renderer.
It's not used and causes link errors (I never noticed on my system).
2012-07-14 19:48:57 +09:00
Bill Currie fcf7150c62 Remove some old renderer specific files. 2012-07-14 07:32:53 +09:00
Bill Currie 6fe32103ea Do a bit of bound() usage auditing.
While these seem to be mostly harmless, having function calls in the
bounded value can be nasty.
2012-07-12 19:33:51 +09:00
Bill Currie a822a683cd Fix the inverted lighting for sw32.
LordHavoc had made lighting positive for sw32, but I had done something in
the plugin code that broke that (probably something to do with the
colormap loading). Going back to id's original code fixes the issue.
2012-07-12 18:15:45 +09:00
Bill Currie 12319cfcdf Revert "Slightly reducde the number of calls to glUniformMatrix4fv."
This reverts commit e170f4ee75.

It turns out I messed up something in the patch. I noticed the problem
while playing digs04.bsp: many sub-model surfaces, particularly those with
animated textures, were not being transformed correctly. As this patch did
not make a large performance difference, it's probably better to just
revert it. I might revisit it later.
2012-07-11 08:12:57 +09:00
Bill Currie ede65fb28c Use the correct source for the backtile width/height.
Yay, no more garbage on the screen :)
2012-07-09 15:56:51 +09:00
Bill Currie 5014825b39 Fix the backtile for glsl.
Since the backtile is loaded into a scrap and used as a subtexture, we
can't use GL's texture wrapping, thus do the wrapping ourselves. There are
some minor issues with the wrong part of the scrap being drawn: need to
investigate where the bug is (vrect, make_quad, etc).
2012-07-09 15:11:03 +09:00
Bill Currie 37260018a2 Acutally use the vertex colors for alias models.
Thanks to Spirit trying QF on nvidia drivers, the missing attributes were
found. Now he shouldn't get gl errors :)
2012-07-08 16:52:13 +09:00
Bill Currie a6d9f5d931 Fix a parallel make issue. 2012-07-06 12:35:50 +09:00
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 ee1cb24e3d Move the call to R_SetFrustum to gl_R_SetupFrame.
This was meant to be part of the previous commit, but I forgot to write the
file :P
2012-07-03 16:08:12 +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 e58cd75660 Bound r_maxdlights properly.
QF's implementation doesn't support more than 32 dlights (32 bit int).
2012-07-03 15:27:48 +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 8fa92bf206 Add 32 button support to sdl and win as well.
The world isn't x11 (much as I'd like it to be)
2012-07-02 16:51:14 +09:00
Bill Currie 7cd8806ec0 Add support for up to 32 mouse buttons.
My new mouse reports only up to 9 (skipping 6 and 9, it seems), but I
/have/ seen 32 button mice...
2012-07-02 16:33:57 +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 603fe92cba Add a callback for when key_dest is set. 2012-06-29 18:00:21 +09:00
Bill Currie 3406cad99a Many distcheck fixes.
Yay, bitrot :P
2012-06-29 10:49:21 +09:00
Bill Currie aa2a8e8909 Mostly "merge" cl_screen.c.
Down to protocol/networking differences.
2012-06-15 22:02:17 +09:00
Bill Currie b2290d92c9 Nuke UNALIGNED_OK.
It's not really necessary (and was effectively dead anyway).
2012-06-15 22:02:17 +09:00
Bill Currie e730608dd7 Implement r_flatlightstyles from fitzquake. 2012-06-15 22:02:14 +09:00
Bill Currie dbc203b625 And a few more bits of whitespace. 2012-05-23 08:21:27 +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 85da69a96a Transform normals wrt bones in sw and sw32.
Better lighting :), though any scaling/shearing will produce funny results,
and sw32's lighting is broken in general.
2012-05-20 15:21:25 +09:00
Bill Currie 0fbaa2a88a Add sw32 support for iqm models.
That was easy :)
2012-05-20 14:23:41 +09:00
Bill Currie e2db2dcb63 Support static iqm models.
Segging on a model with no animations is not nice :P
2012-05-19 21:26:11 +09:00
Bill Currie d25f39cc7d Remove pskindesc from affinetridesc_t.
It's never used after being set.
2012-05-19 09:29:05 +09:00
Bill Currie be9c0697a2 Give sw iqm its own transform setup.
IQMs don't need to be scaled or offset. This fixes iqms not rendering,
though they actually were: just super tiny.
2012-05-19 00:43:26 +09:00
Bill Currie c0517b1d97 Factor out the blend palette creation.
gl, sw and sw32 use blend palettes, so share the code. This also abandons
the optimization for transforming verts in sw (had all sorts of problems
anyway). sw still doesn't work, though.
2012-05-19 00:34:15 +09:00
Bill Currie e069757ceb Refactor the skin setup code. 2012-05-19 00:18:03 +09:00
Bill Currie fb10f38fd4 SW now tries (but fails miserably) to render iqm models.
Something seems to be very wrong with the transforms.
2012-05-18 23:31:14 +09:00
Bill Currie da87ac0ce5 Remove some unused parameters. 2012-05-17 21:33:22 +09:00
Bill Currie da313cfae7 Load iqm models in the sw renderers.
sw32 loses 32 bit textures :/
loading is /slow/ (converting rgb(a) to 8bit palette... ouch.
2012-05-17 21:17:48 +09:00
Bill Currie 7637f35616 Remove the test scaling.
Heh, forgot to remove it again :)
2012-05-17 16:02:13 +09:00
Bill Currie c3801d46e5 Render iqm models in GL.
There are still many issues to sort out, but the basics are working.

Problems:
	rendered fullbright (no lighting done)
	normals are ignored
	extra textures (glow etc) not used/loaded

4 models on the screen don't seem to be a problem.
2012-05-17 15:58:29 +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 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 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 9984925fe8 Correct a comment. 2012-05-15 21:08:47 +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 bea8f8f9c4 Fix a segfault when searching for dlights.
Uninitialized var bites my bum :P
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 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 7fc99f9c60 Fix gl and glsl support in sdl. 2012-04-12 16:47:37 +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 80f5cc59e9 Plug a memory leak.
Allocating (and not freeing) rects every frame... ouch.
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