Merge pull request #1288 from phantom10111/array-proxy-with-raw-arrays

Add ArrayProxy constructors with support for raw array with size
This commit is contained in:
Andreas Süßenbach
2022-04-19 17:38:31 +02:00
committed by GitHub
5 changed files with 226 additions and 66 deletions

View File

@@ -185,6 +185,10 @@ c.setScissor(0, scissorRect);
// pass a temporary value.
c.setScissor(0, { { 0, 0 },{ 640, 480 } });
// pass a fixed size array
vk::Rect2D scissorRects[2] = { { { 0, 0 }, { 320, 240 } }, { { 320, 240 }, { 320, 240 } } };
c.setScissor(0, scissorRects);
// generate a std::initializer_list using two rectangles from the stack. This might generate a copy of the rectangles.
vk::Rect2D scissorRect1 = { { 0, 0 },{ 320, 240 } };
vk::Rect2D scissorRect2 = { { 320, 240 },{ 320, 240 } };