xonotic/darkplaces.git
2 months agoFix issue with noise during startup master
divverent [Fri, 20 Sep 2019 15:27:46 +0000 (15:27 +0000)]
Fix issue with noise during startup

After migrating to SDL2 interfaces there is noise during startup fix
this by initializng buffer as specification requires.

Per SDL_AudioCallback spec:
The callback must completely initialize the buffer; as of SDL 2.0, this buffer is not initialized before the callback is called. If there is nothing to play, the callback should fill the buffer with silence.

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12480 d7cf8633-e32d-0410-b094-e92efae38249

2 months agoTravis: Force XInput and XRandR support.
divverent [Fri, 13 Sep 2019 00:46:52 +0000 (00:46 +0000)]
Travis: Force XInput and XRandR support.

May fix "window gets withdrawn on startup on Linux fullscreen".

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12479 d7cf8633-e32d-0410-b094-e92efae38249

2 months agoUpdate Xonotic's SDL version to 2.0.10
divverent [Fri, 23 Aug 2019 23:58:55 +0000 (23:58 +0000)]
Update Xonotic's SDL version to 2.0.10

From: Mario <mario@smbclan.net>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12478 d7cf8633-e32d-0410-b094-e92efae38249

5 months ago+ Compiling fix
motorsep [Sun, 26 May 2019 22:05:03 +0000 (22:05 +0000)]
+ Compiling fix

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12477 d7cf8633-e32d-0410-b094-e92efae38249

5 months agoImplement SDL2 AUDIO_F32 format and use it as the default, since it has become the...
havoc [Sun, 26 May 2019 03:04:36 +0000 (03:04 +0000)]
Implement SDL2 AUDIO_F32 format and use it as the default, since it has become the preferred format of more platforms these days, and SDL2 uses it internally.

Improved the fallback mechanism on SDL2 audio setup - by removing it; SDL2 will tell us what changes it makes for the format, and it will convert the rest automatically.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12476 d7cf8633-e32d-0410-b094-e92efae38249

5 months agoRemove a few unused locals.
havoc [Sun, 26 May 2019 03:01:54 +0000 (03:01 +0000)]
Remove a few unused locals.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12475 d7cf8633-e32d-0410-b094-e92efae38249

9 months agoRemove code for r_equalize_entities*.
divverent [Mon, 4 Feb 2019 15:09:01 +0000 (15:09 +0000)]
Remove code for r_equalize_entities*.

r_fullbright_directed and slapping EF_FULLBRIGHT on these entities works a lot
better. I believe other than Xonotic nobody uses this, and Xonotic used it only
to make some fullbright stuff prettier and that's been removed for a few months
now.

After this change, older Xonotic versions will complain about nonexisting flag
at startup, but I bet no player will even notice the difference - all it changes
is that EF_FULLBRIGHT entities will appear less directionally, and
r_fullbright_directed 1 will fix this in a better way (already set in current
Xonotic).

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12474 d7cf8633-e32d-0410-b094-e92efae38249

9 months agoRemove code for r_fakelight.
divverent [Mon, 4 Feb 2019 15:08:59 +0000 (15:08 +0000)]
Remove code for r_fakelight.

We have r_fullbright_directed now, which uses no shader permutation bit and has
a very similar effect.

Yay, less shaders!

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12473 d7cf8633-e32d-0410-b094-e92efae38249

9 months agoAvoid passing NULLs to glBufferSubData.
divverent [Sun, 3 Feb 2019 02:53:32 +0000 (02:53 +0000)]
Avoid passing NULLs to glBufferSubData.

Fixes crash at startup with Linux intel drivers. Can't tell why it doesn't crash
llvmpipe too.

Sorry, I'm not sure if skipping the entire logic of R_BufferData_Store in this
case is right. It does seem to be though.

If this change is a bad idea, please revert.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12472 d7cf8633-e32d-0410-b094-e92efae38249

9 months agoFix engine not starting on Windows if linked against SDL > 2.0.5
divverent [Sat, 2 Feb 2019 02:48:15 +0000 (02:48 +0000)]
Fix engine not starting on Windows if linked against SDL > 2.0.5

This migrates SDL_OpenAudio -> SDL_OpenAudioDevice et cetera, i.e. with explicit
device handles now.

Changes from DarkplacesRM

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12471 d7cf8633-e32d-0410-b094-e92efae38249

10 months agoFix setinfo.
divverent [Wed, 9 Jan 2019 21:00:36 +0000 (21:00 +0000)]
Fix setinfo.

Repro:

]setinfo
]setinfo tea "earl grey, hot"
]setinfo

This kills the "team=none" info variable.

Also, fix some memory accesses beyond end of string; probably can be
reproduced somehow to cause mayhem.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12470 d7cf8633-e32d-0410-b094-e92efae38249

13 months agoDo not build VBOs on a dedicated server.
divverent [Fri, 19 Oct 2018 07:38:00 +0000 (07:38 +0000)]
Do not build VBOs on a dedicated server.

Fixes crash at startup of dedicated server in Quake and Xonotic
(probably in everything).

