Skip to content

Commit

Permalink
Fix compilation on VS 2013
Browse files Browse the repository at this point in the history
  • Loading branch information
gonetz committed Nov 30, 2016
1 parent 4706bb5 commit d5eb2cd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/GLSLCombiner.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,23 +72,23 @@ class ShaderCombiner {

struct fv2Uniform {
GLint loc = -1;
float val[2] = {-9999.9f, -9999.9f};
float val1 = -9999.9f, val2 = -9999.9f;
void set(float _val1, float _val2, bool _force) {
if (loc >= 0 && (_force || val[0] != _val1 || val[1] != _val2)) {
val[0] = _val1;
val[1] = _val2;
if (loc >= 0 && (_force || val1 != _val1 || val2 != _val2)) {
val1 = _val1;
val2 = _val2;
glUniform2f(loc, _val1, _val2);
}
}
};

struct iv2Uniform {
GLint loc = -1;
int val[2] = {-990, -999};
int val1 = -999, val2 = -999;
void set(int _val1, int _val2, bool _force) {
if (loc >= 0 && (_force || val[0] != _val1 || val[1] != _val2)) {
val[0] = _val1;
val[1] = _val2;
if (loc >= 0 && (_force || val1 != _val1 || val2 != _val2)) {
val1 = _val1;
val2 = _val2;
glUniform2i(loc, _val1, _val2);
}
}
Expand Down

0 comments on commit d5eb2cd

Please sign in to comment.