Lines Matching defs:grid
243 (1) Generate an irregular grid covering the whole screen (i.e. (-1,-1) to (1,1));
244 (2) Generate a list of triangles covering the grid;
261 static Vertex grid[GRID_SIZE + 1][GRID_SIZE + 1];
263 // Generate grid vertices
271 // Pseudo-random grid vertex coordinate with scale & bias
272 grid[x][y].x = normx * 2.f - 1.f + deFloatSin(normx * DE_PI * 13.f) * 0.3f / GRID_SIZE;
273 grid[x][y].y = normy * 2.f - 1.f + deFloatSin(normy * DE_PI * 13.f) * 0.3f / GRID_SIZE;
282 // Generate first triangle of grid block
283 list[(x + y * GRID_SIZE) * 2 + 0].v0 = grid[x][y];
284 list[(x + y * GRID_SIZE) * 2 + 0].v1 = grid[x + 1][y];
285 list[(x + y * GRID_SIZE) * 2 + 0].v2 = grid[x + 1][y + 1];
287 // Generate second triangle of grid block
288 list[(x + y * GRID_SIZE) * 2 + 1].v0 = grid[x + 1][y + 1];
289 list[(x + y * GRID_SIZE) * 2 + 1].v1 = grid[x][y + 1];
290 list[(x + y * GRID_SIZE) * 2 + 1].v2 = grid[x][y];
326 // Issue the whole grid using multiple separate draw commands