The only reason why this ever worked before was that Mod_BuildVBOs's
main callee R_Mesh_CreateMeshBuffer did a GL2 feature test before
calling into anything VBO related (and on a dedicated server, which does
not initialize GL, the test always returns false); however now that we
require GL32, the feature test is gone and thus the crash happened. An
explicit check for being a dedicated server fixes that.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12469 d7cf8633-e32d-0410-b094-e92efae38249

13 months agoRemove unused APIs from cdaudio.h.
divverent [Fri, 19 Oct 2018 07:02:39 +0000 (07:02 +0000)]
Remove unused APIs from cdaudio.h.

These included an internal function of the playlist system which I could
make static as well.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12468 d7cf8633-e32d-0410-b094-e92efae38249

13 months agoMake CDAudio_Play_byName static.
divverent [Fri, 19 Oct 2018 07:02:35 +0000 (07:02 +0000)]
Make CDAudio_Play_byName static.

It isn't called by any other compilation units, but only internally by
other cd_shared.c functions; more importantly, it does not check for
music_playlist being active like CDAudio_Play does, which would at the
very least be confusing if someone were to add a string version of
qw_svc_cdtrack (WHY WOULD ONE).

Thus: no functional change here.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12467 d7cf8633-e32d-0410-b094-e92efae38249

13 months agoRemove the CONFIG_CD macro, and enable faketracks unconditionally.
divverent [Fri, 19 Oct 2018 06:40:49 +0000 (06:40 +0000)]
Remove the CONFIG_CD macro, and enable faketracks unconditionally.

All support for playing back CD-DA has been removed by leaving only the
SDL2 clients, and it is rather unlikely for CD-DA support to come back.
However while doing so, the CONFIG_CD macro was disabled in the makefile
but not the MSVC project, which broke faketracks (i.e. background music
via track003.ogg files) on Linux.

This change removes all #ifdefs for CONFIG_CD as well as its enablement
in the MSVC project, which is basically equivalent to having the feature
always being enabled.

Fixes background music in Quake with ripped music, Nexuiz, Xonotic, and
probably many other DP-based games. Also fixes Xonotic log spam about
gettime(GETTIME_CDTRACK).

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12466 d7cf8633-e32d-0410-b094-e92efae38249

13 months agoRemove GLX build from the travis build script.
divverent [Wed, 17 Oct 2018 16:26:52 +0000 (16:26 +0000)]
Remove GLX build from the travis build script.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12465 d7cf8633-e32d-0410-b094-e92efae38249

14 months agoRemove a duplicate definition of GLDEBUGPROCARB.
havoc [Sun, 9 Sep 2018 01:55:59 +0000 (01:55 +0000)]
Remove a duplicate definition of GLDEBUGPROCARB.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12464 d7cf8633-e32d-0410-b094-e92efae38249

14 months agoRemove a duplicate definition of qglGetPointerv.
havoc [Sun, 9 Sep 2018 01:50:51 +0000 (01:50 +0000)]
Remove a duplicate definition of qglGetPointerv.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12463 d7cf8633-e32d-0410-b094-e92efae38249

14 months agoAdd CONFIG_CAPTURE_VIDEO in VS projects, this was somehow missed by the author of...
havoc [Sun, 9 Sep 2018 01:41:47 +0000 (01:41 +0000)]
Add CONFIG_CAPTURE_VIDEO in VS projects, this was somehow missed by the author of that define.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12462 d7cf8633-e32d-0410-b094-e92efae38249

14 months agoAdded vid_conwidthauto cvar which updates vid_conwidth based on vid_conheight and...
havoc [Sun, 9 Sep 2018 01:39:08 +0000 (01:39 +0000)]
Added vid_conwidthauto cvar which updates vid_conwidth based on vid_conheight and aspect ratio (honoring vid_pixelheight), this defaults on for better usability.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12461 d7cf8633-e32d-0410-b094-e92efae38249

14 months agoAdd GL_ExtensionSupported in vid_null.c because vid_shared.c relies on
havoc [Sun, 9 Sep 2018 00:51:33 +0000 (00:51 +0000)]
Add GL_ExtensionSupported in vid_null.c because vid_shared.c relies on
it.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12460 d7cf8633-e32d-0410-b094-e92efae38249

14 months agoGo back to defining GL enums ourselves rather than relying on SDL_opengl.h on desktop.
havoc [Sun, 9 Sep 2018 00:38:26 +0000 (00:38 +0000)]
Go back to defining GL enums ourselves rather than relying on SDL_opengl.h on desktop.

Relying on SDL_opengl.h broke the dedicated server build which does not rely on SDL - having better code isolation of the OpenGL code would make this hack unnecessary.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12459 d7cf8633-e32d-0410-b094-e92efae38249

14 months agoDon't apply r_showtris and such to the HUD and other UI elements, now that they are...
havoc [Sat, 8 Sep 2018 20:21:44 +0000 (20:21 +0000)]
Don't apply r_showtris and such to the HUD and other UI elements, now that they are rendered as a model this was happening.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12458 d7cf8633-e32d-0410-b094-e92efae38249

15 months agoUse GL3.2 Core Profile context.
havoc [Sun, 12 Aug 2018 22:11:32 +0000 (22:11 +0000)]
Use GL3.2 Core Profile context.

Create and bind a vertex array object at start, since Core Profile requires it, but gains no benefit in performance from using multiple.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12457 d7cf8633-e32d-0410-b094-e92efae38249

