public bool Add(FrameBuffer frameBuffer)
 {
     if ( targets.Count == 0 )
     {
         targets.Add( frameBuffer );
         return true;
     }
     return false;
 }
Ejemplo n.º 2
0
        public static FrameBuffer Create(Device device)
        {
            FrameBuffer newBuffer       = new FrameBuffer();
            newBuffer.d3dSwapChain      = device.D3dDevice.GetSwapChain(0);
            newBuffer.d3dBackBuffer     = newBuffer.d3dSwapChain.GetBackBuffer(0,D3d.BackBufferType.Mono );
            newBuffer.d3dDepthBuffer    = device.D3dDevice.DepthStencilSurface;
            newBuffer.d3dDevice         = device;

            return newBuffer;
        }
Ejemplo n.º 3
0
        private bool Initialize(System.Windows.Forms.Control renderWindow)
        {
            d3dSettings = new Settings();
            d3dDevice   = DeviceUtility.CreateDevice(d3dSettings, renderWindow);

            if (d3dDevice != null)
            {
                d3dCapabilities       = new Capabilities(this);
                d3dPrimaryFrameBuffer = FrameBuffer.Create(this);
                d3dGeometryManager    = GeometryManager.Create(this);
                d3dTextureManager     = TextureManager.Create(this);
                d3dQueryManager       = QueryManager.Create(this);

                return(true);
            }
            return(false);
        }
Ejemplo n.º 4
0
        private bool Initialize(System.Windows.Forms.Control renderWindow )
        {
            d3dSettings     = new Settings();
            d3dDevice       = DeviceUtility.CreateDevice( d3dSettings,renderWindow );

            if (d3dDevice != null)
            {
                d3dCapabilities         = new Capabilities(this);

                // Create subsystems.
                d3dPrimaryFrameBuffer   = FrameBuffer.Create( this );
                d3dGeometryManager      = GeometryManager.Create( this );
                d3dTextureManager       = TextureManager.Create(this);
                d3dQueryManager         = QueryManager.Create(this);
                d3dCompiler             = Compiler.Create(this);

                return true;
            }
            return false;
        }