13 Commits

Author SHA1 Message Date
511d99563d maple_bus_commands: zero-sized structs should be zero sized
From the GCC manual.

> GCC permits a C structure to have no members:

struct empty {
};

> The structure has size zero. In C++, empty structures are part of the
> language. G++ treats empty structures as if they had a single member of type
> char.

I was not aware of the different behavior in C++.

This fixes every maple example--most were broken for multiple reasons, including
this one.

This also enables SH4 caching. This includes linking code/data into the P1
area (previously this was not the case).

The maple examples (which indeed involve much use of DMA) require much work to
successfully work with the operand and copyback caches. The vibration example
currently is the most complete, though I should consider more on how I want to
structure maple response operand cache invalidation more generally.
2024-02-02 22:05:10 +08:00
b4239dcfe8 geometry/circle: add texture coordinates
Blender also generated a different triangulation.
2024-01-27 10:58:39 +08:00
4842ab0e4f example: add clipping2
Unlike the previous clipping example, this clipping example preserves
surface normals.
2024-01-27 10:20:46 +08:00
e54d762a20 example/viewing_system: add "viewer" concept 2024-01-11 15:34:55 +08:00
6836790205 add viewing_system
This is inspirted by the book "3D Computer Graphics" by Alan Watt.
2024-01-06 18:43:57 +08:00
1f6a29f379 example: update several examples 2024-01-03 23:32:37 +08:00
0b6c650ebd common.mk: add headless csv build rule 2024-01-01 00:58:10 +08:00
e8aea009c6 example: add heart
I originally planned to make this a render-to-texture demo, but this
is fairly interesting by itself.
2023-12-31 20:19:41 +08:00
5db6272ceb example: add modifier volume
This creates a modifier volume with a cube that intersects a plane.
2023-12-30 15:11:22 +08:00
4bb04a0362 example: add maple_analog
Also adds the incomplete modifier_volume example.

This also adds vec2 for UV coordinates, and obj_to_cpp has been
modified to parse vertex texture coordinates from obj files.
2023-12-30 10:53:39 +08:00
6a17031c6f example: add wiffle_attenuation
This example is an experiment with light attenuation.
2023-12-26 22:46:52 +08:00
e340c3ca02 example: add icosphere 2023-12-24 17:48:20 +08:00
befedb9d38 example: add lighted cube
This also copy-pastes all of the math headers I originally wrote in
saturn-examples.
2023-12-24 16:24:27 +08:00