本文整理汇总了C#中Texture.Unlock方法的典型用法代码示例。如果您正苦于以下问题:C# Texture.Unlock方法的具体用法?C# Texture.Unlock怎么用?C# Texture.Unlock使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Texture
的用法示例。
在下文中一共展示了Texture.Unlock方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PlanetEarth
public PlanetEarth(RenderSystem rs)
{
renderSys = rs;
unsafe
{
if (defaultNMap == null)
{
defaultNMap = TextureManager.Instance.CreateInstance(1, 1, 1, ImagePixelFormat.A8R8G8B8);
uint* dst = (uint*)defaultNMap.Lock(0, LockMode.None).Pointer;
*dst = 0xff8080ff;
defaultNMap.Unlock(0);
}
}
terrainTiles = new TerrainTile[ColTileCount * LatTileCount];
for (int i = 1, index = 0; i < ColTileCount * 2; i += 2)
{
for (int j = 1; j < LatTileCount * 2; j += 2)
{
terrainTiles[index++] = new TerrainTile(renderSys, i, j + LatTileStart);
}
}
//base.ModelL0 = earthSphere;
BoundingSphere.Radius = PlanetRadius;
}
示例2: GamePostRenderer
unsafe public GamePostRenderer(RenderSystem rs, RtsCamera camera)
{
this.factory = rs.ObjectFactory;
this.renderSys = rs;
this.camera = camera;
compEff = new Composite(rs);
gaussBlur = new GaussBlur(rs);
edgeEff = new EdgeDetect(rs);
depthViewEff = new DepthView(rs);
vtxDecl = factory.CreateVertexDeclaration(RectVertex.Elements);
whitePixel = factory.CreateTexture(1, 1, 1, TextureUsage.StaticWriteOnly, ImagePixelFormat.A8R8G8B8);
*(uint*)whitePixel.Lock(0, LockMode.None).Pointer.ToPointer() = 0xffffffff;
whitePixel.Unlock(0);
LoadUnmanagedResources();
}