private static void CreateFragmentProgram(ref FragmentCacheStruct ThisFP) { ThisFP.GLID = CreateFragmentProgram(ThisFP.Mux0, ThisFP.Mux1); }
public static void CheckFragmentCache(UInt32 Mux0, UInt32 Mux1) { foreach (FragmentCacheStruct ThisCache in FragmentCache) { if (ThisCache.Mux0 == Mux0 && ThisCache.Mux1 == Mux1) { GL.Arb.BindProgram(AssemblyProgramTargetArb.FragmentProgram, ThisCache.GLID); if (EnableCombiner == true) GL.Enable((EnableCap)All.FragmentProgram); return; } } FragmentCacheStruct NewCache = new FragmentCacheStruct(); NewCache.UnpackedMux = UnpackCombinerMux(Mux0, Mux1); NewCache.Mux0 = Mux0; NewCache.Mux1 = Mux1; CreateFragmentProgram(ref NewCache); GL.Arb.BindProgram(AssemblyProgramTargetArb.FragmentProgram, NewCache.GLID); if (EnableCombiner == true) GL.Enable((EnableCap)All.FragmentProgram); FragmentCache.Add(NewCache); }