parent
c61b7b0263
commit
6bfb9b7b5f
|
@ -79,6 +79,7 @@ void immVertex2iv(unsigned attrib_id, const int data[2]);
|
|||
|
||||
// provide uniform values that don't change for the entire draw call
|
||||
void immUniform1i(const char* name, int x);
|
||||
void immUniform4iv(const char* name, const int data[4]);
|
||||
void immUniform1f(const char* name, float x);
|
||||
void immUniform2f(const char* name, float x, float y);
|
||||
void immUniform2fv(const char* name, const float data[2]);
|
||||
|
|
|
@ -827,6 +827,16 @@ void immUniform1i(const char* name, int x)
|
|||
glUniform1i(loc, x);
|
||||
}
|
||||
|
||||
void immUniform4iv(const char* name, const int data[4])
|
||||
{
|
||||
int loc = glGetUniformLocation(imm.bound_program, name);
|
||||
|
||||
#if TRUST_NO_ONE
|
||||
assert(loc != -1);
|
||||
#endif
|
||||
|
||||
glUniform4iv(loc, 1, data);
|
||||
}
|
||||
|
||||
// --- convenience functions for setting "uniform vec4 color" ---
|
||||
|
||||
|
|
Loading…
Reference in New Issue