()
| 1348 | |
| 1349 | |
| 1350 | public Parameters getParameters() { |
| 1351 | Parameters res = new Parameters(); |
| 1352 | |
| 1353 | if (glTarget == PGL.TEXTURE_2D) { |
| 1354 | res.target = TEX2D; |
| 1355 | } |
| 1356 | |
| 1357 | if (glFormat == PGL.RGB) { |
| 1358 | res.format = RGB; |
| 1359 | } else if (glFormat == PGL.RGBA) { |
| 1360 | res.format = ARGB; |
| 1361 | } else if (glFormat == PGL.ALPHA) { |
| 1362 | res.format = ALPHA; |
| 1363 | } |
| 1364 | |
| 1365 | if (glMagFilter == PGL.NEAREST && glMinFilter == PGL.NEAREST) { |
| 1366 | res.sampling = POINT; |
| 1367 | res.mipmaps = false; |
| 1368 | } else if (glMagFilter == PGL.NEAREST && glMinFilter == PGL.LINEAR) { |
| 1369 | res.sampling = LINEAR; |
| 1370 | res.mipmaps = false; |
| 1371 | } else if (glMagFilter == PGL.NEAREST && |
| 1372 | glMinFilter == PGL.LINEAR_MIPMAP_NEAREST) { |
| 1373 | res.sampling = LINEAR; |
| 1374 | res.mipmaps = true; |
| 1375 | } else if (glMagFilter == PGL.LINEAR && glMinFilter == PGL.LINEAR) { |
| 1376 | res.sampling = BILINEAR; |
| 1377 | res.mipmaps = false; |
| 1378 | } else if (glMagFilter == PGL.LINEAR && |
| 1379 | glMinFilter == PGL.LINEAR_MIPMAP_NEAREST) { |
| 1380 | res.sampling = BILINEAR; |
| 1381 | res.mipmaps = true; |
| 1382 | } else if (glMagFilter == PGL.LINEAR && |
| 1383 | glMinFilter == PGL.LINEAR_MIPMAP_LINEAR) { |
| 1384 | res.sampling = TRILINEAR; |
| 1385 | res.mipmaps = true; |
| 1386 | } |
| 1387 | |
| 1388 | if (glWrapS == PGL.CLAMP_TO_EDGE) { |
| 1389 | res.wrapU = CLAMP; |
| 1390 | } else if (glWrapS == PGL.REPEAT) { |
| 1391 | res.wrapU = REPEAT; |
| 1392 | } |
| 1393 | |
| 1394 | if (glWrapT == PGL.CLAMP_TO_EDGE) { |
| 1395 | res.wrapV = CLAMP; |
| 1396 | } else if (glWrapT == PGL.REPEAT) { |
| 1397 | res.wrapV = REPEAT; |
| 1398 | } |
| 1399 | |
| 1400 | return res; |
| 1401 | } |
| 1402 | |
| 1403 | |
| 1404 | /** |
no outgoing calls
no test coverage detected