// glx render opcode 146 - map2f /** * @see <a href="glMap2f.html">glMap2f</a> */ public void map2f(int target, float u1, float u2, int ustride, int uorder, float v1, float v2, int vstride, int vorder, float [] points) { int k = 0; switch (target) { case MAP2_INDEX: // fall through case MAP2_TEXTURE_COORD_1: k = 1; break; case MAP2_TEXTURE_COORD_2: k = 2; break; case MAP2_NORMAL: // fall through case MAP2_TEXTURE_COORD_3: // fall through case MAP2_VERTEX_3: k = 3; break; case MAP2_COLOR_4: // fall through case MAP2_TEXTURE_COORD_4: // fall through case MAP2_VERTEX_4: k = 4; break; } int n = vorder * uorder * k * 4; Data data = new Data (n); for (int i=0; i<vorder; i++) for (int j=0; j<uorder; j++) for (int m=0; m<k; m++) data.write4 (points [i*ustride + j*vstride + m]); begin_render_large_request (146, 32, n); render_request.write4 (target); render_request.write4 (u1); render_request.write4 (u2); render_request.write4 (uorder); render_request.write4 (v1); render_request.write4 (v2); render_request.write4 (vorder); end_render_large_request (data); }
// glx render opcode 144 - map1f /** * @see <a href="glMap1f.html">glMap1f</a> */ public void map1f(int target, float u1, float u2, int stride, int order, float [] points) { int k = 0; switch (target) { case MAP1_INDEX: // fall through case MAP1_TEXTURE_COORD_1: k = 1; break; case MAP1_TEXTURE_COORD_2: k = 2; break; case MAP1_NORMAL: // fall through case MAP1_TEXTURE_COORD_3: // fall through case MAP1_VERTEX_3: k = 3; break; case MAP1_COLOR_4: // fall through case MAP1_TEXTURE_COORD_4: // fall through case MAP1_VERTEX_4: k = 4; break; } int n = order * k * 4; Data data = new Data (n); for (int i=0; i<order; i++) for (int j=0; j<k; j++) data.write4 (points [i*stride + j]); begin_render_large_request (144, 20, n); render_request.write4 (target); render_request.write4 (u1); render_request.write4 (u2); render_request.write4 (order); end_render_large_request (data); }