.. | .. |
---|
12453 | 12453 | |
---|
12454 | 12454 | //gl.glProgramEnvParameter4fvARB(GL.GL_FRAGMENT_PROGRAM_ARB, 127, lightParams, 0); |
---|
12455 | 12455 | |
---|
12456 | | - String program0 = |
---|
| 12456 | + String programmin = |
---|
12457 | 12457 | // Min shader |
---|
12458 | 12458 | "!!ARBfp1.0\n" + |
---|
12459 | 12459 | "PARAM zero123 = { 0.0, 1.0, 2, 1.25 };" + |
---|
.. | .. |
---|
12520 | 12520 | "MOV result.color, temp;" + |
---|
12521 | 12521 | "END"; |
---|
12522 | 12522 | |
---|
12523 | | - String program = |
---|
| 12523 | + String programmax = |
---|
12524 | 12524 | "!!ARBfp1.0\n" + |
---|
12525 | 12525 | |
---|
12526 | 12526 | //"OPTION ARB_fragment_program_shadow;" + |
---|
.. | .. |
---|
13376 | 13376 | //once = true; |
---|
13377 | 13377 | } |
---|
13378 | 13378 | |
---|
| 13379 | + String program = programmax; |
---|
| 13380 | + |
---|
| 13381 | + if (Globals.MINSHADER) |
---|
| 13382 | + { |
---|
| 13383 | + program = programmin; |
---|
| 13384 | + } |
---|
| 13385 | + |
---|
13379 | 13386 | System.out.print("Program #" + mode + "; instructions = " + program.split(";").length + "; length = " + program.length()); |
---|
13380 | 13387 | System.out.println(" - " + (mode >> 3) + " lights; " + ((mode & 2) == 2 ? "anisoUV " : "") + ((mode & 4) == 4 ? "SoftShadow " : "")); |
---|
13381 | 13388 | loadProgram(gl, GL.GL_FRAGMENT_PROGRAM_ARB, program); |
---|
.. | .. |
---|
16667 | 16674 | gl.glLoadIdentity(); |
---|
16668 | 16675 | gl.glScalef(1,ratio,1); |
---|
16669 | 16676 | |
---|
16670 | | - colorV[0] = 2; |
---|
16671 | | - colorV[1] = 2; |
---|
16672 | | - colorV[2] = 2; |
---|
16673 | | - colorV[3] = 1; |
---|
16674 | | - gl.glDisable(gl.GL_COLOR_MATERIAL); |
---|
16675 | | - gl.glMaterialfv(gl.GL_FRONT_AND_BACK, gl.GL_AMBIENT, colorV, 0); |
---|
16676 | | - |
---|
16677 | | - gl.glLightModelfv(gl.GL_LIGHT_MODEL_AMBIENT, ambientLight, 0); |
---|
| 16677 | +// colorV[0] = 2; |
---|
| 16678 | +// colorV[1] = 2; |
---|
| 16679 | +// colorV[2] = 2; |
---|
| 16680 | +// colorV[3] = 1; |
---|
| 16681 | +// gl.glDisable(gl.GL_COLOR_MATERIAL); |
---|
| 16682 | +// gl.glMaterialfv(gl.GL_FRONT_AND_BACK, gl.GL_AMBIENT, colorV, 0); |
---|
| 16683 | +// |
---|
| 16684 | +// gl.glLightModelfv(gl.GL_LIGHT_MODEL_AMBIENT, ambientLight, 0); |
---|
16678 | 16685 | |
---|
16679 | 16686 | //gl.glActiveTexture(GL.GL_TEXTURE1); |
---|
16680 | 16687 | //gl.glDisable(GL.GL_TEXTURE_CUBE_MAP); |
---|
.. | .. |
---|
16688 | 16695 | // GL_NORMAL_MAP texgen mode. Temporarily enabling lighting |
---|
16689 | 16696 | // causes the normals to be sent down. Thanks to Ken Dyke. |
---|
16690 | 16697 | //gl.glEnable(GL.GL_LIGHTING); |
---|
16691 | | - gl.glEnable(GL.GL_LIGHTING); |
---|
| 16698 | + gl.glDisable(GL.GL_LIGHTING); |
---|
16692 | 16699 | |
---|
16693 | 16700 | gl.glTexGeni(GL.GL_S, GL.GL_TEXTURE_GEN_MODE, GL.GL_NORMAL_MAP); |
---|
16694 | 16701 | gl.glTexGeni(GL.GL_T, GL.GL_TEXTURE_GEN_MODE, GL.GL_NORMAL_MAP); |
---|