Book Image

Learning LibGDX Game Development- Second Edition

Book Image

Learning LibGDX Game Development- Second Edition

Overview of this book

Table of Contents (21 chapters)
Learning LibGDX Game Development Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Environment and materials


OpenGL uses materials to refer to the properties of an object that determine how it interacts with light. In practice, when rendering you specify what (shape) to render and how to render. The shape is specified using the Mesh (or more commonly MeshPart), which defines the vertex attributes for the shader. The material is most commonly used to specify the uniform values for the shader.

Uniforms can be grouped into modelspecific (for example, the texture applied or whether or not to use blending) and environmental uniforms (for example, the lights being applied or an environment cubemap). Likewise, the 3D API allows you to specify a material and environment.

Note

To find out more about materials, environments, and attributes visit https://github.com/libgdx/libgdx/wiki/Material-and-environment.