15 months agoA bit more cleanup.
havoc [Sun, 12 Aug 2018 21:35:57 +0000 (21:35 +0000)]
A bit more cleanup.

Add back some GLES2 support - it probably doesn't work but it will eventually.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12456 d7cf8633-e32d-0410-b094-e92efae38249

15 months agoRefactored VID_CheckExtensions and GL_Init to GL_Setup.
havoc [Sun, 12 Aug 2018 21:19:01 +0000 (21:19 +0000)]
Refactored VID_CheckExtensions and GL_Init to GL_Setup.

GL_Setup now fetches all GL functions at the start and then verifies extensions after that, and it uses SDL_GL_ExtensionSupported as it should.

Removed a bunch of commandline flags like -noshadow that no longer do anything since we assume GL3.2 features.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12455 d7cf8633-e32d-0410-b094-e92efae38249

15 months agoUse SDL_opengl.h and SDL_opengl_ext.h headers instead of doing our own defines -...
havoc [Sun, 12 Aug 2018 21:02:05 +0000 (21:02 +0000)]
Use SDL_opengl.h and SDL_opengl_ext.h headers instead of doing our own defines - still have to have the qgl function pointers though.

Removed some GLES2 debugging stuff.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12454 d7cf8633-e32d-0410-b094-e92efae38249

15 months agoRemove a lot of OpenGL extension checks.
havoc [Sun, 5 Aug 2018 23:17:18 +0000 (23:17 +0000)]
Remove a lot of OpenGL extension checks.

Rename OpenGL extension functions and defines to core names.

Require the functions for all of the OpenGL3.2 Core Profile functionality - we're not asking for a Core Profile context yet, that will be later.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12453 d7cf8633-e32d-0410-b094-e92efae38249

15 months agoChange a comment and a description to remove mentions of GL_ARB_occlusion_query becau...
havoc [Sun, 5 Aug 2018 22:09:56 +0000 (22:09 +0000)]
Change a comment and a description to remove mentions of GL_ARB_occlusion_query because it is standard in GL3.2.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12452 d7cf8633-e32d-0410-b094-e92efae38249

15 months agoUpload the VBOs for Mod_Mesh models (such as the UI) during Mod_Mesh_Finalize.
havoc [Sun, 5 Aug 2018 21:39:11 +0000 (21:39 +0000)]
Upload the VBOs for Mod_Mesh models (such as the UI) during Mod_Mesh_Finalize.

Refactored the vbooffset handling in models to allow different vertex buffers for each array (this would only happen in the dynamic case when a buffer is recycled - so some code makes that assumption about dynamic buffers when freeing these).

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12451 d7cf8633-e32d-0410-b094-e92efae38249

15 months agoFix UI corruption caused by poor handling of missing VBO with firstvertex > 0.
havoc [Sun, 5 Aug 2018 21:29:44 +0000 (21:29 +0000)]
Fix UI corruption caused by poor handling of missing VBO with firstvertex > 0.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12450 d7cf8633-e32d-0410-b094-e92efae38249

15 months agoFix gl_debug code which was broken as I didn't copy enough of the headers over from...
havoc [Tue, 31 Jul 2018 02:05:57 +0000 (02:05 +0000)]
Fix gl_debug code which was broken as I didn't copy enough of the headers over from another checkout.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12449 d7cf8633-e32d-0410-b094-e92efae38249

15 months agoRemove some unused stuff related to glDrawRangeElements.
havoc [Tue, 31 Jul 2018 01:35:10 +0000 (01:35 +0000)]
Remove some unused stuff related to glDrawRangeElements.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12448 d7cf8633-e32d-0410-b094-e92efae38249

15 months agoMake the VBO handling in RSurf_PrepareVerticesForBatch much more consistent by refact...
havoc [Sun, 29 Jul 2018 23:35:29 +0000 (23:35 +0000)]
Make the VBO handling in RSurf_PrepareVerticesForBatch much more consistent by refactoring it into RSurf_UploadBuffersForBatch.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12447 d7cf8633-e32d-0410-b094-e92efae38249

15 months agoFix a console dprint about shader compilation that was trying to print a 64bit permut...
havoc [Sun, 29 Jul 2018 23:23:36 +0000 (23:23 +0000)]
Fix a console dprint about shader compilation that was trying to print a 64bit permutation number as 32bit.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12446 d7cf8633-e32d-0410-b094-e92efae38249

15 months agoDisable the code path that compiles geometry shaders - we don't currently use any...
havoc [Sun, 29 Jul 2018 23:22:01 +0000 (23:22 +0000)]
Disable the code path that compiles geometry shaders - we don't currently use any of these and the code path is broken.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12445 d7cf8633-e32d-0410-b094-e92efae38249

15 months agoRemove some old fixed-function state tracking that wasn't needed.
havoc [Sun, 29 Jul 2018 23:20:37 +0000 (23:20 +0000)]
Remove some old fixed-function state tracking that wasn't needed.

Add gl_debug implementation which was forgotten in previous change.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12444 d7cf8633-e32d-0410-b094-e92efae38249

