Ejemplo n.º 1
0
        private void createTexture(int size)
        {
            VideoDriver drv = device.VideoDriver;

            Texture o = texture;

            texture = drv.AddTexture(new Dimension2Di(size), "tex");

            TexturePainter p = texture.Painter;

            p.Lock(TextureLockMode.WriteOnly);
            for (int i = 0; i < p.MipMapLevelHeight; i++)
            {
                p.SetLine(0, i, p.MipMapLevelWidth - 1, i, new Color(200, 200, 200));
            }
            p.Unlock(true);

            guiImage.Image = texture;
            sceneNodePainter.SetMaterialTexture(0, texture);

            if (o != null)
            {
                drv.RemoveTexture(o);
            }
        }
Ejemplo n.º 2
0
 public Tile(int screenX, int screenY, Dimension2Di screenDimension, VideoDriver driver)
 {
     ScreenPos      = new Vector2Di(screenX, screenY);
     Texture        = driver.AddTexture(screenDimension, string.Format("TileTexture({0},{1})", screenX, screenY));
     TexturePainter = Texture.Painter;
 }
Ejemplo n.º 3
0
			public Tile(int screenX, int screenY, Dimension2Di screenDimension, VideoDriver driver)
			{
				ScreenPos = new Vector2Di(screenX, screenY);
				Texture = driver.AddTexture(screenDimension, string.Format("TileTexture({0},{1})", screenX, screenY));
				TexturePainter = Texture.Painter;
			}