public ObjFile(string Filename, bool IgnoreMats) { _IgnoreMaterials = IgnoreMats; TexUtil.InitTexturing(); if (Filename != string.Empty) { ParseObj(Filename); } }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); GL.Enable(EnableCap.DepthTest); TexUtil.InitTexturing(); GL.Hint(HintTarget.PerspectiveCorrectionHint, HintMode.Nicest); GL.DepthFunc(DepthFunction.Lequal); GL.ColorMaterial(MaterialFace.FrontAndBack, ColorMaterialParameter.AmbientAndDiffuse); GL.Enable(EnableCap.ColorMaterial); GL.Enable(EnableCap.Blend); GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha); GL.Ext.BindFramebuffer(FramebufferTarget.FramebufferExt, 0); // render per default onto screen, not some FBO OpenVideoStream(); }