Ejemplo n.º 1
0
        /// <summary>
        /// See BlWindow3D for details.
        /// </summary>
        public BlWindow3D()
        {
            CreationThread = Thread.CurrentThread.ManagedThreadId;

            Graphics = new BlGraphicsDeviceManager(this);
            Window.AllowUserResizing = true;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructs a sprite
 /// </summary>
 /// <param name="graphicsIn">The BlGraphicsDeviceManager that operates on this sprite</param>
 /// <param name="name">The name of the sprite (must be unique among other sprites in the same subsprite list)</param>
 /// <param name="frameProc">The delegate to run every frame</param>
 public BlSprite(BlGraphicsDeviceManager graphicsIn, string name, FrameProcType frameProc = null)
 {
     FrameProc = frameProc;
     if (FrameProc != null)
     {
         graphicsIn.Window.FrameProcSpritesAdd(this);
     }
     CreationThread = Thread.CurrentThread.ManagedThreadId;
     Graphics       = graphicsIn;
     Name           = name;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates the mipmaps from the specified texture.
 /// </summary>
 /// <param name="graphics">Graphics device (typically the one owned by your BlWindow3D)</param>
 /// <param name="tex">Texture from which to create mipmaps, typically gotten from BlGraphics#LoadFromImageFile.</param>
 /// <param name="numMaps">Maximum number of mipmaps to create (none are created with lower resolution than 16x16)</param>
 /// <param name="reverseX">Whether to reverse pixels horizontally</param>
 /// <param name="reverseY">Whether to reverse pixels vertically</param>
 public BlMipmap(BlGraphicsDeviceManager graphics, Texture2D tex, int numMaps = 999, bool reverseX = false, bool reverseY = false)
 {
     CreationThread = Thread.CurrentThread.ManagedThreadId;
     Graphics       = graphics;
     CreateMipmaps(tex, numMaps, reverseX, reverseY);
 }