From 94f6fb3a3c4d94a2895376530252c482f3b9241d Mon Sep 17 00:00:00 2001 From: Rod Kay Date: Sat, 21 Oct 2023 12:35:43 +1100 Subject: [PATCH] gel.demo.pong: Set light position. --- .../gel/applet/demo/game/pong/launch_pong.adb | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/4-high/gel/applet/demo/game/pong/launch_pong.adb b/4-high/gel/applet/demo/game/pong/launch_pong.adb index ba00cc3..c4d7c4a 100644 --- a/4-high/gel/applet/demo/game/pong/launch_pong.adb +++ b/4-high/gel/applet/demo/game/pong/launch_pong.adb @@ -9,7 +9,8 @@ with Physics, openGL.Palette, - openGL.Model.text, + openGL.Light, + openGL.Model.text, float_Math.Random, @@ -54,8 +55,8 @@ is Bounce => 1.0, Friction => 0.0, Radius => 0.5, - Color => White, - Texture => openGL.to_Asset ("assets/opengl/texture/Face1.bmp")); + Color => White); + -- Texture => openGL.to_Asset ("assets/opengl/texture/Face1.bmp")); --- Players -- type Player is @@ -185,6 +186,17 @@ begin the_Applet.World.Gravity_is ([0.0, 0.0, 0.0]); the_Applet.World.add (the_Ball); + + -- Set the lights position. + -- + declare + Light : openGL.Light.item := the_Applet.Renderer.new_Light; + begin + Light.Site_is ([0.0, 1000.0, 0.0]); + the_Applet.Renderer.set (Light); + end; + + --- Add the players. -- declare