opengl.demo: Set a default light.
This commit is contained in:
@@ -22,6 +22,7 @@ with
|
||||
openGL.Model.sphere .lit_textured,
|
||||
openGL.Model.Text .lit_colored,
|
||||
openGL.Model.terrain,
|
||||
openGL.Light,
|
||||
|
||||
SDL.Video.Windows.Makers,
|
||||
ada.Text_IO;
|
||||
@@ -47,6 +48,8 @@ is
|
||||
end my_Swapper;
|
||||
|
||||
|
||||
|
||||
|
||||
procedure define (Name : in String;
|
||||
Width : in Positive := 1366;
|
||||
Height : in Positive := 768)
|
||||
@@ -90,10 +93,22 @@ is
|
||||
|
||||
Camera.Viewport_is (width => Width,
|
||||
height => Height);
|
||||
|
||||
declare
|
||||
use openGL.Light;
|
||||
the_Light : openGL.Light.item := Demo.Renderer.new_Light;
|
||||
begin
|
||||
the_Light. Site_is ([5_000.0, 2_000.0, 5_000.0]);
|
||||
the_Light.Color_is (White);
|
||||
|
||||
Demo.Renderer.set (the_Light);
|
||||
end;
|
||||
|
||||
end define;
|
||||
|
||||
|
||||
|
||||
|
||||
procedure destroy
|
||||
is
|
||||
begin
|
||||
|
||||
Reference in New Issue
Block a user