VasRoG
10-04-2005, 02:59 AM
I've got one light source in my scene. And i would like to move it to the new position. My code is following:
OnCreate
GLEnable(GL_LiGhtinG);
GLEnable(Gl_LiGht0);
OnButtonClick
GLPushMatrix;
GlTranslatef (-1.0,1.0,0.0);
E[0]:= Ex/(Nx - 1 );
E[1]:= -Ey/(Ny - 1 );
E[2]:= Ez/ maximum;
GLLiGhtfv(GL_LiGht0, GL_Position, @E);
GlPopMatrix;
But the light source is don't move. Errors?
Ye, E : array [0..2] of GLFloat; ;)
OnCreate
GLEnable(GL_LiGhtinG);
GLEnable(Gl_LiGht0);
OnButtonClick
GLPushMatrix;
GlTranslatef (-1.0,1.0,0.0);
E[0]:= Ex/(Nx - 1 );
E[1]:= -Ey/(Ny - 1 );
E[2]:= Ez/ maximum;
GLLiGhtfv(GL_LiGht0, GL_Position, @E);
GlPopMatrix;
But the light source is don't move. Errors?
Ye, E : array [0..2] of GLFloat; ;)