Commit Graph

8 Commits

Author SHA1 Message Date
Ben Wiederhake
a55360781b LibGL: Move AK/Debug.h include to where it is used 2023-01-02 20:27:20 -05:00
Jelle Raaijmakers
8c094699db LibGL: Implement glLightModel integer normalization
For the ambient light model, integers need to be remapped to a range of
`-1.` through `1.`. Add the `+` and `-` operators to `VectorN` to make
it a bit easier to normalize 4 values at once.
2022-12-20 10:42:31 +01:00
Jelle Raaijmakers
a074b7e871 LibGL: Support glLightModel inside lists
We now dereference the pointer given to us before adding the arguments
to an active list. This also factors out the switching logic from the
API wrappers, which helps us with a future commit where we autogenerate
all API wrapper functions.
2022-12-20 10:42:31 +01:00
Jelle Raaijmakers
403c560a7a LibGL: Correct GL_LIGHT_MODEL_LOCAL_VIEWER comparison
We were comparing the `x` parameter to `1.f` instead of `0.f`.
2022-12-20 10:42:31 +01:00
Jelle Raaijmakers
6d68f47495 LibGL: Dereference pointer in a consistent way for glMaterial* 2022-12-20 10:42:31 +01:00
Jelle Raaijmakers
00d46e5d77 LibGL+LibGPU+LibSoftGPU: Implement matrix stack per texture unit
Each texture unit now has its own texture transformation matrix stack.
Introduce a new texture unit configuration that is synced when changed.
Because we're no longer passing a silly `Vector` when drawing each
primitive, this results in a slightly improved frames per second :^)
2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
08204efe1f LibGL: Set correct color material mode for GL_AMBIENT_AND_DIFFUSE
This was a silly mistake :^)
2022-09-08 12:05:54 -04:00
Jelle Raaijmakers
365fb36108 LibGL: Split up GLContext implementation into logical units
This allows for faster rebuilds when the implementation changes.
2022-05-05 20:50:14 +02:00