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
16f84cd496
Hopefully get the 3d view and projection transforms setup.
2011-12-30 21:10:24 +09:00
Bill Currie
20d93466c7
Frag some magic numbers.
...
More annoying than hipnotic's gremlins.
2011-12-30 21:07:35 +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
bcdcd7b36d
Implement sprint glsl loading.
...
That was... easy.
2011-12-30 09:36:57 +09:00
Bill Currie
a87a60a6fd
Flush the text buffer before drawing conback or menus.
...
Ok, now really done until I notice something else (I forgot this one
momentarily).
2011-12-29 18:23:09 +09:00
Bill Currie
047b7bcc32
Implement Draw_TileClear.
...
With this, 2d seems to be finished. YAY.
2011-12-29 18:15:15 +09:00
Bill Currie
a1035aafe9
Implement Draw_TextBox.
2011-12-29 17:51:31 +09:00
Bill Currie
2b44a25c6b
Flush console text after each screen function.
...
This on its own doesn't fix menus being overwritten with console text, but
it's an important step.
2011-12-29 11:26:14 +09:00
Bill Currie
9fec4d5be0
Implement Draw_Fill.
...
Almost there with 2d.
2011-12-29 11:25:27 +09:00
Bill Currie
9d0ed6b885
Fix the missing text.
...
Silly case and paste error cleared out my text vertex array prematurely.
2011-12-29 08:47:32 +09:00
Bill Currie
bece72e746
Use a quick hack to get colored crosshairs working.
2011-12-28 21:45:20 +09:00
Bill Currie
e69a583f1b
Work around a bug in mesa.
...
Since I'm not specifying the api when creating my context, mesa is giving
me GL2. This is fair enough, but in GL2, vertex attribute 0 is the vertex
position. This too, is fair enough. The problem is, mesa is assigning 0 to
my vcolor attribute and thus I can't set it. The work around is simply to
swap the declaration order of vcolor and vertex (this really shouldn't work
eiter, I suspect).
2011-12-28 20:43:56 +09:00
Bill Currie
6a44978a0f
Fix reading of GL_CURRENT_VERTEX_ATTRIB.
...
Turns out it returns a vec4. oops.
2011-12-28 20:41:26 +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
411ab8f359
Be noisy when resolving uniforms and attributes.
2011-12-28 12:58:26 +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
b657905c83
Bring in Despair's gl error checking from the gl renderer.
2011-12-28 09:05:36 +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
705d07fa39
Implement most of the 2d rendering functions.
...
textbox, crosshair, tileclear, fill and fadescreen are the remaining
functions.
There's a problem with 2d icons being drawn over the text (instead of
under), but I'll leave that for later.
2011-12-26 20:33:40 +09:00
Bill Currie
e2a8de33cc
First real texture support function for glsl.
2011-12-26 18:34:51 +09:00
Bill Currie
42034acc03
Organize the text program data.
...
Also, rename the charmap uniform in quake2d.frag as it's more generic than
that.
2011-12-26 18:00:55 +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
5bed38dcd9
Rename quaketxt.frag to quake2d.frag.
...
It's actually fairly generic for 2d rendering (no lighting, palette lookup)
2011-12-26 17:11:31 +09:00
Bill Currie
f78db6c570
Clean up the generated shader files.
2011-12-26 16:39:02 +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
e6c6de3a2a
Fix the palette uploading.
...
Ooooops :P
2011-12-26 10:41:16 +09:00
Bill Currie
7bd5ab882c
Get text rendering working.
...
It comes out as a funky green (that's not in the quake palette!!!), but
it's mostly readable.
2011-12-26 10:16:16 +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
c161a91d4a
Split out and partially implement the screen code.
2011-12-26 08:09:47 +09:00
Bill Currie
1268830082
Split out the particle code.
2011-12-26 08:02:18 +09:00
Bill Currie
34d26a72cc
More gl functions.
2011-12-26 07:48:27 +09:00
Bill Currie
7d653f3676
Start work on outputting text.
...
The shaders now compile. No linking is done yet. Char quads are generated,
but not sent to the card.
2011-12-25 19:42:39 +09:00
Bill Currie
70abd33a25
Add GL 2.0 stuff.
2011-12-25 19:40:04 +09:00
Bill Currie
91afdcf064
Don't call init_box when not doing a box trace.
...
I took the opportunity to pass qf through callgrind. init_box was
surprisingly expensive, especially considering its results were never used.
2011-12-25 17:11:48 +09:00
Bill Currie
55a0ed49cd
Build qw-client-glslx too.
...
I was asked about timedemo overkill (bigass1 currently gets 40kfps, haha),
so I had to add qw-client-glslx to the build.
2011-12-25 16:41:14 +09:00
Bill Currie
9df7370bcd
Create some shaders for quake text.
...
Still nothing drawn, but this gets my shader scripts into C without me
having to look at ugly strings.
2011-12-25 15:53:12 +09:00
Bill Currie
b7c90fa02d
Load the quake palete as a texture.
...
256x1 rgba.
2011-12-25 13:53:52 +09:00
Bill Currie
99c490ce52
Get glsl running as a null renderer.
...
This means that nq-glslx can get through demo1, demo2, demo3 and bigass1
without crashing. However, nothing is rendered, so unless you like black,
it's not very interesting.
2011-12-25 13:02:26 +09:00
Bill Currie
2894689f71
Clean up mod_lightmap_bytes.
...
Just how many definitions do we need?
2011-12-25 13:02:26 +09:00
Bill Currie
dcf2b14188
Implement alias model skin loading for glsl.
2011-12-25 13:02:26 +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
e62eb23f67
And do the real merge.
...
That drastically simplifies the processes of alias model loading for glsl :)
2011-12-25 11:04:03 +09:00