1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:27:35 +00:00

LibGL+LibSoftGPU: Move lighting model parameters to SoftGPU

Most of the T&L stuff is, like on an actual GPU, now done inside of
LibSoftGPU. As such, it no longer makes sense to have specific values
like the scene ambient color inside of LibGL as part of the GL context.
These have now been moved into LibSoftGPU and use the same pattern as
the render options to set/get.
This commit is contained in:
Jesse Buhagiar 2022-01-09 00:40:39 +11:00 committed by Linus Groh
parent 92373ab0b6
commit 775ef000e0
4 changed files with 29 additions and 4 deletions

View file

@ -970,6 +970,15 @@ void Device::set_options(const RasterizerOptions& options)
// FIXME: Recreate or reinitialize render threads here when multithreading is being implemented
}
void Device::set_light_model_params(const LightModelParameters& lighting_model)
{
wait_for_all_threads();
m_lighting_model = lighting_model;
// FIXME: Recreate or reinitialize render threads here when multithreading is being implemented
}
Gfx::RGBA32 Device::get_backbuffer_pixel(int x, int y)
{
// FIXME: Reading individual pixels is very slow, rewrite this to transfer whole blocks