Game of Ur 0.3.3
This is a computer adaptation of Game of Ur, written in C++ mainly using SDL and OpenGL.
Loading...
Searching...
No Matches
light.hpp File Reference

A file that contains definitions for different types of lights, as components to entities, supported by the engine. More...

#include <utility>
#include <queue>
#include <map>
#include <GL/glew.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <nlohmann/json.hpp>
#include "core/ecs_world.hpp"
#include "shapegen.hpp"
#include "instance.hpp"
#include "scene_components.hpp"

Go to the source code of this file.

Classes

struct  ToyMaker::LightEmissionData
 A struct, used as a component, describing the emissive properties of the light it represents per the Blinn-Phong shading model. More...
 
class  ToyMaker::LightInstanceAllocator
 The allocator associated with built in light sources used as attributes. More...
 

Namespaces

namespace  ToyMaker
 Namespace containing all class definitions and functions related to the ToyMaker engine.
 

Typedefs

using ToyMaker::LightPackedData = std::pair<std::pair<glm::vec4, glm::vec4>, LightEmissionData>
 A version of light data where the first element represents the light's position and direction, and the second represents its emission properties.
 

Functions

 ToyMaker::NLOHMANN_JSON_SERIALIZE_ENUM (LightEmissionData::LightType, { {LightEmissionData::LightType::directional, "directional"}, {LightEmissionData::LightType::point, "point"}, {LightEmissionData::LightType::spot, "spot"}, })
 
void ToyMaker::from_json (const nlohmann::json &json, LightEmissionData &lightEmissionData)
 
void ToyMaker::to_json (nlohmann::json &json, const LightEmissionData &lightEmissionData)
 

Variables

static InstanceLayout ToyMaker::LightInstanceLayout
 The layout for built-in light sources when used as instance attributes.
 

Detailed Description

A file that contains definitions for different types of lights, as components to entities, supported by the engine.

Author
Zoheb Shujauddin (zoheb.nosp@m.2424.nosp@m.@gmai.nosp@m.l.co.nosp@m.m)
Version
0.3.2
Date
2025-09-03