()
| 3669 | } |
| 3670 | |
| 3671 | public static void uninit() |
| 3672 | { |
| 3673 | if (isShaderPackInitialized) |
| 3674 | { |
| 3675 | checkGLError("Shaders.uninit pre"); |
| 3676 | |
| 3677 | for (int i = 0; i < ProgramsAll.length; ++i) |
| 3678 | { |
| 3679 | Program program = ProgramsAll[i]; |
| 3680 | |
| 3681 | if (program.getRef() != 0) |
| 3682 | { |
| 3683 | ARBShaderObjects.glDeleteObjectARB(program.getRef()); |
| 3684 | checkGLError("del programRef"); |
| 3685 | } |
| 3686 | |
| 3687 | program.setRef(0); |
| 3688 | program.setId(0); |
| 3689 | program.setDrawBufSettings((String)null); |
| 3690 | program.setDrawBuffers((IntBuffer)null); |
| 3691 | program.setCompositeMipmapSetting(0); |
| 3692 | } |
| 3693 | |
| 3694 | hasDeferredPrograms = false; |
| 3695 | |
| 3696 | if (dfb != 0) |
| 3697 | { |
| 3698 | EXTFramebufferObject.glDeleteFramebuffersEXT(dfb); |
| 3699 | dfb = 0; |
| 3700 | checkGLError("del dfb"); |
| 3701 | } |
| 3702 | |
| 3703 | if (sfb != 0) |
| 3704 | { |
| 3705 | EXTFramebufferObject.glDeleteFramebuffersEXT(sfb); |
| 3706 | sfb = 0; |
| 3707 | checkGLError("del sfb"); |
| 3708 | } |
| 3709 | |
| 3710 | if (dfbDepthTextures != null) |
| 3711 | { |
| 3712 | GlStateManager.deleteTextures(dfbDepthTextures); |
| 3713 | fillIntBufferZero(dfbDepthTextures); |
| 3714 | checkGLError("del dfbDepthTextures"); |
| 3715 | } |
| 3716 | |
| 3717 | if (dfbColorTextures != null) |
| 3718 | { |
| 3719 | GlStateManager.deleteTextures(dfbColorTextures); |
| 3720 | fillIntBufferZero(dfbColorTextures); |
| 3721 | checkGLError("del dfbTextures"); |
| 3722 | } |
| 3723 | |
| 3724 | if (sfbDepthTextures != null) |
| 3725 | { |
| 3726 | GlStateManager.deleteTextures(sfbDepthTextures); |
| 3727 | fillIntBufferZero(sfbDepthTextures); |
| 3728 | checkGLError("del shadow depth"); |
no test coverage detected