15 months agoAssume that GL_EXT_blend_subtract is supported.
havoc [Sun, 29 Jul 2018 23:18:44 +0000 (23:18 +0000)]
Assume that GL_EXT_blend_subtract is supported.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12443 d7cf8633-e32d-0410-b094-e92efae38249

15 months agoAssume that GL_ARB_texture_compression is supported.
havoc [Sun, 29 Jul 2018 23:15:59 +0000 (23:15 +0000)]
Assume that GL_ARB_texture_compression is supported.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12442 d7cf8633-e32d-0410-b094-e92efae38249

15 months agoAdd gl_debug cvar, if enabled the GL context will have GL_ARB_debug_output enabled...
havoc [Sun, 29 Jul 2018 23:12:41 +0000 (23:12 +0000)]
Add gl_debug cvar, if enabled the GL context will have GL_ARB_debug_output enabled, which will print in the console.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12441 d7cf8633-e32d-0410-b094-e92efae38249

15 months agoRemove gl_dither cvar, it isn't supported in GL3.2 Core Profile.
havoc [Sun, 29 Jul 2018 23:04:41 +0000 (23:04 +0000)]
Remove gl_dither cvar, it isn't supported in GL3.2 Core Profile.

Remove unused gl_fbo cvar.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12440 d7cf8633-e32d-0410-b094-e92efae38249

16 months agoOne last edit for the UI rendering with materials change.
havoc [Sun, 1 Jul 2018 08:45:55 +0000 (08:45 +0000)]
One last edit for the UI rendering with materials change.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12439 d7cf8633-e32d-0410-b094-e92efae38249

16 months agoUse the model renderer on the UI - this means q3shaders and other material features...
havoc [Sun, 1 Jul 2018 08:22:40 +0000 (08:22 +0000)]
Use the model renderer on the UI - this means q3shaders and other material features now work.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12438 d7cf8633-e32d-0410-b094-e92efae38249

16 months agoChange MAX_TEXTUREUNITS from 16 to 32 - this fixes a memory corruption that was causi...
havoc [Sat, 30 Jun 2018 21:59:21 +0000 (21:59 +0000)]
Change MAX_TEXTUREUNITS from 16 to 32 - this fixes a memory corruption that was causing all kinds of problems (e.g. cachepic issues).

Get rid of vid.texarrayunits, vid.teximageunits, vid.texunits variables as they are meaningless, assume 32 (because that is how many GL enums exist).

Don't clear texture units on reset, we don't know how many texture units really exist and it's largely pointless.

Do a more thorough unbind of textures on deletion, just for good measure.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12437 d7cf8633-e32d-0410-b094-e92efae38249

17 months agoFix a printf bug in Draw_CachePic so it passes path rather than pic
havoc [Sun, 17 Jun 2018 17:32:36 +0000 (17:32 +0000)]
Fix a printf bug in Draw_CachePic so it passes path rather than pic

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12436 d7cf8633-e32d-0410-b094-e92efae38249

17 months agoRemove cl-release and similar targets from makefile as they no longer exist.
havoc [Sat, 16 Jun 2018 17:46:08 +0000 (17:46 +0000)]
Remove cl-release and similar targets from makefile as they no longer exist.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12435 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoAdd more debugging prints in Draw_CachePic, most of these are for edge cases.
havoc [Tue, 22 May 2018 02:11:13 +0000 (02:11 +0000)]
Add more debugging prints in Draw_CachePic, most of these are for edge cases.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12434 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoClean up GL extensions a bit to only have the stuff the engine actually uses.
havoc [Tue, 22 May 2018 02:09:42 +0000 (02:09 +0000)]
Clean up GL extensions a bit to only have the stuff the engine actually uses.

Remove a few things that offend GL3.2 Core Profile.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12433 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoRename RENDERPATH_GL20 to RENDERPATH_GL32.
havoc [Tue, 22 May 2018 01:43:35 +0000 (01:43 +0000)]
Rename RENDERPATH_GL20 to RENDERPATH_GL32.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12432 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoAdd more CHECKGLERROR calls, and clean up a few obsolete code scraps.
havoc [Tue, 22 May 2018 01:40:17 +0000 (01:40 +0000)]
Add more CHECKGLERROR calls, and clean up a few obsolete code scraps.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12431 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoRemove unused gl20_texunit enum since all of the non-GL paths have been removed and...
havoc [Tue, 22 May 2018 01:33:35 +0000 (01:33 +0000)]
Remove unused gl20_texunit enum since all of the non-GL paths have been removed and the GL path allocates texture units according to usage.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12430 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoRemove use of glPolygonStipple - it will need to be reimplemented in the shader using...
havoc [Tue, 22 May 2018 01:31:16 +0000 (01:31 +0000)]
Remove use of glPolygonStipple - it will need to be reimplemented in the shader using discard, or drawn as an overlay over the area.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12429 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoJust assume GL_ARB_texture_non_power_of_two and a number of other extensions are...
havoc [Sun, 20 May 2018 23:59:04 +0000 (23:59 +0000)]
Just assume GL_ARB_texture_non_power_of_two and a number of other extensions are supported, this simplifies a lot of conditions.

Always use GL_ARB_vertex_buffer_object.

Remove use of glDrawRangeElements as it doesn't exist in GL3.2 Core Profile, and is less necessary with GL_ARB_vertex_buffer_object.

