Zack Middleton
2dcc5719e3
Explicitly set cull type for skybox
...
Explicitly set cull type for skybox to front, instead of using whatever
cull type the previous shader used (which could result in the skybox
not being visible due to only drawing back faces). The sky cloud stages
set the cull type so they are not affected by previous cull type.
2016-05-16 03:17:03 -05:00
Zack Middleton
41f83ac8b0
Replace 4 with sizeof( int ) in R_GetCommandBufferReserved
2015-10-17 21:58:11 -05:00
Zack Middleton
81e2b6c0cf
Fix reserved size for swap buffer command being too small on x86_64
2015-10-16 20:50:25 -05:00
Zack Middleton
e6209f3b7c
Fix crash from reading past end of tr.refdef.drawSurfs
...
The number of draw surfaces was range checked against number of surfaces for
the current view but needs to check total for the frame otherwise can read
past the end of the tr.refdef.drawSurfs array when there are multiple views.
2015-10-16 20:21:15 -05:00
Zack Middleton
8531162bd9
Fix not swapping buffers because out of cmd buffer space
...
Reserve space for end of list and swap buffer commands. These are absolutely
required and cannot be dropped. Dropping swap buffer command causes screen
to not update and possible crash from drawsurf buffer overflow if not enough
cmd buffer space for many continous frames.
2015-10-16 19:38:49 -05:00
Zack Middleton
ce35188acd
Add support for uncompressed image upload flag to OpenGL1
2015-10-16 03:29:27 -05:00
Zack Middleton
7f4b34bf09
Remove unused define MAC_EVENT_PUMP_MSEC
2015-10-04 17:20:56 -05:00
Zack Middleton
a5fbc1bfc4
Fix alloc size for default skin and single shader skin
...
Found by Coverity.
2015-07-12 20:41:47 -05:00
Zack Middleton
9f57fea0ee
Backport ignoring values outside lightgrid to OpenGL1
...
Fixes possibly of reading memory past end of lightGridData or reading
wrong light grid data (wrapping around to next row).
2015-07-12 18:17:57 -05:00
Zack Middleton
1bb2bc370d
Fix OpenGL2 ignoring last light grid point on each axis
...
Also change light grid bounds clamping to make it more clear what invalid
values are.
2015-07-09 22:42:01 -05:00
Zack Middleton
b152cf1423
Don't fog 3D crosshair sprite
2015-07-04 19:33:28 -05:00
Zack Middleton
5e575ae82e
Apply greyscaling to fog blocks
2015-07-04 19:17:58 -05:00
Zack Middleton
f110f668bf
Move image load function prototypes to tr_common.h
...
The functions themselves are in code/renderercommon/tr_image_*.c
2015-06-12 14:22:37 -05:00
Zack Middleton
c755d75a5e
Fix MDR surface indexes overflow check
...
Also, use the check overflow macro like everywhere else.
2015-03-25 15:41:03 -05:00
Ensiform
43c7f1e734
Inform how many shader stages the max is in the warning message
2015-01-26 02:39:59 -06:00
Zack Middleton
c787cf3aef
Fix stencil shadows not drawing if has 500 or more vertexes
...
Stencil shadow is not drawn if a mesh, or multiple meshes with the same
entity and shader, have more than 500 vertexes. The issue is caused by storing
the projected positions in the tess vertex buffer. Use a new array instead.
2014-11-16 21:21:30 -06:00
Zack Middleton
d06deb41c8
Don't set fog image border color
...
GL1's R_CreateImage sets GL texture to 0 before it ends, so border color is not
applied to the fog image. GL_CLAMP is not used for fog image (in either renderer),
so it would presumably not be used even if applied to the fog image.
2014-11-16 14:59:09 -06:00
Zack Middleton
60d28722ef
Remove unfinished OpenGL display list code
...
It seems unlikely anyone is going to do anything with this aside from stub
it out in OpenGLES ports.
2014-11-16 14:57:13 -06: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
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
Zack Middleton
a955d975b7
Add function for clearing global shader instead of duplicating the code
2014-09-27 01:35:35 -05:00
Tim Angus
d38039f975
Fix renderergl1 warnings
2014-09-01 11:31:39 +01:00
Tim Angus
621a72e698
Fix a few warnings
2014-08-30 17:29:23 +01:00
Zack Middleton
e742952db8
Port COM_ParseExt fixes to CommaParse
2014-08-28 20:34:05 -05:00
Zack Middleton
e5f54c584a
Fix incorrect rgbGen const reading uninitialized memory
...
If ParseVector fails, color isn't fully set.
2014-08-27 20:35:16 -05:00
Zack Middleton
107cae63d6
Merge branch 'master' into sdl2
...
Conflicts:
.travis.yml
2014-06-03 00:52:49 -05:00
Zack Middleton
eeeaf3f125
Fix potential buffer overflow caused by long tcMod args
...
Found by Coverity.
2014-05-25 18:44:17 -05:00
Zack Middleton
3a7298d6ae
Make R_LerpTag return qfalse if MDR tag does not exist
...
Elite Force SDK has trap_R_LerpTag return void, so this shouldn't cause issues for iostvef.
Allows new games to check if a tag exists in a MDR model.
2014-05-06 21:10:16 -05:00
Zack Middleton
c55df2c9aa
Merge branch 'master' into sdl2
2014-03-24 17:53:08 -05:00
Zack Middleton
73aa7ef2c7
Merge branch 'master' (early part) into sdl2
2014-03-24 17:51:57 -05:00
Zack Middleton
9f3fd12501
Remove unused extern qboolean charSet
...
No variable even exists.
2014-03-24 12:47:14 -05:00
Tequila
baca82d64e
Bunch of comment fixes
2014-03-13 02:20:54 +01:00
Zack Middleton
63d1911c18
Parse q3map_sunExt in OpenGL1 too
...
Used for drawing sun, which is supported by both OpenGL1 and OpenGL2.
OpenGL2 already parses it.
2014-03-11 12:38:53 -05:00
Zack Middleton
07290a7d52
Fix typo in animMap and videoMap warnings
2014-03-10 19:58:55 -05:00
Zack Middleton
c8c7bb1dc3
Fix R_GetEntityToken ending prematurely
...
If spawn var key or value is "" it caused R_GetEntityToken (available to
cgame, used by opengl2) to stop parsing, whereas game VM would continue.
Changed it to match parsing used for game VM
(see G_GET_ENTITY_TOKEN in code/server/sv_game.c).
The map poq3dm5 has a "wait" key with value "".
2014-03-10 16:27:31 -05:00
Zack Middleton
ed087bb89e
Merge branch 'master' into sdl2
2014-02-07 23:24:12 -06:00
Zack Middleton
cc9072d098
Check for buffer overflow for rail/lightning surfaces
2014-01-25 21:15:36 -06:00
IR4T4
ca23b626a0
r_noborder changes require a restart
2013-12-06 23:29:47 -06:00
Zack Middleton
973a616061
Fix white flash levelshot bug in OpenGL1
...
If you tried to draw the last loaded image, gl texture 0 (which is appearently white)
was used because renderer thought the image was already bound.
Why OpenGL1 renderer binds texture 0, I have no idea. It's been removed from OpenGL2.
2013-12-06 23:06:52 -06:00
Zack Middleton
0a4da32d62
Remove R_AddAnimSurfaces and R_MakeAnimModel prototypes
2013-11-30 03:16:05 -06:00
SmileTheory
6f3edb20b8
#6069 : Remove md4 model support.
2013-11-29 16:13:47 -08:00
Zack Middleton
ad514c9689
Merge branch 'master' into sdl2
2013-11-26 16:57:10 -06: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
Zack Middleton
3736968943
Merge branch 'master' into sdl2
2013-11-17 19:01:35 -06:00
Zack Middleton
d526eacd10
Fix flares being invisible after vid_restart
...
flareCoeff was only set if r_flareCoeff cvar was set as modified.
Cvars are set as modified when created or changed.
2013-11-09 16:57:58 -06:00
Tim Angus
779ebfacfd
Merge branch 'master' into sdl2
2013-11-02 19:12:52 +00:00
Zack Middleton
ae0e09aba9
Remove vertexLightmap from textureBundle_t, it's never qtrue
2013-11-02 02:59:31 -05:00
Zack Middleton
6bd52de44e
Remove unused shader state code from tr_local.h
2013-11-02 02:35:59 -05:00
Zack Middleton
611d913443
Initialize blendIndexesType and blendWeightsType
2013-10-29 23:18:05 -05:00
Zack Middleton
f55bb272b6
Fix IQM comments refering to IQM_BYTE instead of IQM_UBYTE
2013-10-29 23:11:32 -05:00