I’m currently busy writing a vertex shader in Cg for ogl under Linux.
I was wondering how one can send per vertex data for the shader to work with. Currently I’m piggy backing on the alpha color value, but i would like to use some other means.
I tried using VertexAttributes but that sh*t is just a mess. IT SIMPLY DOES NOT WORK!!
Futher more I tried using a TEXCOORD. Forget it, ogl simply crashes. Any ideas what I might be doing wrong??
I have determined that glDisableClientState( GL_VERTEX_ATTRIB_ARRAY1_NV ); causes the crash. If I take that out then the data simply does not get through but at least no crash.
code: ------------------------------
glDisableClientState( GL_VERTEX_ATTRIB_ARRAY1_NV );
glEnableClientState( GL_VERTEX_ATTRIB_ARRAY1_NV );
glEnable( GL_VERTEX_PROGRAM_NV );
//Render stuff
glDisableClientState( GL_VERTEX_ATTRIB_ARRAY1_NV );<-- causes crash after X amount of frames.
glDisable( GL_VERTEX_PROGRAM_NV );
I am using the correct memory allocated by glX and my parameters are correct. Has anybody tried something like this before?