Implement GPU-side corona fading

Uses GL_ARB_query_buffer_object to retrieve query results directly into a
buffer. This allows corona fading to be moved into the fragment shader,
preventing a round-trip to the CPU and synchronous rendering. Depending on the
machine's configuration, it can give a dramatic performance boost.

From: Alex Goins <agoins@nvidia.com>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12094 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=121152f1632170629122559482a298ea8b3aaf75
Cache corona occlusion buffer

Rather than creating and destroying the occlusion buffer every frame, cache it.
This improves performance slightly.

From: Alex Goins <agoins@nvidia.com>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12095 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=28e02ce5a65a4eb60187acc1bca5e493d7cb78f9
SDL2: Make work numeric keypad keys when numlock is off, K_PRINTSCREEN,  K_SCROLLOCK and K_NUMLOCK. Also fix a debug print (event.key.keysym.unicode doesn't exist anymore in SDL2)

From: terencehill <piuntn@gmail.com>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12096 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=244ac040c5cb901177e319dea3fab7891e2bd6f3
Implement proper support for utf8 characters in SDL2

From: terencehill <piuntn@gmail.com>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12097 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=0275b3fc9bbf9bea9dd5b7740ba34295a7514424
If vid_desktopfullscreen is set, manually initialize window with the current desktop resolution instead of with the default values and then letting sdl correct it automatically when they differ. It caused issues switching from fullscreen to window mode in the first game run

Signed-off-by: terencehill <piuntn@gmail.com>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12098 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=c0eb3105f4f3c4daf3f2025246c516a8195686b7
Regenerate SSH key.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12099 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=8989ca05d4347729e66a23acc86be4ade391bfb2
raise system requirements to Pentium3 so that we can force the math
pipeline to SSE, this fixes lightmap alignment issues in several
usermade quake maps (where the x87 increased precision was resulting in
different rounding than in the map compiler)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12088 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=27508c2bb7671a9ddc486c4f379bae0d913a5836
Fix possible endless loop in VM_sprintf.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12100 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=13906da312242ecc431c6a683b9b0b2c5e9d970c
In current gccs, it is -mfpmath=sse, not -fpmath=sse.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12101 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=5c0645a1f9104431cd3d4722720d478ec6ecf194
Fix _alpha image loading.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12102 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=6d56b5f88b61a8c3092d56efafabeaa12fdd8294
fix a buffer overlap with newer mac osx strlcpy

this fails on strcpy overlap detection in newer Mac OSX releases.

Error report: Mac OS X 10.10 (14A389)

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Application Specific Information:
detected source and destination buffer overlap

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff91017282 __pthread_kill + 10
1   libsystem_c.dylib             	0x00007fff922aab73 abort + 129
2   libsystem_c.dylib             	0x00007fff922aacea abort_report_np + 181
3   libsystem_c.dylib             	0x00007fff922d0dd0 __chk_fail + 48
4   libsystem_c.dylib             	0x00007fff922d0de0 __chk_fail_overlap + 16
5   libsystem_c.dylib             	0x00007fff922d0e11 __chk_overlap + 49
6   libsystem_c.dylib             	0x00007fff922d0e7e __strlcpy_chk + 68
7   darkplaces-sdl                	0x0000000104a3a29a Mod_LoadTextureFromQ3Shader + 74 (model_shared.c:2446)
8   darkplaces-sdl                	0x0000000104a21010 Mod_Q3BSP_Load + 2224 (model_brush.c:5134)
9   darkplaces-sdl                	0x0000000104a1e265 Mod_IBSP_Load + 85 (model_brush.c:7956)
10  darkplaces-sdl                	0x0000000104a3398b Mod_LoadModel + 1419 (model_shared.c:498)
11  darkplaces-sdl                	0x0000000104a37717 Mod_ForName + 55 (model_shared.c:616)
12  darkplaces-sdl                	0x0000000104ad3f28 SV_SpawnServer + 424 (sv_main.c:3284)
13  darkplaces-sdl                	0x00000001049e497f Host_Map_f + 319 (host_cmd.c:394)
14  darkplaces-sdl                	0x00000001049e4bad Host_Changelevel_f + 221 (host_cmd.c:416)
15  darkplaces-sdl                	0x000000010494d6f9 Cmd_ExecuteString + 617 (cmd.c:1936)
16  darkplaces-sdl                	0x000000010494d14d Cbuf_Execute + 781 (cmd.c:368)
17  darkplaces-sdl                	0x000000010494dbd5 Cbuf_Frame + 597 (cmd.c:384)
18  darkplaces-sdl                	0x00000001049e0109 Host_Main + 1305 (host.c:781)
19  darkplaces-sdl                	0x00000001048c2f06 main + 166 (sys_sdl.c:223)
20  libdyld.dylib                 	0x00007fff8e7735c9 start + 1

From: nyov <nyov@nexnode.net>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12103 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=8f317e4b0e366bff1ba380af77279c3d16d588e9
fixes some more Mac OS X buffer overlap errors

Error report: Mac OS X 10.10 (14A389)

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Application Specific Information:
detected source and destination buffer overlap

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff91017282 __pthread_kill + 10
1   libsystem_c.dylib             	0x00007fff922aab73 abort + 129
2   libsystem_c.dylib             	0x00007fff922aacea abort_report_np + 181
3   libsystem_c.dylib             	0x00007fff922d0dd0 __chk_fail + 48
4   libsystem_c.dylib             	0x00007fff922d0de0 __chk_fail_overlap + 16
5   libsystem_c.dylib             	0x00007fff922d0e11 __chk_overlap + 49
6   libsystem_c.dylib             	0x00007fff922d0e7e __strlcpy_chk + 68
7   darkplaces-sdl                	0x0000000102903b3e SV_UpdateToReliableMessages + 398 (sv_main.c:2480)
8   darkplaces-sdl                	0x00000001029038bb SV_SendClientMessages + 59 (sv_main.c:2575)
9   darkplaces-sdl                	0x000000010278bb5e Host_Main + 3758 (host.c:910)
10  darkplaces-sdl                	0x00000001025be64f main + 239 (sys_sdl.c:223)
11  libdyld.dylib                 	0x00007fff8e7735c9 start + 1

From: nyov <nyov@nexnode.net>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12104 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=a9a2f5f032331adc43ae3bf99118464157b807ab
Empty commit to make Travis retry.
curl: do not output requirements for files that are local.

Fixes a bug introduced by r12079.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12105 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=85c434c08985337fa476e56fae0fde3e955dbd73
Realign stack for SDL/win32 builds. Yes, annoying, and costs performance.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12111 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=0afeccfe1289b64245baf48979b6a694d077b6f0
miscellaneous fixes from graphitemaster

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12106 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=bd8b9a2b1e5464f18a7a2e6e573201d6aa9dbcca
gltexture_t->glisdepthstencil fix

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12107 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=22dac77bc9bd23097c69404c6d0f5160c5330dc1
specify depth and stencil attachments separately (combined attachment is only available in GL >= 3.0)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12108 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=8d5d46a8e8d2d015be6912419960f1a5a65ea49b
more miscellaneous fixes from graphitemaster

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12109 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=cb6472b4ced79f6cd093756c6483699761cf674d
fix Con_Printf in Mod_Q2BSP_LoadNodes

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12110 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=b4488d1563f5fa00036b2ccacfda344c3f0f254e