diff options
author | aap <aap@papnet.eu> | 2021-01-28 15:30:32 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2021-01-28 15:30:32 +0100 |
commit | ebb615d0809fbc2893a390e0d2fd78ef42924111 (patch) | |
tree | efc4e7f59e8e42aea8275df9add8dfe50233d16e /src/extras/custompipes_gl.cpp | |
parent | 2d0562412e21ba15e33e2de619e6b2e354afe2d6 (diff) |
fix some little UB
Diffstat (limited to 'src/extras/custompipes_gl.cpp')
-rw-r--r-- | src/extras/custompipes_gl.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/extras/custompipes_gl.cpp b/src/extras/custompipes_gl.cpp index 0c092c5f..caf9eb27 100644 --- a/src/extras/custompipes_gl.cpp +++ b/src/extras/custompipes_gl.cpp @@ -332,7 +332,12 @@ glossRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) V3d eyePos = rw::engine->currentCamera->getFrame()->getLTM()->pos; glUniform3fv(U(u_eye), 1, (float*)&eyePos); - glUniform4fv(U(u_reflProps), 1, (float*)&GlossMult); + float reflProps[4]; + reflProps[0] = GlossMult; + reflProps[1] = 0.0f; + reflProps[2] = 0.0f; + reflProps[3] = 0.0f; + glUniform4fv(U(u_reflProps), 1, reflProps); SetRenderState(VERTEXALPHA, TRUE); SetRenderState(SRCBLEND, BLENDONE); |