mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:38:11 +00:00
LibGL: Implement glBindTexture()
Textures are now initialized with a nullptr upon generation. They are only actually created once they are bound to a target. Currently only the GL_TEXTURE_2D target is supported. The software rasterizer now allows rendering with or without a bound TEXTURE_2D.
This commit is contained in:
parent
fde0045ebe
commit
755393e684
8 changed files with 85 additions and 4 deletions
|
@ -414,6 +414,13 @@ SoftwareRasterizer::SoftwareRasterizer(const Gfx::IntSize& min_size)
|
|||
{
|
||||
}
|
||||
|
||||
void SoftwareRasterizer::submit_triangle(const GLTriangle& triangle)
|
||||
{
|
||||
rasterize_triangle(m_options, *m_render_target, *m_depth_buffer, triangle, [](const FloatVector2&, const FloatVector4& color) -> FloatVector4 {
|
||||
return color;
|
||||
});
|
||||
}
|
||||
|
||||
void SoftwareRasterizer::submit_triangle(const GLTriangle& triangle, const Texture2D& texture)
|
||||
{
|
||||
rasterize_triangle(m_options, *m_render_target, *m_depth_buffer, triangle, [&texture](const FloatVector2& uv, const FloatVector4& color) -> FloatVector4 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue