| TGX 1.1.0 A tiny 2D/3D graphics library optimized for 32 bits microcontrollers.

Loading...
Searching...
No Matches
Macros | Enumerations | Functions
ShaderParams.h File Reference

Triangle shader parameters. More...

`#include "Misc.h"`
`#include "Vec2.h"`
`#include "Vec3.h"`
`#include "Vec4.h"`
`#include "Box2.h"`
`#include "Color.h"`
`#include <stdint.h>`

Go to the source code of this file.

## Macros
#define | TGX_SHADER_CAN_USE_FLAT_OR_UNLIT(enabled_shader_type, shader_type)
| True when a shader configuration can use either flat shading or unlit shading. More...

## Enumerations
enum | tgx::Shader { tgx::SHADER_PERSPECTIVE = (1 << 0) , tgx::SHADER_ORTHO = (1 << 1) , tgx::SHADER_NOZBUFFER = (1 << 2) , tgx::SHADER_ZBUFFER = (1 << 3) , tgx::SHADER_FLAT = (1 << 4) , tgx::SHADER_GOURAUD = (1 << 5) , tgx::SHADER_UNLIT = (1 << 6) , tgx::SHADER_NOTEXTURE = (1 << 7) , tgx::SHADER_TEXTURE = (1 << 8) , tgx::SHADER_TEXTURE_NEAREST = (1 << 11) , tgx::SHADER_TEXTURE_BILINEAR = (1 << 12) , tgx::SHADER_TEXTURE_WRAP_POW2 = (1 << 13) , tgx::SHADER_TEXTURE_CLAMP = (1 << 14) }
| List of shaders available for 3D graphics. More...

## Functions
constexpr Shader | tgx::operator| (Shader a1, Shader a2)
| Enable bitwise `|` operator for enum.
Shader & | tgx::operator|= (Shader &a1, Shader a2)
| Enable bitwise `|=` operator for enum.
constexpr Shader | tgx::operator& (Shader a1, Shader a2)
| Enable bitwise `&` operator for enum.
Shader & | tgx::operator&= (Shader &a1, Shader a2)
| Enable bitwise `&=` operator for enum.
constexpr Shader | tgx::operator~ (Shader a)
| Enable bitwise `~` operator for enum.

## Detailed Description

Triangle shader parameters.

## Macro Definition Documentation

## ◆ TGX_SHADER_CAN_USE_FLAT_OR_UNLIT

#define TGX_SHADER_CAN_USE_FLAT_OR_UNLIT | ( |  | enabled_shader_type,
|  |  | shader_type
| ) |  |

Value:
(TGX_SHADER_HAS_UNLIT(enabled_shader_type) ? \
(TGX_SHADER_HAS_UNLIT(shader_type) || (TGX_SHADER_HAS_FLAT(enabled_shader_type) && !TGX_SHADER_HAS_GOURAUD(shader_type))) : \
TGX_SHADER_HAS_FLAT(enabled_shader_type))

True when a shader configuration can use either flat shading or unlit shading.

## Enumeration Type Documentation

## ◆ Shader

enum tgx::Shader

List of shaders available for 3D graphics.

Enumerator
SHADER_PERSPECTIVE | enable Perspective projection
SHADER_ORTHO | enable Orthographic projection
SHADER_NOZBUFFER | disable Z-buffer testing
SHADER_ZBUFFER | enable Z-buffer testing
SHADER_FLAT | enable flat shading
SHADER_GOURAUD | enable Gouraud shading
SHADER_UNLIT | enable unlit shading: no lighting computation
SHADER_NOTEXTURE | disable texture mapping
SHADER_TEXTURE | enable texture mapping
SHADER_TEXTURE_NEAREST | use point sampling texture mapping
SHADER_TEXTURE_BILINEAR | use bilinear texture sampling
SHADER_TEXTURE_WRAP_POW2 | texture has power of 2 dimensions and use wrapping at edges
SHADER_TEXTURE_CLAMP | texture have arbitrary dimensions and use clamping at edges