glColorPointer in linux

I am using glcolorpointer to show the color fading

It is working fine in vc++. But i am getting some unexpected results when i port the same coding in Linux Os.

I am attaching the code .

CODING

float v3,v4,v5,v6;
float sweepvertexarray[5000];
float intensityarray[5000];
float myintensity=1.0;
float myalpha=1.0;
int k=0;
int indices1;
for(float cpi=(6.28);cpi>0;cpi=cpi-0.0157)
{
v3=0.0f;
v4=0.0f;
v5=80.252sin(cpi);
v6=80.252cos(cpi);
sweepvertexarray[(k4)+0]=v3;
sweepvertexarray[(k
4)+1]=v4;
sweepvertexarray[(k4)+2]=v5;
sweepvertexarray[(k
4)+3]=v6;
intensityarray[(k4)+0]=0.0f;
intensityarray[(k
4)+1]=myintensity;
intensityarray[(k4)+2]=0.0f;
intensityarray[(k
4)+3]=myalpha;
myalpha=myalpha-0.0025;
myintensity=myintensity-0.0025;
k++;
indices1=k*2;
}

//glColor4f(0.0f,1.0f,0.0f,1.0);

glEnableClientState(GL_COLOR_ARRAY);
glEnableClientState(GL_VERTEX_ARRAY);
glColorPointer(4, GL_FLOAT,8, intensityarray);
glVertexPointer(2, GL_FLOAT,0,sweepvertexarray);
glDrawArrays(GL_QUAD_STRIP,0,indices1);
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_COLOR_ARRAY);

Janani

Please : do not cross-post ! Choose one forum section, in this case either ‘beginner’ or ‘linux’ is ok, but post ONLY in one !

Thread redirect to continue the discussion

Ok, i am stuck in this i am not able to proceed .

Janani

that is why it is a bad idea to cross post between forum sections, there is a nice solution out there :
http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=267676

:cool: