SDL::Tutorial::3DWorld::Landscape - The static 3D environment of the world
A landscape is the "world" part of the 3D World. It will generally just sit in the same place, looking pretty (ideally) and doing nothing (mostly).
While it may sometimes change in shape, it certainly does not move around as a whole.
The SDL::Tutorial::3DWorld::Landscape module is responsible for creating the world, and updating it if needed.
In this demonstration code, the landscape consists of a simple 50m x 50m white square.
new constructor for the landscape.
It takes no parameters and returns an object representing the static part of the game world.
my ($red, $green, $blue, $alpha) = $landscape->sky;
sky method returns the colour of the sky as a four element RGBA list, with each colour a value in the range 0 to 1.
The sky value is the colour that is used to wipe the OpenGL colour buffer (the buffer that ultimately becomes what appears on your monitor) and so will serve effectively as the "background colour" for your world.
This value is not currently configurable, and will always return a dark navy blue.
Bugs should be reported via the CPAN bug tracker at
Adam Kennedy <firstname.lastname@example.org>
Copyright 2010 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.