MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / SetScissors

Method SetScissors

deps/LLGL/sources/Renderer/Vulkan/VKCommandBuffer.cpp:433–450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

431}
432
433void VKCommandBuffer::SetScissors(std::uint32_t numScissors, const Scissor* scissors)
434{
435 if (scissorEnabled_)
436 {
437 VkRect2D scissorsVK[g_maxNumViewportsPerBatch];
438
439 for (std::uint32_t i = 0, first = 0, count = 0; i < numScissors; numScissors -= count)
440 {
441 /* Convert viewport to VkViewport types */
442 count = std::min(numScissors, g_maxNumViewportsPerBatch);
443
444 for (first = i; i < first + count; ++i)
445 VKTypes::Convert(scissorsVK[i - first], scissors[i]);
446
447 vkCmdSetScissor(commandBuffer_, first, count, scissorsVK);
448 }
449 }
450}
451
452/* ----- Clear ----- */
453

Callers 1

Calls 1

ConvertFunction · 0.70

Tested by

no test coverage detected