Codrut
Codrut

Reputation: 332

How do I make a TLight show in Delphi FMX

I am trying to make a 3D application where a TLight casts light in a 3D cube, but I found no way to "enable" the light and it does nothing.

Upvotes: 1

Views: 244

Answers (1)

Brian
Brian

Reputation: 7289

The MaterialSource of your cube needs to be a TLightMaterial. Do that by putting a TLightMaterialSource on your form and hooking it up to the cube. To make it easier to see make the light a point source. Once done and looking similar to the below you can move the lightsource around and see the cube lit differently.

enter image description here

Upvotes: 4

Related Questions