Thanx for the code of the DL…but how do i configure the 2 tex units matrix to call only glDrawElement()?
Im doing
//binding shader…
static float op1[] = {1,0,0,0};
static float op2[] = {0,1,0,0};
static float op3[] = {0,0,1,0};
glActiveTexture(GL_TEXTURE0_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, tex_light2d);
glEnable(GL_TEXTURE_GEN_S);
glTexGenfv(GL_S, GL_OBJECT_PLANE, op1);
glTexGenf(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
glEnable(GL_TEXTURE_GEN_T);
glTexGenfv(GL_T, GL_OBJECT_PLANE, op3);
glTexGenf(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
glActiveTexture(GL_TEXTURE1_ARB);
glEnable(GL_TEXTURE_1D);
glBindTexture(GL_TEXTURE_1D, tex_light1d);
glEnable(GL_TEXTURE_GEN_S);
glTexGenf(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
glTexGenfv(GL_S, GL_OBJECT_PLANE, op2);
//rendering
//first i translate and rotate the object and then enter here
//tex unit 0, tex 2d
glMatrixMode(GL_TEXTURE);
glTranslatef(.5,.5,.5);
glScalef(1/radius,1/radius,1/radius);
glTranslatef(-light_pos.x,-light_pos.z,0);
//tex 1 , 1d texture
glActiveTexture(GL_TEXTURE1_ARB);
glMatrixMode(GL_TEXTURE);
glTranslatef(.5,.5,.5);
glScalef(1/radius,1/radius,1/radius);
glRotatef(90, 1,0, 0); //should i rotate to turn y values to z values?
glTranslatef(0,0,-lp.y);
glMatrixMode(GL_MODELVIEW);
but its not working…somebody help me, please…