1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:28:11 +00:00

LibGL: Turn Sampler2D into an actual class

This extracts the sampler functionality into its own class.
Beginning with OpenGL 3 samplers are actual objects, separate
from textures. It makes sense to do this already as it also
cleans up code organization quite a bit.
This commit is contained in:
Stephan Unverwerth 2021-08-11 19:57:22 +02:00 committed by Andreas Kling
parent fdde19d616
commit 12785849aa
7 changed files with 164 additions and 49 deletions

View file

@ -435,7 +435,7 @@ void SoftwareRasterizer::submit_triangle(const GLTriangle& triangle, const Array
continue;
// FIXME: Don't assume Texture2D, _and_ work out how we blend/do multitexturing properly.....
texel = texel * static_ptr_cast<Texture2D>(texture_unit.bound_texture())->sample_texel(uv);
texel = texel * static_ptr_cast<Texture2D>(texture_unit.bound_texture())->sampler().sample(uv);
}
return texel;