Example #1
0
 internal Direct3DDevice9(ComInterface.IDirect3DDevice9 obj)
 {
     this.comObject = obj;
     ComInterface.GetComMethod(this.comObject, 23, out this.createTexture);
     ComInterface.GetComMethod(this.comObject, 28, out this.createRenderTarget);
     ComInterface.GetComMethod(this.comObject, 36, out this.createOffscreenPlainSurface);
 }
Example #2
0
 private void Release()
 {
     if (this.comObject != null)
     {
         Marshal.ReleaseComObject(this.comObject);
         this.comObject          = null;
         this.createRenderTarget = null;
     }
 }
Example #3
0
        public Direct3DDevice9 CreateDevice(uint Adapter, int DeviceType, IntPtr hFocusWindow, int BehaviorFlags,
                                            NativeStructs.D3DPRESENT_PARAMETERS pPresentationParameters, NativeStructs.D3DDISPLAYMODE pFullscreenDisplayMode)
        {
            ComInterface.IDirect3DDevice9 obj = null;
            int result = this.createDevice(this.comObject, Adapter, DeviceType, hFocusWindow, BehaviorFlags, pPresentationParameters, out obj);

            Marshal.ThrowExceptionForHR(result);

            return(new Direct3DDevice9(obj));
        }