Merge a number of extensions into the core opengl functions.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12428 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoRemove unused light attention textures (2D and 3D) since the GL1 path was removed.
havoc [Sun, 20 May 2018 23:44:22 +0000 (23:44 +0000)]
Remove unused light attention textures (2D and 3D) since the GL1 path was removed.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12427 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoBugfix: Don't use OpenGL 3.2 core context just yet - more fixes needed first.
havoc [Sun, 20 May 2018 23:38:27 +0000 (23:38 +0000)]
Bugfix: Don't use OpenGL 3.2 core context just yet - more fixes needed first.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12426 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoRemove support for libSDL1.2 which has been deprecated for years.
havoc [Sun, 20 May 2018 20:57:46 +0000 (20:57 +0000)]
Remove support for libSDL1.2 which has been deprecated for years.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12425 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoRemove some unused parameters on R_SetupShader_Generic.
havoc [Sun, 20 May 2018 20:43:24 +0000 (20:43 +0000)]
Remove some unused parameters on R_SetupShader_Generic.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12424 d7cf8633-e32d-0410-b094-e92efae38249

18 months agovid_bitsperpixel is now locked to 32.
havoc [Sun, 20 May 2018 20:39:22 +0000 (20:39 +0000)]
vid_bitsperpixel is now locked to 32.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12423 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoRemoved per-platform clients (wgl/glx/agl) - now only SDL2 client
havoc [Sun, 13 May 2018 05:06:07 +0000 (05:06 +0000)]
Removed per-platform clients (wgl/glx/agl) - now only SDL2 client
exists.

Removed dedicated server from VS2017 projects - it's not really needed.

Removed cd_sdl.c since SDL1.2 support is not maintained, and the SDL2
code path in it is equivalent to cd_null.c as SDL2 does not support
controlling cd audio playback - also removed cd_null.c and the
corresponding code in cd_shared.c, which now only uses faketrack mode.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12422 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoRemove r_vertexgeneric_t, r_vertexmesh_t, vid.interleavedarrays and code related...
havoc [Sun, 6 May 2018 04:39:34 +0000 (04:39 +0000)]
Remove r_vertexgeneric_t, r_vertexmesh_t, vid.interleavedarrays and code related to them.

Refactor r_showsurfaces code to modify the rsurface.batchlightmapcolor4f in place instead of using the R_Mesh_PrepareVertices_Generic_Lock/Unlock functions which have been removed.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12421 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoFix more Mod_ValidateElements sequencing issues - always generate
havoc [Sat, 5 May 2018 19:20:15 +0000 (19:20 +0000)]
Fix more Mod_ValidateElements sequencing issues - always generate
element3s before calling it, or don't pass element3s at all.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12420 d7cf8633-e32d-0410-b094-e92efae38249

18 months agomake precache_pic not use the fallback image
havoc [Sat, 5 May 2018 18:54:37 +0000 (18:54 +0000)]
make precache_pic not use the fallback image

(reported by terencehill)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12419 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoFix a bug in MD3 model loading that caused warnings from
havoc [Sat, 5 May 2018 08:54:40 +0000 (08:54 +0000)]
Fix a bug in MD3 model loading that caused warnings from
Mod_ValidateElements.

Fix a bug in the output of Mod_ValidateElements which did not show the
mismatching elements correctly.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12418 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoSimplify Mod_ShadowMesh_* functions - removed support for every unused feature of...
havoc [Fri, 4 May 2018 04:37:14 +0000 (04:37 +0000)]
Simplify Mod_ShadowMesh_* functions - removed support for every unused feature of shadowmeshes (e.g. texcoords, and linked list meshes).

Add back Mod_CreateCollisionMesh which was mistakenly removed.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12417 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoRemove Mod_CreateCollisionMesh and reduce the exposed API of Mod_ShadowMesh, it reall...
havoc [Wed, 2 May 2018 07:23:56 +0000 (07:23 +0000)]
Remove Mod_CreateCollisionMesh and reduce the exposed API of Mod_ShadowMesh, it really doesn't need to support most of the things it supports as only compiled shadowmaps use it now.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12416 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoRemove model->surfmesh.shadowmesh which was a vertex-welded version of the regular...
havoc [Wed, 2 May 2018 07:17:13 +0000 (07:17 +0000)]
Remove model->surfmesh.shadowmesh which was a vertex-welded version of the regular surfmesh, we don't need that as we're not computing triangle neighbors as shadow volume support was removed.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12415 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoRemove shadowvolume rendering entirely, now shadowmaps are the only kind of shadow.
havoc [Wed, 2 May 2018 07:00:12 +0000 (07:00 +0000)]
Remove shadowvolume rendering entirely, now shadowmaps are the only kind of shadow.

