Adds a rectangle from two corners, in one colour.
set_shader_for_color();
immediate_quad(10, 10, 110, 60, .{1, 1, 1, 1});This one is only checked to compile, not run.
immediate_quad :: (x0: float, y0: float, x1: float, y1: float, color: Vector4)
Parameters
- x0: float
- y0: float
- x1: float
- y1: float
- color: Vector4
immediate_quad :: (
p0: Vector2,
p1: Vector2,
p2: Vector2,
p3: Vector2,
color := Vector4.{ 1, 1, 1, 1 },
uv0 := Vector2.{ 0, 0 },
uv1 := Vector2.{ 1, 0 },
uv2 := Vector2.{ 1, 1 },
uv3 := Vector2.{ 0, 1 }
)
Adds a quad from four corners in order, in one colour. The texture coordinates default to the whole texture.
Parameters
immediate_quad :: (
p0: Vector2,
p1: Vector2,
p2: Vector2,
p3: Vector2,
c0: Vector4,
c1: Vector4,
c2: Vector4,
c3: Vector4,
uv0 := Vector2.{ 0, 0 },
uv1 := Vector2.{ 1, 0 },
uv2 := Vector2.{ 1, 1 },
uv3 := Vector2.{ 0, 1 }
)
Adds a quad from four corners in order, with a colour for each corner.
Parameters
immediate_quad :: (
p0: Vector3,
p1: Vector3,
p2: Vector3,
p3: Vector3,
color: Vector4,
uv0 := Vector2.{ 0, 0 },
uv1 := Vector2.{ 1, 0 },
uv2 := Vector2.{ 1, 1 },
uv3 := Vector2.{ 0, 1 },
normal := Vector3.{ z = 1 }
)
Adds a quad in 3D from four corners in order, in one colour, with a normal for lighting.
Parameters
immediate_quad :: (
p0: Vector3,
p1: Vector3,
p2: Vector3,
p3: Vector3,
color: Vector4,
uv0: Vector2,
uv1: Vector2,
uv2: Vector2,
uv3: Vector2,
st0: Vector2,
st1: Vector2,
st2: Vector2,
st3: Vector2,
normal: Vector3,
tangent: Vector4
)
Adds a quad in 3D with a second set of texture coordinates, a normal and a tangent, for lit and normal-mapped surfaces.