The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

SDL::Tutorial::3DWorld::Landscape - The static 3D environment of the world

DESCRIPTION

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.

METHODS

new

The new constructor for the landscape. It takes no parameters and returns an object representing the static part of the game world.

sky

  my ($red, $green, $blue, $alpha) = $landscape->sky;

The 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.

SUPPORT

Bugs should be reported via the CPAN bug tracker at

http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SDL-Tutorial-3DWorld

AUTHOR

Adam Kennedy <adamk@cpan.org>

SEE ALSO

SDL, OpenGL

COPYRIGHT

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.