MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / getDrawBuffer

Method getDrawBuffer

src/main/java/net/optifine/shaders/Shaders.java:2424–2459  ·  view source on GitHub ↗
(Program p, String str, int ic)

Source from the content-addressed store, hash-verified

2422 }
2423
2424 private static int getDrawBuffer(Program p, String str, int ic)
2425 {
2426 int i = 0;
2427
2428 if (ic >= str.length())
2429 {
2430 return i;
2431 }
2432 else
2433 {
2434 int j = str.charAt(ic) - 48;
2435
2436 if (p == ProgramShadow)
2437 {
2438 if (j >= 0 && j <= 1)
2439 {
2440 i = j + 36064;
2441 usedShadowColorBuffers = Math.max(usedShadowColorBuffers, j);
2442 }
2443
2444 return i;
2445 }
2446 else
2447 {
2448 if (j >= 0 && j <= 7)
2449 {
2450 p.getToggleColorTextures()[j] = true;
2451 i = j + 36064;
2452 usedColorAttachs = Math.max(usedColorAttachs, j);
2453 usedColorBuffers = Math.max(usedColorBuffers, j);
2454 }
2455
2456 return i;
2457 }
2458 }
2459 }
2460
2461 private static void updateToggleBuffers(Program p)
2462 {

Callers 1

initDrawBuffersMethod · 0.95

Calls 2

lengthMethod · 0.80

Tested by

no test coverage detected