本文整理汇总了C#中IGraphicsContext.BlendFunc方法的典型用法代码示例。如果您正苦于以下问题:C# IGraphicsContext.BlendFunc方法的具体用法?C# IGraphicsContext.BlendFunc怎么用?C# IGraphicsContext.BlendFunc使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IGraphicsContext
的用法示例。
在下文中一共展示了IGraphicsContext.BlendFunc方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: window_Load
void window_Load(object sender, EventArgs e)
{
this.GraphicsContext = new DebugGraphicsContext(new OpenGLGraphicsContext());
var locator = new ServiceLocator();
locator.RegisterService<IGraphicsContext>(this.GraphicsContext);
var resourceLoader = new ResourceLoader();
resourceLoader.AddImportersAndProcessors(typeof(ResourceLoader).Assembly);
this.Resourses = new ResourceContext(locator, new TypeReaderFactory(), new TypeWriterFactory(), resourceLoader,
Path.Combine(this.resourceFolder, "Assets"), this.resourceFolder);
this.Resourses.ShouldSaveAllLoadedAssets = false;
pixel = this.Resourses.LoadAsset<TextureAtlas>("Fonts\\Metro_W_Pixel.atlas")["pixel"];
var effect = this.Resourses.LoadAsset<ShaderProgram>("Basic.effect");
this.spriteBuffer = new SpriteBuffer(this.GraphicsContext, effect);
this.guiRenderer = new GUIRenderer(this.spriteBuffer, pixel);
window.VSync = VSyncMode.Off;
window.Keyboard.KeyRepeat = true;
// Other state
GraphicsContext.Enable(EnableCap.Blend);
GraphicsContext.Enable(EnableCap.ScissorTest);
GraphicsContext.BlendFunc(BlendingFactorSrc.One, BlendingFactorDest.OneMinusSrcAlpha);
var factory = CreateGUIFactory();
this.Load(factory);
clock = new Clock();
}