nngn
|
Functions | |
function grid | init (prog, pos) |
function grid | update () |
function | collision (prog, dt, grid, pos, vel, forces, wait) |
function | integrate (prog, dt, forces, vel, pos, wait) |
function | update (prog, grid, forces, vel, pos_v, pos, entities) |
Variables | |
camera = require "nngn.lib.camera" | |
entity = require "nngn.lib.entity" | |
input = require "nngn.lib.input" | |
texture = require "nngn.lib.texture" | |
N< const > = math.tointeger(2 ^ 12) | |
PARTICLE_SIZE< const > = 4 | |
SIZE< const > = 512 | |
BUFFER_SIZE< const > = 4 * N | |
TILE_SIZE< const > = 32 | |
GRID_SIZE< const > = SIZE / 2 | |
GRID_CELLS< const > = 16 | |
G< const > = 9.8 * TILE_SIZE | |
KERNEL< const > = "collision_by_particle" | |
Compute | opencl_params {version = {3, 0}}) |
LIMITS< const > = nngn:compute():get_limits() | |
LOCAL_SIZE< const > = LIMITS[Compute.WORK_GROUP_SIZE + 1] | |
grid< const > = {kernel = 0} | |
function collision | ( | prog | , |
dt | , | ||
grid | , | ||
pos | , | ||
vel | , | ||
forces | , | ||
wait | |||
) |
function grid init | ( | prog | , |
pos | |||
) |
function integrate | ( | prog | , |
dt | , | ||
forces | , | ||
vel | , | ||
pos | , | ||
wait | |||
) |
function grid update | ( | ) |
BUFFER_SIZE< const > = 4 * N |
camera = require "nngn.lib.camera" |
entity = require "nngn.lib.entity" |
G< const > = 9.8 * TILE_SIZE |
grid< const > = {kernel = 0} |
GRID_CELLS< const > = 16 |
GRID_SIZE< const > = SIZE / 2 |
input = require "nngn.lib.input" |
KERNEL< const > = "collision_by_particle" |
LIMITS< const > = nngn:compute():get_limits() |
LOCAL_SIZE< const > = LIMITS[Compute.WORK_GROUP_SIZE + 1] |
N< const > = math.tointeger(2 ^ 12) |
Compute opencl_params {version = {3, 0}}) |
PARTICLE_SIZE< const > = 4 |
SIZE< const > = 512 |
texture = require "nngn.lib.texture" |
TILE_SIZE< const > = 32 |