gl.glBindTexture(GL.GL_TEXTURE_2D, dynamicTextureIDs[CA_TEXTURE_NORMAL_MAP]);
dynamicTextures[CA_TEXTURE_NORMAL_MAP].bind();
  private void createNormalMap(GL gl) {    // use the height output on all four texture stages    for (int i = 0; i < 4; i++) {      gl.glActiveTexture(GL.GL_TEXTURE0 + i);      gl.glBindTexture(GL.GL_TEXTURE_2D, texHeightOutput);      gl.glEnable(GL.GL_TEXTURE_2D);    }    // Set constants for red & green scale factors (also essential color masks)    // Red mask first    float[] pixMasks = new float[] { normalSTScale, 0.0f, 0.0f, 0.0f };    gl.glProgramEnvParameter4fvARB(GL.GL_FRAGMENT_PROGRAM_ARB, 0, pixMasks, 0);    // Now green mask & scale:    pixMasks[0] = 0.0f;    pixMasks[1] = normalSTScale;    gl.glProgramEnvParameter4fvARB(GL.GL_FRAGMENT_PROGRAM_ARB, 1, pixMasks, 0);    gl.glCallList(displayListIDs[CA_FRAGMENT_PROGRAM_CREATE_NORMAL_MAP]);    // set vp offsets to nearest neighbors    gl.glProgramEnvParameter4fARB(GL.GL_VERTEX_PROGRAM_ARB, CV_UV_OFFSET_TO_USE, 4, 0, 0, 0);    gl.glEnable(GL.GL_VERTEX_PROGRAM_ARB);        gl.glCallList(displayListIDs[CA_DRAW_SCREEN_QUAD]);    gl.glDisable(GL.GL_FRAGMENT_PROGRAM_ARB);    // Now we need to copy the resulting pixels into the normal map    gl.glActiveTexture(GL.GL_TEXTURE0);    gl.glBindTexture(GL.GL_TEXTURE_2D, dynamicTextureIDs[CA_TEXTURE_NORMAL_MAP]);        // use CopyTexSubImage for speed (even though we copy all of it) since we pre-allocated the texture    gl.glCopyTexSubImage2D(GL.GL_TEXTURE_2D, 0, 0, 0, 0, 0, initialMapDimensions[0], initialMapDimensions[1]);  }