diff options
author | chai <chaifix@163.com> | 2019-12-08 02:39:57 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-12-08 02:39:57 +0800 |
commit | 8518e135ff5c312bd5a3b496d400c751aa3bd5b3 (patch) | |
tree | 96ea48d2046b0ecc3ff791efd8fe7a5780ad52e5 /src/core/device.c | |
parent | 0c4b1e68d64996a4aa5b136ddb6ee5643e159ef2 (diff) |
*光源
Diffstat (limited to 'src/core/device.c')
-rw-r--r-- | src/core/device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/device.c b/src/core/device.c index f6b1a4e..b9c024c 100644 --- a/src/core/device.c +++ b/src/core/device.c @@ -289,7 +289,7 @@ void ssr_draw(ssr_PrimitiveType primitive) { state.uniforms.mv = &mv; uint varying_flag = state.program->varying_flag; - bool use_extra_varyings = varying_flag & VARYING_EXTRA; + bool use_extra_varyings = (varying_flag & VARYING_EXTRA) != 0; /*prepare registers if necessary*/ if (use_extra_varyings) { @@ -362,7 +362,7 @@ void ssr_draw(ssr_PrimitiveType primitive) { } else { if (clipped_buffer.count >= 3) { ClippedVert* vt0 = &clipped_buffer.vertices[0], *vt1, *vt2; - for (int i = 1; i <= clipped_buffer.count - 2; ++i) { /*0->i->i+1*/ + for (int i = 1; i <= clipped_buffer.count - 2; ++i) { vt1 = &clipped_buffer.vertices[i]; vt2 = &clipped_buffer.vertices[i + 1]; h0 = &vt0->clip_coord; h1 = &vt1->clip_coord; h2 = &vt2->clip_coord; |