Ejemplo n.º 1
0
	int ShaderProgramGL::getUniformLocation(const char *id) const
	{
		int i = oxglGetUniformLocation(_program, id);
		//if (i == -1)
		CHECKGL();
		return i;
	}
 void VideoDriverGLES20::setUniform(const char* id, float val)
 {
     int p = oxglGetUniformLocation(_program, id);
     if (p == -1)
         return;
     oxglUniform1f(p, val);
     CHECKGL();
 }
 void VideoDriverGLES20::setUniform(const char* id, const Vector3* v, int num)
 {
     int p = oxglGetUniformLocation(_program, id);
     if (p == -1)
         return;
     oxglUniform3fv(p, num, &v->x);
     CHECKGL();
 }
 void VideoDriverGLES20::setUniform(const char* id, const Matrix* mat)
 {
     int p = oxglGetUniformLocation(_program, id);
     if (p == -1)
         return;
     oxglUniformMatrix4fv(p, 1, GL_FALSE, mat->ml);
     CHECKGL();
 }
 void VideoDriverGLES20::setUniformInt(const char* id, int v)
 {
     int location = oxglGetUniformLocation(_program, id);
     if (location == -1)
         return;
     oxglUniform1i(location, v);
     CHECKGL();
 }