Also remove R_SetStencilSeparate and corresponding gl bindings since it isn't needed (R_SetStencil could also be removed but it might have uses).

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12414 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoRefactored and improved Mod_ValidateElements so it also validates element3s and has...
havoc [Tue, 1 May 2018 06:49:00 +0000 (06:49 +0000)]
Refactored and improved Mod_ValidateElements so it also validates element3s and has more useful output.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12413 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoFix a crash on Doombringer duel5.bsp where one of the lights has more than 32768...
havoc [Tue, 1 May 2018 06:48:05 +0000 (06:48 +0000)]
Fix a crash on Doombringer duel5.bsp where one of the lights has more than 32768 triangles - this was using more than one shadowmesh and the sidetotals code was written incorrectly to assume there is a single shadowmesh per light - so now shadowmeshes are preallocated large enough for the entire model, to ensure there is only one.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12412 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoGenerate a pvs for refraction renders just like for reflection renders, this fixes...
havoc [Tue, 1 May 2018 02:48:46 +0000 (02:48 +0000)]
Generate a pvs for refraction renders just like for reflection renders, this fixes a water rendering issue in the Doombringer map duel2.bsp where certain leafs did not include the necessary pvs data (or something was wrong with how the renderer used the existing vis data).

In light of the above, allow r_wateralpha when r_water is used, even if the bsp is not watervised - this works for all non-recursive cases (so the elder hall water pool in start.bsp is still broken).

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12411 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoFix a missing newline in system vars mismatch warning.
havoc [Tue, 1 May 2018 02:21:46 +0000 (02:21 +0000)]
Fix a missing newline in system vars mismatch warning.

Fix a typo in r_shadow_culllights_trace_pad which made it not work.

Fix the name used on index buffers for Mod_ShadowMesh geometry - loadmodel->name doesn't make sense given where this is called.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12410 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoFix lighting origins on CSQC entities.
havoc [Mon, 30 Apr 2018 21:59:24 +0000 (21:59 +0000)]
Fix lighting origins on CSQC entities.

Fix a couple crashes with showtex 1 on level change where prog is not fully initialized.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12409 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoFix clipping plane bug on r_water - a line had been deleted when removing RENDERPATH_...
havoc [Mon, 30 Apr 2018 19:54:49 +0000 (19:54 +0000)]
Fix clipping plane bug on r_water - a line had been deleted when removing RENDERPATH_SOFT that should have stayed.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12408 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoFix bugs with unloading of cachepic skinframes in QC menus - the reloading was broken...
havoc [Mon, 30 Apr 2018 06:38:44 +0000 (06:38 +0000)]
Fix bugs with unloading of cachepic skinframes in QC menus - the reloading was broken in some weird way that made it white (it wasn't reusing the skinframe).

Simplify Draw_CachePic behaviors with regards to NewPic and textureflags (mismatch now causes texture reload rather than having multiple with the same name in memory).

Improved reloading of unloaded pics by reusing the existing skinframe, so it can not produce duplicates.

Make Draw_NewPic clear the pic->autoload flag, this is a behavior change in VM_CL_ReadPicture.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12407 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoFix a typo in DrawQ_RotPic which broke it badly.
havoc [Sun, 29 Apr 2018 10:27:38 +0000 (10:27 +0000)]
Fix a typo in DrawQ_RotPic which broke it badly.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12406 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoFix multiple bugs with ft2 font loading that were caused by the switch to cachepic...
havoc [Sun, 29 Apr 2018 10:16:09 +0000 (10:16 +0000)]
Fix multiple bugs with ft2 font loading that were caused by the switch to cachepic and skinframe.

R_Skinframe_LoadExternal now uses comparecrc = -1 to allow the shader loading to find the skinframe for an ft2 font.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12405 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoDefault vid_desktopfullscreen to 1.
havoc [Sun, 29 Apr 2018 09:34:22 +0000 (09:34 +0000)]
Default vid_desktopfullscreen to 1.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12404 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoFix the menu for missing data, it needs to use CACHEPICFLAG_FAILONMISSING or the...
havoc [Sun, 29 Apr 2018 09:32:21 +0000 (09:32 +0000)]
Fix the menu for missing data, it needs to use CACHEPICFLAG_FAILONMISSING or the Draw_IsPicLoaded call will never fail.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12403 d7cf8633-e32d-0410-b094-e92efae38249

18 months agoFix Image_GenerateNoTexture, it was using a wrong stride, resulting in a very bogus...
havoc [Sun, 29 Apr 2018 09:23:09 +0000 (09:23 +0000)]
Fix Image_GenerateNoTexture, it was using a wrong stride, resulting in a very bogus image with the bottom half being black.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12402 d7cf8633-e32d-0410-b094-e92efae38249

19 months agoRemove the last remnants of DPSOFTRAST support in vid_glx.c.
havoc [Fri, 20 Apr 2018 06:06:03 +0000 (06:06 +0000)]
Remove the last remnants of DPSOFTRAST support in vid_glx.c.

Remove some dead files.

Fix some warnings on CL_MeshEntities functions that should have been
static.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12401 d7cf8633-e32d-0410-b094-e92efae38249

19 months agoFix a prvm_int_t variable that was being passed directly to printf.
havoc [Fri, 20 Apr 2018 05:59:25 +0000 (05:59 +0000)]
Fix a prvm_int_t variable that was being passed directly to printf.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12400 d7cf8633-e32d-0410-b094-e92efae38249

19 months agoRemove all render paths except GL20/GLES2. This means no DPSOFTRAST, no DX9 support...
havoc [Fri, 20 Apr 2018 05:36:20 +0000 (05:36 +0000)]
Remove all render paths except GL20/GLES2.  This means no DPSOFTRAST, no DX9 support, no GL1.1/GL1.3 support.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12399 d7cf8633-e32d-0410-b094-e92efae38249

19 months agoReworked v_isometric code significantly, it now defaults to a proper isometric view...
havoc [Sun, 15 Apr 2018 23:23:11 +0000 (23:23 +0000)]
Reworked v_isometric code significantly, it now defaults to a proper isometric view and some maps are actually playable like this.

Added R_Viewport_InitOrtho3D which more correctly implements the VF_PERSPECTIVE=0 case for CSQC, with correct camera orientation and all that.  This may break existing mods that tried to use that feature but I doubt there are any as it was pretty broken before.

Reworked how R_CanSeeBox (and other vis code) determine if the view is able to use vieworigin based culling or not, this is now a separate property (r_refdef.view.usevieworiginculling) and can be turned on or off for reflection views and such.  This is also exposed as v_isometric_usevieworiginculling for the v_isometric case.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12398 d7cf8633-e32d-0410-b094-e92efae38249

19 months agoChanged how polygonbegin guesses if the geometry is 2D or 3D, it now uses a separate...
havoc [Sun, 15 Apr 2018 23:17:19 +0000 (23:17 +0000)]
Changed how polygonbegin guesses if the geometry is 2D or 3D, it now uses a separate variable rather than relying on r_refdef.draw2dstage.

Reworked DrawQ_* and R_RenderView code to make clear distinctions between 2D and 3D code, this removes a lot of unnecessary calls to DrawQ_FlushUI (including ones that happened in R_RenderView).

Added R_DebugLine which takes a line in world coordinates and adds it as a 2D line in CL_Mesh_UI.

Added r_showparticleedges and r_showspriteedges debugging cvars which make use of R_DebugLine.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12397 d7cf8633-e32d-0410-b094-e92efae38249

19 months agoAdded v_isometric cvars, this mode is mostly a curiosity but it's useful for testing...
havoc [Sat, 14 Apr 2018 06:54:35 +0000 (06:54 +0000)]
Added v_isometric cvars, this mode is mostly a curiosity but it's useful for testing engine compatibility with non-perspective rendering.

Fixed a few bugs where distance culling was misbehaving with non-perspective rendering.

Make r_refdef.view.ismain more useful - it's now cleared after R_RenderView rather than before, so R_RenderView can make use of it (for r_motionblur ghost texture updates and anything else that wants to happen just on the main view).

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12396 d7cf8633-e32d-0410-b094-e92efae38249

19 months agoAdded r_cullentities_trace_expand and pad cvars, these configure additional ways...
havoc [Sat, 14 Apr 2018 05:20:44 +0000 (05:20 +0000)]
Added r_cullentities_trace_expand and pad cvars, these configure additional ways to expand entity boxes when culling by traceline.

Added r_vis_trace feature which allows you to turn on traceline-based culling of portals, and r_vis_trace_surfaces lets you cull surfaces by traceline (slow and probably pointless, but a curious feature).

Added r_shadow_culllights_trace_expand and pad cvars.

Added sv_cullentities_trace_expand to make SV_CanSeeBox be at feature parity with R_CanSeeBox.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12395 d7cf8633-e32d-0410-b094-e92efae38249

19 months agoFix two pieces of code that did not compile with PRVM_64.
havoc [Sat, 14 Apr 2018 05:11:44 +0000 (05:11 +0000)]
Fix two pieces of code that did not compile with PRVM_64.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12394 d7cf8633-e32d-0410-b094-e92efae38249

19 months agoEnable PRVM_64 - the QuakeC VM will run as 64bit (using int64/double rather than...
havoc [Sat, 14 Apr 2018 04:34:54 +0000 (04:34 +0000)]
Enable PRVM_64 - the QuakeC VM will run as 64bit (using int64/double rather than int/float).

This means that levels can run for > 10 hours without time precision issues, and float flags values can have flags ranging up to 54 bits rather than 24 bits.

There may be bugs, and physics is still using 32bit floats in a bunch of places so this does not enable huge worlds currently.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12393 d7cf8633-e32d-0410-b094-e92efae38249

19 months agoCheck r_showtris cvar as a float rather than integer - can now use fractional brightness.
havoc [Sat, 14 Apr 2018 04:26:28 +0000 (04:26 +0000)]
Check r_showtris cvar as a float rather than integer - can now use fractional brightness.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12392 d7cf8633-e32d-0410-b094-e92efae38249

19 months agoFix incorrect layer color values that caused models to be completely black in RENDERP...
havoc [Fri, 13 Apr 2018 05:31:46 +0000 (05:31 +0000)]
Fix incorrect layer color values that caused models to be completely black in RENDERPATH_GL1*.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12391 d7cf8633-e32d-0410-b094-e92efae38249

19 months agoMade RENDERPATH_GL20 require fbo support and always use it.
havoc [Fri, 13 Apr 2018 05:20:44 +0000 (05:20 +0000)]
Made RENDERPATH_GL20 require fbo support and always use it.

Implemented R_RenderTarget system for managing fbo and texture requests dynamically, reusing the same ones across frames - this means that the textures are now allocated much smaller and there is better handling of multiple CSQC viewports.

In the short-term this means that vid_samples antialiasing doesn't do anything, it will need to be reimplemented using fbo.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12390 d7cf8633-e32d-0410-b094-e92efae38249

19 months agoFix some viewport issues with r_viewfbo and r_bloom by passing view size information...
havoc [Fri, 13 Apr 2018 05:00:22 +0000 (05:00 +0000)]
Fix some viewport issues with r_viewfbo and r_bloom by passing view size information when calling the various rendering subsystems - there are still a bunch of bugs but this is a temporary measure before rendertargets are put in.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12389 d7cf8633-e32d-0410-b094-e92efae38249

19 months agoCSQC polygonbegin functionality now uses the CL_MeshEntities system, this finally...
havoc [Fri, 13 Apr 2018 02:23:34 +0000 (02:23 +0000)]
CSQC polygonbegin functionality now uses the CL_MeshEntities system, this finally makes it possible to use shaders on those polygons.

UI elements (DrawQ_ system) now use the CL_MeshEntities system, but still renders the mesh the old way, shader support is planned.

DrawQ_Line no longer uses GL_LINES, it now produces a polygon in the CL_MeshEntities system, so shownetgraph and r_speeds_graph features now work on D3D9/DPSOFTRAST/GLES2 render paths.

Added MATERIALFLAG_VERTEXCOLOR as a special case for rgbgen vertex shaders that are being used by CL_MeshEntities meshes, currently this is an unlit type of material but lighting support for it is planned.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12388 d7cf8633-e32d-0410-b094-e92efae38249

19 months agoDefault scr_loadingscreen_background to 1, and also a fix for sRGB issues with the...
havoc [Thu, 12 Apr 2018 22:08:34 +0000 (22:08 +0000)]
Default scr_loadingscreen_background to 1, and also a fix for sRGB issues with the loadingscreen background.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12387 d7cf8633-e32d-0410-b094-e92efae38249

19 months agoFix a bug where R_GetTexture could return 0 rather than a white texture.
havoc [Thu, 12 Apr 2018 21:44:41 +0000 (21:44 +0000)]
Fix a bug where R_GetTexture could return 0 rather than a white texture.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12386 d7cf8633-e32d-0410-b094-e92efae38249

19 months agoAdded Draw_GetPicWidth, Draw_GetPicHeight, Draw_IsPicLoaded functions and moved cache...
havoc [Wed, 11 Apr 2018 05:28:24 +0000 (05:28 +0000)]
Added Draw_GetPicWidth, Draw_GetPicHeight, Draw_IsPicLoaded functions and moved cachepic_t to live in gl_draw.c (no longer visible to other modules).

Changed Draw_CachePic to use the R_SkinFrame_LoadExternal system, and reworked font loading to use Draw_CachePic rather than keeping track of textures itself.  R_SkinFrame_LoadExternal can now load gfx.wad lumps and gfx/*.lmp files, and the embedded images have been moved to image.c as they are now returned as raw images, suitable for R_SkinFrame_LoadExternal to use.

Reworked cl_video code to not need the cl_dyntexture system (which has been removed); it still uses dynamic texture callbacks (which is a feature of rtexture_t).

Changed the parameters to Mod_LoadCustomMaterial and a few other model_shared.c functions to not assume loadmodel is the owner of memory and textures; this was necessary for Draw_CachePic to be able to use R_SkinFrame_LoadExternal.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12385 d7cf8633-e32d-0410-b094-e92efae38249

19 months agoRemove the model parameter from NativeContentsFromSuperContents/SuperContentsFromNati...
havoc [Tue, 10 Apr 2018 06:59:02 +0000 (06:59 +0000)]
Remove the model parameter from NativeContentsFromSuperContents/SuperContentsFromNativeContents functions, none of the current formats need it.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12384 d7cf8633-e32d-0410-b094-e92efae38249

19 months agoEnable GL_OES_framebuffer_object on Android - it was broken in Android 2.1 but that...
havoc [Tue, 10 Apr 2018 05:11:30 +0000 (05:11 +0000)]
Enable GL_OES_framebuffer_object on Android - it was broken in Android 2.1 but that's been irrelevant for years.

Remove prototype for R_Init, it doesn't exist.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12383 d7cf8633-e32d-0410-b094-e92efae38249

19 months agoDon't bother setting anisotropy on textures twice during startup.
havoc [Tue, 10 Apr 2018 05:10:08 +0000 (05:10 +0000)]
Don't bother setting anisotropy on textures twice during startup.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12382 d7cf8633-e32d-0410-b094-e92efae38249

19 months agoRemove v_glslgamma cvar (now assumed to be 1) and corresponding code like R_DrawGamma.
havoc [Tue, 10 Apr 2018 05:09:08 +0000 (05:09 +0000)]
Remove v_glslgamma cvar (now assumed to be 1) and corresponding code like R_DrawGamma.

RENDERPATH_GL1* paths no longer support bloom.

Fix a bug in D3D9 renderpath where SHADERPERMUTATION_GAMMARAMPS would crash due to using the wrong variable for the texture unit.

Enable GL_ARB_texture_non_power_of_two on OSX again - the old OSX versions and corresponding hardware that had issues are long gone.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12381 d7cf8633-e32d-0410-b094-e92efae38249