Hi,
I have a grid, which contains cells that have several different properties.
struct fluidProperties1 {
float foo;
float bar;
};
and I create the grid as follows using a template
Grid2D<fluidProperties1> grid1;
Now, I want to pass the array formed only by the values of foo, and not by bar. This is for a texture in OpenGL
I pass grid1.foo to openGL, eg:
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, gridW, gridH, 0, GL_RGBA, GL_UNSIGNED_BYTE, grid1.foo);
but, I get the error:
cannot convert `float' to `const GLvoid*' for argument `9' to `void glTexImage2D(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid*)'
Could anyone tell me what I may be doing wrong here?
Thanks
P.S I'm using boost.multiarray to create my grids.