Hi,
I hope you don't mind that I ignored your hint that it is not possible with Maya2015 and I simply tried it. The code snippet below int the draw() method of my DrawOverride() method shows the principles.
The shader program contains a vertexShader, geometryShader and fragment shader. The basics work and the geometry shader produces the desired ouput. Now I have a little problem: I have no idea how I can add texture coords to my vertex array and use it in my gl shaders. In the vertex shader I tried to use:
in vec2 UV;
or
in float UV;
but both does not work. I know this is not really a supported way to use the DrawOverride, but maybe there is a hint how to add texture coords to a vertex buffer.
glUseProgram(s_program);
float mat[4][4];
double* d = ao.matrix.getValue();
glUniformMatrix4dv(s_objectLoc, 1, GL_FALSE, d);
context.getMatrix(MHWRender::MDrawContext::kWorldViewMtx).get(mat);
glUniformMatrix4fv(s_modelLoc, 1, GL_FALSE, &mat[0][0]);
context.getMatrix(MHWRender::MDrawContext::kViewProjMtx).get(mat);
glUniformMatrix4fv(s_viewProjLoc, 1, GL_FALSE, &mat[0][0]);
glEnableClientState( GL_VERTEX_ARRAY );
glEnableClientState( GL_TEXTURE_COORD_ARRAY );
V3f* point = (V3f* )ao.points->get();
float *pscale = (float* )ao.pscale->get();
glVertexPointer( 3, GL_FLOAT, sizeof(V3f), &point[0].x );
glTexCoordPointer(1, GL_FLOAT, sizeof(float), pscale);
glDrawArrays(GL_POINTS, 0, ao.points->size());
glDisableClientState( GL_TEXTURE_COORD_ARRAY );
glDisableClientState( GL_VERTEX_ARRAY );
glUseProgram(0);