mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:27:43 +00:00
LibSoftGPU: Add device method for creating images
This commit is contained in:
parent
91ccf9958f
commit
b8bb72abbe
5 changed files with 192 additions and 0 deletions
|
@ -801,4 +801,15 @@ float Device::get_depthbuffer_value(int x, int y)
|
|||
return m_depth_buffer->scanline(y)[x];
|
||||
}
|
||||
|
||||
NonnullRefPtr<Image> Device::create_image(ImageFormat format, unsigned width, unsigned height, unsigned depth, unsigned levels, unsigned layers)
|
||||
{
|
||||
VERIFY(width > 0);
|
||||
VERIFY(height > 0);
|
||||
VERIFY(depth > 0);
|
||||
VERIFY(levels > 0);
|
||||
VERIFY(layers > 0);
|
||||
|
||||
return adopt_ref(*new Image(format, width, height, depth, levels, layers));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue