Commit Graph

57 Commits

Author SHA1 Message Date
Zack Middleton d717aaf01e Merge branch 'master' into game/eliteforce
Conflicts:
	code/renderergl1/tr_init.c
	code/renderergl2/tr_init.c
2018-08-13 16:31:09 -05:00
Zack Middleton 39e2113c73 OpenGL2: Misc fixes and cleanup
Fix two constants in GLSL shaders. Remove f suffix from float and fix
int to float assignment. They were causing shader compile errors in
OpenGL ES 2 context.

Remove disabling clip plane. Clip plane is unused and never enabled in
the opengl2 renderer. Remove disabling it to avoid causing a GL error
when using OpenGL 3.2 core profile or OpenGL ES.

Make VAO cache vertex stride be size of srfVert_t since that is what
is uploaded to the GPU. No behavior change. There is a disabled debug
id in srfVert_t though which if enabled changes srfVert_t size.
2018-07-20 23:40:35 -05:00
Zack Middleton e45538b1c5 Merge branch 'master' into game/eliteforce
Conflicts:
	README.md
	code/server/sv_client.c
2018-03-03 19:27:28 -06:00
Edward Betts fe42b8653d Correct spelling mistakes. 2017-11-22 01:40:20 -06:00
Zack Middleton 4837f4619e Merge branch 'master' into game/eliteforce
Conflicts:
	code/client/cl_main.c
	code/qcommon/common.c
	code/qcommon/files.c
	code/qcommon/msg.c
	code/qcommon/q_shared.h
	code/renderercommon/tr_common.h
	code/renderergl2/tr_extensions.c
	code/sdl/sdl_glimp.c
2017-09-17 23:16:55 -05:00
Zack Middleton 59b1262b82 Fix floating point precision loss in renderer [part 2]
Fix floatTime using float precision instead of double using GCC.
Fix R_BindAnimatedImage to be in sync with function table.
Fix vertexDeform bulge, vertexDeform normals, noise wave function
at high level time.

Revert unnecessary float -> double conversions.
2017-08-03 00:14:22 -05:00
Zack Middleton 30fdd88c9f Fix floating point precision loss in renderer [part 1]
Patch for https://bugzilla.icculus.org/show_bug.cgi?id=5931 by
Eugene C. from 2013 plus recent fix for tcMod rotate.

I merged the changes into the OpenGL2 renderer though the fix for
tcMod turb doesn't translate.
2017-08-02 23:44:44 -05:00
SmileTheory 786f6fc525 whoops, left a bit of debugging enabled 2017-07-14 16:26:41 -07:00
SmileTheory 6f1712dafe OpenGL2: "Fix" cg_shadows 4. 2017-07-14 16:15:02 -07:00
SmileTheory 6a77f4e363 OpenGL2: Don't do MSAA resolve/shadow mask/SSAO on shadow views. 2017-07-14 15:42:41 -07:00
SmileTheory d549b642bc OpenGL2: Use an OpenGL 3.2 core context if available. 2017-07-13 12:03:10 -07:00
Zack Middleton 66fec1b059 Remove unneeded code from OpenGL2's RB_RenderDrawSurfList
Make it more similar to OpenGL1.
2017-06-03 14:03:09 -05:00
SmileTheory 0672905ef1 OpenGL2: Detect Intel graphics and avoid/use certain operations there.
Also use qglCopyTextureSubImage2DEXT instead of qglCopyTextureImage2DEXT.
2016-12-07 22:30:55 -08:00
SmileTheory 2349ef038e OpenGL2: Don't interleave texCoords and lightCoords in tess. 2016-11-25 01:17:46 -08:00
SmileTheory aa79738c50 OpenGL2: Store vertex colors and hdr lightmaps/lightgrid as RGBA16. 2016-10-11 03:28:20 -07:00
SmileTheory 4faf1008a0 OpenGL2: Remove map color scaling and r_forceSunMapLightScale.
Also simplify overbright code in ComputeShaderColors().
2016-09-14 02:59:54 -07:00
SmileTheory e022abeebb OpenGL2: Fix GL_EXT_direct_state_access function names. 2016-07-28 20:04:25 -07:00
SmileTheory 716438168f OpenGL2: Use loader for all extension funcs. 2016-07-26 00:41:31 -07:00
SmileTheory 251c983681 OpenGL2: Require OpenGL 2.0. 2016-07-24 21:29:13 -07:00
Zack Middleton 69f9c7d692 Merge branch 'master' into game/eliteforce
Conflicts:
	Makefile
	code/qcommon/q_shared.h
