GLVertexBuffer::addUniform unfinished GLMatrix support
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Compiz |
New
|
Undecided
|
Unassigned |
Bug Description
I was writing a shader for a compiz plugin, and couldn't work out why my matrices uniforms were not working. A few hours later of test-apps and digging through the compiz source I found:
```
bool GLVertexBuffer:
{
//#warning Add 'addUniform' support to GLMatrix type !
return true;
}
```
I would expect this to: (a) fail loudly, perhaps printing a warning to the console or (b) actually work! :-)
Fixing it looks to be a simple case of making a new Uniform<double, 16> and copying the GLMatrix into it. Best guess is this would do the trick...
Line 250 vertexbuffer.cpp
```
void GLVertexBuffer:
{
// we're casting to double here to make our template va_arg happy
Uniform<double, 16>* uniform = new Uniform<double, 16>(name,
priv-
}
```
Line 85 privatevertexbu
```
case 16: {
GLMatrix m;
for (int i = 0; i < 16; ++i)
m[0] = (float)a[0];
prog-
break;
}
```