| 47 | } |
| 48 | |
| 49 | void Test_PixelOperations() |
| 50 | { |
| 51 | auto img1 = LoadImage("Media/Textures/Grid.png", LLGL::ImageFormat::RGBA); |
| 52 | |
| 53 | LLGL::Image img1Sub { LLGL::Extent3D { 109, 110, 1 }, LLGL::ImageFormat::BGR, img1.GetDataType() }; |
| 54 | |
| 55 | img1.ReadPixels(LLGL::Offset3D { 0, 0, 0 }, img1Sub.GetExtent(), img1Sub.GetDstDesc()); |
| 56 | SaveImagePNG(img1Sub, "Output/img1Sub-a.png"); |
| 57 | |
| 58 | img1.ReadPixels(LLGL::Offset3D { 109, 0, 0 }, img1Sub.GetExtent(), img1Sub.GetDstDesc()); |
| 59 | SaveImagePNG(img1Sub, "Output/img1Sub-b.png"); |
| 60 | |
| 61 | img1.ReadPixels(LLGL::Offset3D { 328, 164, 0 }, img1Sub.GetExtent(), img1Sub.GetDstDesc()); |
| 62 | SaveImagePNG(img1Sub, "Output/img1Sub-c.png"); |
| 63 | |
| 64 | #if 0 |
| 65 | img1.WritePixels(LLGL::Offset3D { 0, 110, 0 }, img1Sub.GetExtent(), img1Sub.GetSrcDesc()); |
| 66 | SaveImagePNG(img1, "Output/img1.png"); |
| 67 | #elif 1 |
| 68 | img1.WritePixels(LLGL::Offset3D { 0, 220, 0 }, LLGL::Extent3D { img1.GetExtent().width, 110, 1 }, img1.GetSrcDesc()); |
| 69 | SaveImagePNG(img1, "Output/img1-write.png"); |
| 70 | #endif |
| 71 | } |
| 72 | |
| 73 | void Test_Blit() |
| 74 | { |
nothing calls this directly
no test coverage detected