Skip to content
Myr

fix possible bug in uniform sample code

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by cshesse · committed by GitHub · parent f67165c · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:stb_voxel_render.h+1 added-1 removed
612 unmodified lines
613 for (i=0; i < STBVOX_UNIFORM_count; ++i) {614 stbvox_uniform_info sui;615 if (stbvox_get_uniform_info(&sui, i)) {616 GLint loc = glGetUniformLocation(shader, sui.name);617 if (loc != 0) {617 if (loc != -1) {618 switch (i) {619 case STBVOX_UNIFORM_camera_pos: // only needed for fog620 glUniform4fv(loc, sui.array_length, camera_pos);621 break;
3185 unmodified lines