Hi kruseborn,
I have tried what u suggested .Here is the code
//global
#include<vector>
typedef vector<double> Vec;
typedef vector<Vec> Matrix;
func displaypatch()
{
799 vector<Matrix> vecM;
800 vecM.push_back(gx[m]);
801 vecM.push_back(gy[m]);
802 vecM.push_back(gz[m]);
804 glUniformMatrix4fv(loc1, size(vecM), 0, &vecM[0]);
}
but I ended up with the following errors.As I have never used vectors i couldnt rectify them.
spline_patch.cpp: In function ‘void displaypatch(int)’:
spline_patch.cpp:800: error: no matching function for call to ‘std::vector<std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >, std::allocator<std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > > > >::push_back(float*&)’
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_vector.h:602: note: candidates are: void std::vector<_Tp, _Alloc>::push_back(const _Tp&) [with _Tp = std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >, _Alloc = std::allocator<std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > > >]
there are same errors on 801 & 802 too.
Plz help me