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