chcialbym zrobic dwa siwatla i to w roznym kolorze i zwracam sie z taka prosba bo nie ma dwoch swiatel lecz tylko jedno
uzywam dodatkowo komponentu "glbox"
oto moj kod :
procedure ustalswiatlo;
const
spec : tglarrayf4(1.0,2.0,3.0,1);
pos : tglarrayf4(150,-30,-50,1);
spec1:tglarrayf4(1.0,2.0,3.0,1);
pos1 :tglarrayf4(-150,30,50,1);
begin
gllightfv(GL_LIGHT0,gl_specular,@spec);
gllightfv(gl_light0,gl_position,@pos);
glenable(gl_light0);
gllightfv(GL_LIGHT1,gl_specular,@spec1);
gllightfv(gl_light1,gl_position,@pos1);
glenable(gl_light1);
end;
procedure TForm1.GLSetupRC(Sender: TObject);
const
amb_dif: TGLArrayf4 = (1.0, 1.0, 1.0, 1);
emis : TGLArrayf4 = (1.0, 1.1, 5.1, 5);
begin
glclearcolor(0,0,0,1);
ustalrozmiar;
glenable(gl_lighting);
glenable(gl_depth_test);
kw1:=glunewquadric;
gluquadricdrawstyle(kw1,glu_point);
end;
procedure TForm1.GLRender(Sender: TObject);
begin
glclear(gl_depth_buffer_bit or gl_color_buffer_bit);
glloadidentity;
ustalswiatlo;
ustalswiatlo1;
glusphere(kw1,110,50,100);
end;
a i co znacza te liczby -150,30,-30 w position i co to ten specular
nara i dzieki za wszystko