Fix glsl_restart with material system#1507
Conversation
0d00485 to
e639ae3
Compare
fddf9d2 to
275e96b
Compare
|
Made it just reset shaders rather than rebuild all materials, and rebased on master. |
275e96b to
d5c50ec
Compare
|
Appveyor failed becuase of some appveyor or github error:
|
|
Yeah, AppVeyor is having trouble to connect to GitHub right now, I restarted the build 4 times before getting it finished, and I faced similar issues at different times like that: |
slipher
left a comment
There was a problem hiding this comment.
To make the drawSurf_t copying hack less likely to go awry, I propose zeroing its pointer members which may be invalidated, of type trRefEntity_t * and drawSurf_t *. That way we will get a clean crash if one of them ends up being used.
|
|
||
| // Used only for glsl_restart | ||
| shaderStage_t* refStage; | ||
| drawSurf_t refDrawSurf; |
There was a problem hiding this comment.
refDrawSurf isn't a reference though.
There was a problem hiding this comment.
Well, as in "reference to the values used for this material". Might not be a good name for it.
There was a problem hiding this comment.
Something like original[DrawSurf/Stage] might be better.
14dc0d3 to
5e12a8c
Compare
Good point, done now. |
5e12a8c to
3706949
Compare
|
LGTM |
Fixes
glsl_restartwith material system by resetting the shaders for each material.