bgfx/examples/24-nbody/cs_indirect.sc
Бранимир Караџић 4581f14cd4 Happy New Year!
2022-01-15 11:59:06 -08:00

17 lines
410 B
Python

/*
* Copyright 2014 Stanlo Slasinski. All rights reserved.
* License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE
*/
#include "bgfx_compute.sh"
#include "uniforms.sh"
BUFFER_WR(indirectBuffer, uvec4, 0);
NUM_THREADS(1, 1, 1)
void main()
{
drawIndexedIndirect(indirectBuffer, 0, 6, u_dispatchSize * threadGroupUpdateSize, 0, 0, 0);
dispatchIndirect(indirectBuffer, 1, u_dispatchSize, 1, 1);
}