mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:27:45 +00:00
LibGL: Implement glLightf{v}
and fix gl.h
prototype
This implements the `glLightf{v}` family of functions used to set lighting parameters per light in the GL. It also fixes an incorrect prototype for the user exposed version of `glLightf{v}` in which `params` was not marked as `const`.
This commit is contained in:
parent
192befa84b
commit
bf294612a7
8 changed files with 185 additions and 7 deletions
|
@ -22,6 +22,7 @@
|
|||
#include <LibSoftGPU/Enums.h>
|
||||
#include <LibSoftGPU/Image.h>
|
||||
#include <LibSoftGPU/ImageFormat.h>
|
||||
#include <LibSoftGPU/Light/Light.h>
|
||||
#include <LibSoftGPU/Sampler.h>
|
||||
#include <LibSoftGPU/Triangle.h>
|
||||
#include <LibSoftGPU/Vertex.h>
|
||||
|
@ -92,6 +93,7 @@ public:
|
|||
NonnullRefPtr<Image> create_image(ImageFormat, unsigned width, unsigned height, unsigned depth, unsigned levels, unsigned layers);
|
||||
|
||||
void set_sampler_config(unsigned, SamplerConfig const&);
|
||||
void set_light_state(unsigned, Light const&);
|
||||
|
||||
private:
|
||||
void draw_statistics_overlay(Gfx::Bitmap&);
|
||||
|
@ -112,6 +114,7 @@ private:
|
|||
Array<Sampler, NUM_SAMPLERS> m_samplers;
|
||||
Vector<size_t> m_enabled_texture_units;
|
||||
AlphaBlendFactors m_alpha_blend_factors;
|
||||
Array<Light, NUM_LIGHTS> m_lights;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue