mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:48:11 +00:00
LibGL: Implement glGetTexImage
The plumbing was already there in LibGPU, so all that was left was to implement the API :^)
This commit is contained in:
parent
4f69022c32
commit
8ab410a536
6 changed files with 46 additions and 0 deletions
|
@ -11,6 +11,14 @@
|
|||
|
||||
namespace GL {
|
||||
|
||||
void Texture2D::download_texture_data(GLuint lod, GPU::ImageDataLayout output_layout, GLvoid* pixels)
|
||||
{
|
||||
if (device_image().is_null())
|
||||
return;
|
||||
|
||||
device_image()->read_texels(0, lod, { 0, 0, 0 }, pixels, output_layout);
|
||||
}
|
||||
|
||||
void Texture2D::upload_texture_data(GLuint lod, GLenum internal_format, GPU::ImageDataLayout input_layout, GLvoid const* pixels)
|
||||
{
|
||||
// NOTE: Some target, format, and internal formats are currently unsupported.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue