Hi
I am using vertexarray to show some videodata ,
when i use glcolorpointer to show the color i am not getting proper color.
I am attaching code for reference.
float videovertexarray[5000000];
float videocolorarray[500000000];
int indexcolor=0;
int m1;
float vertices1,vertices2;
int vvertex=0;
for(int cpi=0;cpi<400;cpi++)
{
for(m1=0;m1<5000;m1++)
{
vertices1=(0.000252m1)sin(cpivalue0.0157);
vertices2=(0.000252m1)cos(cpivalue0.0157 );
videovertexarray[(vvertex2)+0]=vertices1;
videovertexarray[(vvertex2)+1]=vertices2;
videocolorarray[(indexcolor4)+0]=0.0f;
videocolorarray[(indexcolor4)+1]=1.0f;
videocolorarray[(indexcolor4)+2]=0.0f;
videocolorarray[(indexcolor4)+3]=0.0f;
indexcolor++;
vvertex++;
}
}
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
glEnableClientState(GL_COLOR_ARRAY);
glEnableClientState(GL_VERTEX_ARRAY);
glColorPointer(4, GL_FLOAT,0,videocolorarray);
glVertexPointer(2, GL_FLOAT,0,videovertexarray);
glDrawArrays(GL_POINTS,0,vvertex);
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_COLOR_ARRAY);
glDisable(GL_BLEND);
When i run this code i am not getting green color, i am getting black color.
Thank you
Janani