Ejemplo n.º 1
0
        public uint GetLevelCount()
        {
            ComInterface.IDirect3DTexture9 obj = null;
            uint result = this.getLevelCount(this.comObject);

            return(result);
        }
Ejemplo n.º 2
0
 internal Direct3DTexture9(ComInterface.IDirect3DTexture9 obj, IntPtr sharedhandle)
 {
     this.comObject      = obj;
     this.native         = Marshal.GetIUnknownForObject(this.comObject);
     this.m_sharedhandle = sharedhandle;
     ComInterface.GetComMethod(this.comObject, 13, out this.getLevelCount);
     ComInterface.GetComMethod(this.comObject, 18, out this.getSurfaceLevel);
 }
        public Direct3DSurface9 CreateTexture(uint Width, uint Height, uint Levels, uint Usage, int Format, int Pool, ref IntPtr pSharedHandle)
        {
            ComInterface.IDirect3DTexture9 obj = null;
            int result = this.createTexture(this.comObject, Width, Height, Levels, Usage, Format, Pool, out obj, ref pSharedHandle);

            Marshal.ThrowExceptionForHR(result);

            return(null);
        }
Ejemplo n.º 4
0
 private void Release()
 {
     if (this.comObject != null)
     {
         Marshal.ReleaseComObject(this.comObject);
         this.comObject       = null;
         this.getSurfaceLevel = null;
     }
 }
Ejemplo n.º 5
0
 private void Release()
 {
     if (this.comObject != null)
     {
         Marshal.ReleaseComObject(this.comObject);
         this.comObject = null;
         this.getSurfaceLevel = null;
     }
 }
Ejemplo n.º 6
0
 private void Release()
 {
     if (_comObject != null)
     {
         Marshal.ReleaseComObject(_comObject);
         _comObject       = null;
         _getSurfaceLevel = null;
     }
 }
Ejemplo n.º 7
0
        public Direct3DTexture9 CreateOffscreenPlainSurface(uint Width, uint Height, int Format, int Pool)
        {
            IntPtr handle = new IntPtr(0);

            ComInterface.IDirect3DTexture9 obj = null;
            int result = this.createOffscreenPlainSurface(this.comObject, Width, Height, Format, Pool, out obj, ref handle);

            Marshal.ThrowExceptionForHR(result);

            return(new Direct3DTexture9(obj, handle));
        }
Ejemplo n.º 8
0
        private void Release()
        {
            if (this.comObject != null)
            {
                Marshal.Release(this.native);
                this.native = IntPtr.Zero;

                Marshal.ReleaseComObject(this.comObject);
                this.comObject = null;
            }
        }
Ejemplo n.º 9
0
        public Direct3DTexture9 CreateTexture(uint width, uint height, uint levels, int usage, int format,
                                              int pool, ref IntPtr sharedHandle)
        {
            ComInterface.IDirect3DTexture9 obj = null;
            int result = _createTexture(_comObject, width, height, levels, usage, format, pool, out obj,
                                        ref sharedHandle);

            Marshal.ThrowExceptionForHR(result);

            return(new Direct3DTexture9(obj));
        }
Ejemplo n.º 10
0
 internal Direct3DTexture9(ComInterface.IDirect3DTexture9 obj)
 {
     this.comObject = obj;
     ComInterface.GetComMethod(this.comObject, 18, out this.getSurfaceLevel);
 }
Ejemplo n.º 11
0
 internal Direct3DTexture9(ComInterface.IDirect3DTexture9 obj)
 {
     this.comObject = obj;
     ComInterface.GetComMethod(this.comObject, 18, out this.getSurfaceLevel);
 }