I am trying to pass an array of vec2’s to my shader using an array. It is an array of the entire pixel positions. So basically an array that would look like:
vec2 arrayPixel; int arrayPixelSize = 640* 480;
How would I send this array to the shader as an uniform? I am trying to use the following function in my draw() function, but I am not sure how to properly make it work.
gl::setMatricesWindow( getWindowWidth(), getWindowHeight() ); gl::translate( getWindowCenter() ); gl::ScopedGlslProg glslProg( mGlsl ); mGlsl->uniform("uArrayPixel", arrayPixel, arrayPixelSize); // this is showing an invalid argument error.
Please let me know if I am missing something. Thanks!