Esempio n. 1
0
        public Texture3D(
            GraphicsDevice graphicsDevice,
            int width,
            int height,
            int depth,
            bool mipMap,
            SurfaceFormat format
            )
        {
            if (graphicsDevice == null)
            {
                throw new ArgumentNullException("graphicsDevice");
            }

            GraphicsDevice = graphicsDevice;
            Width          = width;
            Height         = height;
            Depth          = depth;
            LevelCount     = mipMap ? CalculateMipLevels(width, height) : 1;
            Format         = format;

            texture = FNA3D.FNA3D_CreateTexture3D(
                GraphicsDevice.GLDevice,
                Format,
                Width,
                Height,
                Depth,
                LevelCount
                );
        }
Esempio n. 2
0
        public Texture3D(
            int width,
            int height,
            int depth,
            bool mipMap,
            SurfaceFormat format
            )
        {
            GraphicsDevice = GraphicsDeviceManager.Instance.GraphicsDevice;
            Width          = width;
            Height         = height;
            Depth          = depth;
            LevelCount     = mipMap ? CalculateMipLevels(width, height) : 1;
            Format         = format;

            texture = FNA3D.FNA3D_CreateTexture3D(
                GraphicsDevice.GLDevice,
                Format,
                Width,
                Height,
                Depth,
                LevelCount
                );
        }