You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Manoylov Andriy eb8d3c5f80 add ukrainian translation 10 months ago
..
README-ua.md add ukrainian translation 10 months ago
README-vi.md Translate the glossary section 4 years ago
README.md Remove trailing whitespaces 7 years ago

README.md

Struct

Structure variable type

Example

struct matStruct {
    vec4 ambientColor;
    vec4 diffuseColor;
    vec4 specularColor;
    float specularExponent;
} newMaterial;

newMaterial = matStruct(vec4(0.1, 0.1, 0.1, 1.0),
                        vec4(1.0, 0.0, 0.0, 1.0),
                        vec4(0.7, 0.7, 0.7, 1.0),
                        50.0);

Description

struct declare a custom data structures based on standard types. A constructor for the structure with the same name is created automatically. The declaration of a variable (in this case "newMaterial") is optional.