2016-06-17 02:22:52 -05:00
SmileTheory 1f6703821f OpenGL2: Some FBO cleanup, and add non-depth blur to blur shader. 2016-04-05 02:37:05 -07:00
SmileTheory 93e1feaaad OpenGL2: More ssao/depth blur improvements. 2016-03-11 04:37:50 -08:00
SmileTheory 87cb2167bf OpenGL2: Fixes to depth blur and ssao. 2016-03-10 03:44:21 -08:00
SmileTheory 65b999446d OpenGL2: Speedup for SSAO & blur shaders, fix sunlight normals in lightall. 2016-03-08 18:30:51 -08:00
SmileTheory 90d6f941f8 OpenGL2: Add r_shadowBlur. 2016-03-07 02:27:03 -08:00
SmileTheory 871872689e OpenGL2: Add named cubemaps and per-map env.json parsing. 2016-02-10 16:25:32 -08:00
SmileTheory 558da25277 OpenGL2: Some FBO related cleanup/fixes. 2016-01-21 22:31:41 -08:00
SmileTheory 275317fefb OpenGL2: Direct state access, part 1: Texture binds 2016-01-18 04:46:01 -08:00
SmileTheory e2b2437966 OpenGL2: Add r_cubemapSize. 2015-12-24 16:34:58 -08:00
SmileTheory c3216f54d2 OpenGL2: Replace r_exportCubemaps cvar with exportCubemaps command. 2015-12-23 09:58:11 -08:00
SmileTheory f9c72eee69 OpenGL2: Parse radius entries from misc_cubemap entities. 2015-12-09 02:00:40 -08:00
Zack Middleton 7f4b34bf09 Remove unused define MAC_EVENT_PUMP_MSEC 2015-10-04 17:20:56 -05:00
Zack Middleton 956bea9cda Merge branch 'master' into game/eliteforce 2015-03-23 23:54:32 -05:00
SmileTheory 40cfbc9a82 OpenGL2: Fix culling again. 2015-03-12 21:44:06 -07:00
Zack Middleton 6557800707 Merge branch 'master' into game/eliteforce 2014-12-02 17:40:09 -06:00
SmileTheory 8c7fedb1fe OpenGL2: Fix face culling. 2014-11-30 21:50:33 -08:00
Zack Middleton 22bcda018b Correct a few OpenGL variable types
Affectly no change for desktop OpenGL.
Use correct types for OpenGLES support.
2014-11-16 14:56:43 -06:00
Zack Middleton ccd93c127b Port Elite Force renderer changes to OpenGL2
Appling the diff to renderergl2 mostly worked.

Had to change GLimp_HaveExtension to use GL_EXTENTIONS
directly because Elite Forces GL2 requires an extension that didn't fit in (the smaller than Q3)
glConfig.extensions_string.

Had to set ambientLight for RF_FULLBRIGHT, GL2 doesn't use ambientLightInt.

Made the RF_FORCE_ENT_ALPHA code change pStage->stateBits because the stateBits
are read a lot, whereas in GL1 it's done as an expression and passed to GL_State.
Copied from Spearmint.

There are a few issues; holodeck doors are missing and parts of light grid are black (???).
2014-10-29 09:00:23 -05:00
Zack Middleton 1ba9e7a45e Always use GL_Cull to change cull state
Manually changing cull state can cause later GL_Cull calls to not change
the cull state.
2014-10-29 01:32:50 -05:00
SmileTheory 0578b70f38 OpenGL2: Reduce redundant GL calls. 2014-10-14 06:15:06 -07:00
Zack Middleton 918eed9295 OpenGL2: Don't segfault if r_ext_multitexture is disabled 2014-09-29 01:02:13 -05:00
SmileTheory 2b2d696f12 OpenGL2: Add fourth cascade for sun shadows, and adjust sun shadow cvar defaults. 2014-07-31 21:01:57 -07:00
SmileTheory eea652f5c5 Don't create images/framebuffers that won't be used, and add checks before use. 2014-01-12 20:52:36 -08:00
Zack Middleton 8af9516e88 End current draw surface before drawing cinematic
Fixes drawing StretchPic *before* CIN_DrawCinematic resulting
in cinematic being drawn before the StretchPic.
2013-11-20 21:37:17 -06:00
SmileTheory c350963bf2 OpenGL2: Match glsl data type names: matrix_t -> mat4_t, vec*i_t -> ivec*_t 2013-11-19 03:23:50 -08:00
SmileTheory 8c3ae8d7d2 OpenGL2: Reimplement soft overbright to avoid a framebuffer blit. 2013-11-05 00:08:59 -08:00
SmileTheory 7e875c6941 #5979: Cubemap support for opengl2. 2013-09-16 00:54:26 -07:00
SmileTheory 311376af8a Fix upside-down SSAO. 2013-08-23 01:51:58 -07:00
SmileTheory aff3f18101 #5889: Do post-processing only on viewport portion of frame buffer. 2013-04-26 18:49:48 -07:00
Tim Angus 98360bcd57 Fix some of the things clang --analyze flagged 2013-03-26 16:50:03 +00:00