IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

DirectX Discussion :

Problème de redimensionnement


Sujet :

DirectX

  1. #1
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2011
    Messages
    107
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Août 2011
    Messages : 107
    Points : 66
    Points
    66
    Par défaut Problème de redimensionnement
    Bonjour,

    En C#, j'utilise SharpDX avec direct2D pour afficher une ligne blanche dans un panel.
    Au démarrage, tous s'affiche correctement, et lorsque je bouge ma Form en la redimensionnent plusieurs fois, cela se bloque en m'affichant une erreur, car mon constructeur ne marche plus.

    Voici le code:

    Form1.cs
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
     
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
     
    namespace WindowsFormsApplication1
    {
        public partial class Form1 : Form
        {
            public DirectX_2D vue2D;
     
            public Form1()
            {
                InitializeComponent();
            }
     
            private void Form1_SizeChanged(object sender, EventArgs e)
            {
                panel1.Width = this.Width - 40;
                panel1.Height = this.Height - 60;
                // Redéfinie l'affichage
                if (vue2D == null)
                    vue2D = new DirectX_2D(this);
                else
                {
                    vue2D.Dispose();
                    vue2D = new DirectX_2D(this);
                }
                vue2D.Render(this);
            }
     
            private void Form1_Load(object sender, EventArgs e)
            {
                panel1.Width = this.Width - 40;
                panel1.Height = this.Height - 60;
                if (vue2D == null)
                    vue2D = new DirectX_2D(this);
            }
     
            private void panel1_Paint(object sender, PaintEventArgs e)
            {
                if (vue2D == null)
                    vue2D = new DirectX_2D(this);
                vue2D.Render(this);
            }
        }
    }
    vue2D.cs
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
     
    using SharpDX;
    using SharpDX.Direct2D1;
    using SharpDX.DXGI;
    using System;
    using System.Windows.Forms;
     
    namespace WindowsFormsApplication1
    {   
        public class DirectX_2D
        {
            public SharpDX.Direct3D11.Device Device11 = null;
            public SharpDX.Direct3D10.Device1 Device10 = null;
            public SwapChain SwapChain = null;
            public SharpDX.Direct2D1.Factory Factory = null;
            public SharpDX.Direct2D1.RenderTarget Graphic = null;
            public Surface Surface = null;
     
            public DirectX_2D(Form1 form)
            {
                // Initialisation        
                try
                {                
                    // SwapChain description
                    SwapChainDescription descriptionSwap = new SwapChainDescription()
                    {
                        BufferCount = 1,
                        ModeDescription =
                            new ModeDescription(form.panel1.ClientSize.Width, (int)form.panel1.ClientSize.Height, new Rational(60, 1), Format.R8G8B8A8_UNorm),
                        IsWindowed = true,
                        OutputHandle = form.panel1.Handle,
                        SampleDescription = new SampleDescription(1, 0),
                        SwapEffect = SwapEffect.Discard,
                        Usage = Usage.RenderTargetOutput
                    };
                    // DirectX 11
                    SharpDX.Direct3D.FeatureLevel[] levels11 = {SharpDX.Direct3D.FeatureLevel.Level_11_0,SharpDX.Direct3D.FeatureLevel.Level_10_1,
                                                                SharpDX.Direct3D.FeatureLevel.Level_10_0,SharpDX.Direct3D.FeatureLevel.Level_9_3,
                                                                SharpDX.Direct3D.FeatureLevel.Level_9_2,SharpDX.Direct3D.FeatureLevel.Level_9_1};
                    try
                    {
                        SharpDX.Direct3D11.Device.CreateWithSwapChain(SharpDX.Direct3D.DriverType.Hardware, SharpDX.Direct3D11.DeviceCreationFlags.BgraSupport,
                                                                      levels11, descriptionSwap, out Device11, out SwapChain);
                        goto OK1;
                    }
                    catch
                    {
                        goto Suite1;
                    }
                OK1:
                    Factory = new SharpDX.Direct2D1.Factory(FactoryType.SingleThreaded);
                    SharpDX.Direct3D11.Texture2D backBuffer11 = SharpDX.Direct3D11.Texture2D.FromSwapChain<SharpDX.Direct3D11.Texture2D>(SwapChain, 0);
                    Surface = backBuffer11.QueryInterface<Surface>();
                    Graphic = new RenderTarget(Factory, Surface, new RenderTargetProperties(new PixelFormat(Format.R8G8B8A8_UNorm, AlphaMode.Premultiplied)));
                    return;
                // DirectX 10
                Suite1:
                    SharpDX.Direct3D10.FeatureLevel[] levels10 ={SharpDX.Direct3D10.FeatureLevel.Level_10_1,SharpDX.Direct3D10.FeatureLevel.Level_10_0,
                                                               SharpDX.Direct3D10.FeatureLevel.Level_9_3,SharpDX.Direct3D10.FeatureLevel.Level_9_2,                   
                                                               SharpDX.Direct3D10.FeatureLevel.Level_9_1};
                    foreach (var level2 in levels10)
                    {
                        try
                        {
                            SharpDX.Direct3D10.Device1.CreateWithSwapChain(SharpDX.Direct3D10.DriverType.Hardware, SharpDX.Direct3D10.DeviceCreationFlags.BgraSupport,
                                                                            descriptionSwap, level2, out Device10, out SwapChain);
                            goto OK2;
                        }
                        catch (ArgumentException) // E_INVALIDARG
                        {
                            continue; // Try the next feature level
                        }
                        catch (OutOfMemoryException) // E_OUTOFMEMORY
                        {
                            continue; // Try the next feature level
                        }
                        catch (Exception) // SharpDX.Direct3D10.Direct3D10Exception D3DERR_INVALIDCALL or E_FAIL
                        {
                            continue; // Try the next feature level
                        }
                    }
                    throw new SystemException();
                OK2:
                    Factory = new SharpDX.Direct2D1.Factory(FactoryType.SingleThreaded);
                    SharpDX.Direct3D10.Texture2D backBuffer10 = SharpDX.Direct3D10.Texture2D.FromSwapChain<SharpDX.Direct3D10.Texture2D>(SwapChain, 0);
                    Surface = backBuffer10.QueryInterface<Surface>();
                    Graphic = new RenderTarget(Factory, Surface, new RenderTargetProperties(new PixelFormat(Format.R8G8B8A8_UNorm, AlphaMode.Premultiplied)));
                    Graphic.DotsPerInch = new Size2F(96, 96);
                }
                catch (Exception e)
                {
                    MessageBox.Show(e.Message + "  -> Erreur vue2D: construction du device graphique impossible.");
                    Dispose();
                    Environment.Exit(0);
                }
            }
     
            public void Dispose()
            {
                if (Device10 != null)
                {
                    Device10.Dispose();
                    Device10 = null;
                }
                if (Device11 != null)
                {
                    Device11.Dispose();
                    Device11 = null;
                }
                if (SwapChain != null)
                {
                    SwapChain.Dispose();
                    SwapChain = null;
                }
                if (Factory != null)
                {
                    Factory.Dispose();
                    Factory = null;
                }
                if (Graphic != null)
                {
                    Graphic.Dispose();
                    Graphic = null;
                }
            }
     
            public void Render(Form1 form)
            {
                if (Graphic == null)
                    return;
                Graphic.BeginDraw();
                Graphic.Clear(SharpDX.Color.Black);
                StrokeStyleProperties strokeProperties = new StrokeStyleProperties() { StartCap = CapStyle.Round, EndCap = CapStyle.Round };
                StrokeStyle stroke = new StrokeStyle(Factory, strokeProperties);
                SolidColorBrush brush = new SolidColorBrush(Graphic, new Color(255,255,255, 255));
     
                Graphic.DrawLine(new Vector2(0, 0), new Vector2(form.panel1.Width, form.panel1.Height), brush, 1f, stroke);
     
                brush.Dispose();
                stroke.Dispose();
                Graphic.EndDraw();
                SwapChain.Present(0, PresentFlags.None);
            }
     
        }
    }
    Si vous avez une idée, merci d'avance.

  2. #2
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2011
    Messages
    107
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Août 2011
    Messages : 107
    Points : 66
    Points
    66
    Par défaut
    J'ai modifié l'affichage, je n'ai plus d'erreur critique, par contre, l'affichage ne se fait pas correctement.

    En effet, lorsque je Dispose les instances après un redimensionnement, arrivé à "vue2D.depthBuffer.Dispose()" le code ne se poursuit plus, j'ai jamais vu ça (?).

    Form1
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
     
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using SharpDX;
    using SharpDX.Direct2D1;
    using SharpDX.DXGI;
     
    namespace WindowsFormsApplication1
    {
        public partial class Form1 : Form
        {
            public DirectX_2D vue2D;
     
            public Form1()
            {
                InitializeComponent();
                vue2D = new DirectX_2D(this);
            }
     
            private void Form1_SizeChanged(object sender, EventArgs e)
            {
                panel1.Width = this.Width - 40;
                panel1.Height = this.Height - 60;
                // Redéfinie l'affichage
                vue2D.backBuffer.Dispose();
                vue2D.renderTargetView.Dispose();
                vue2D.depthBuffer.Dispose();
                vue2D.depthStencilView.Dispose();
                vue2D.SwapChain.ResizeBuffers(0, panel1.ClientSize.Width, panel1.ClientSize.Height, Format.Unknown, SwapChainFlags.None);
                vue2D.backBuffer = SharpDX.Direct3D11.Texture2D.FromSwapChain<SharpDX.Direct3D11.Texture2D>(vue2D.SwapChain, 0);
                vue2D.renderTargetView = new SharpDX.Direct3D11.RenderTargetView(vue2D.Device11, vue2D.backBuffer);
                vue2D.depthBuffer = new SharpDX.Direct3D11.Texture2D(vue2D.Device11, new SharpDX.Direct3D11.Texture2DDescription()
                {
                    Format = Format.R8G8B8A8_UNorm,
                    ArraySize = 1,
                    MipLevels = 1,
                    Width = panel1.ClientSize.Width,
                    Height = panel1.ClientSize.Height,
                    SampleDescription = new SampleDescription(1, 0),
                    Usage = SharpDX.Direct3D11.ResourceUsage.Default,
                    BindFlags = SharpDX.Direct3D11.BindFlags.DepthStencil,
                    CpuAccessFlags = SharpDX.Direct3D11.CpuAccessFlags.None,
                    OptionFlags = SharpDX.Direct3D11.ResourceOptionFlags.None,
                });
                vue2D.depthStencilView = new SharpDX.Direct3D11.DepthStencilView(vue2D.Device11, vue2D.depthBuffer);
                vue2D.Device11.ImmediateContext.Rasterizer.SetViewport(new Viewport(0, 0, panel1.ClientSize.Width, panel1.ClientSize.Height));
                vue2D.Device11.ImmediateContext.OutputMerger.SetTargets(vue2D.depthStencilView, vue2D.renderTargetView);
                vue2D.Render(this);
            }
     
            private void Form1_Load(object sender, EventArgs e)
            {
                panel1.Width = this.Width - 40;
                panel1.Height = this.Height - 60;
                if (vue2D == null)
                    vue2D = new DirectX_2D(this);
            }
     
            private void panel1_Paint(object sender, PaintEventArgs e)
            {
                vue2D.Render(this);
            }
        }
    }
    Vue2D
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
     
    using SharpDX;
    using SharpDX.Direct2D1;
    using SharpDX.DXGI;
    using System;
    using System.Windows.Forms;
     
    namespace WindowsFormsApplication1
    {
        public class DirectX_2D
        {
            public SharpDX.Direct3D11.Device Device11 = null;
            public SharpDX.Direct3D10.Device1 Device10 = null;
            public SwapChain SwapChain = null;
            public SharpDX.Direct2D1.Factory Factory = null;
            public SharpDX.Direct2D1.RenderTarget Graphic = null;
            public Surface Surface = null;
            public SharpDX.Direct3D11.Texture2D backBuffer = null;
            public SharpDX.Direct3D11.RenderTargetView renderTargetView = null;
            public SharpDX.Direct3D11.Texture2D depthBuffer = null;
            public SharpDX.Direct3D11.DepthStencilView depthStencilView = null;
     
            public DirectX_2D(Form1 form)
            {
                // Initialisation        
                try
                {
                    // SwapChain description
                    SwapChainDescription descriptionSwap = new SwapChainDescription()
                    {
                        BufferCount = 1,
                        ModeDescription =
                            new ModeDescription(form.panel1.ClientSize.Width, form.panel1.ClientSize.Height, new Rational(60, 1), Format.R8G8B8A8_UNorm),
                        IsWindowed = true,
                        OutputHandle = form.panel1.Handle,
                        SampleDescription = new SampleDescription(1, 0),
                        SwapEffect = SwapEffect.Discard,
                        Usage = Usage.RenderTargetOutput
                    };
                    // DirectX 11
                    SharpDX.Direct3D.FeatureLevel[] levels11 = {SharpDX.Direct3D.FeatureLevel.Level_11_0,SharpDX.Direct3D.FeatureLevel.Level_10_1,
                                                                SharpDX.Direct3D.FeatureLevel.Level_10_0,SharpDX.Direct3D.FeatureLevel.Level_9_3,
                                                                SharpDX.Direct3D.FeatureLevel.Level_9_2,SharpDX.Direct3D.FeatureLevel.Level_9_1};
                    try
                    {
                        SharpDX.Direct3D11.DeviceCreationFlags flag = SharpDX.Direct3D11.DeviceCreationFlags.BgraSupport;
                        SharpDX.Direct3D11.Device.CreateWithSwapChain(SharpDX.Direct3D.DriverType.Hardware, flag,
                                                                      levels11, descriptionSwap, out Device11, out SwapChain);
                        backBuffer = SharpDX.Direct3D11.Texture2D.FromSwapChain<SharpDX.Direct3D11.Texture2D>(SwapChain, 0);
                        renderTargetView = new SharpDX.Direct3D11.RenderTargetView(Device11, backBuffer);
                        depthBuffer = new SharpDX.Direct3D11.Texture2D(Device11, new SharpDX.Direct3D11.Texture2DDescription()
                        {
                            Format = Format.R8G8B8A8_UNorm,
                            ArraySize = 1,
                            MipLevels = 1,
                            Width = form.panel1.ClientSize.Width,
                            Height = form.panel1.ClientSize.Height,
                            SampleDescription = new SampleDescription(1, 0),
                            Usage = SharpDX.Direct3D11.ResourceUsage.Default,
                            BindFlags = SharpDX.Direct3D11.BindFlags.DepthStencil,
                            CpuAccessFlags = SharpDX.Direct3D11.CpuAccessFlags.None,
                            OptionFlags = SharpDX.Direct3D11.ResourceOptionFlags.None,
                        });
                        depthStencilView = new SharpDX.Direct3D11.DepthStencilView(Device11, depthBuffer);
                        SharpDX.Direct3D11.RasterizerStateDescription rasterizerDescription = new SharpDX.Direct3D11.RasterizerStateDescription()
                        {
                            CullMode = SharpDX.Direct3D11.CullMode.None,
                            FillMode = SharpDX.Direct3D11.FillMode.Solid,
                            IsAntialiasedLineEnabled = true,
                            IsFrontCounterClockwise = true,
                            IsMultisampleEnabled = true,
                            IsDepthClipEnabled = true,
                            IsScissorEnabled = false
                        };
                        Device11.ImmediateContext.Rasterizer.State =new SharpDX.Direct3D11.RasterizerState(Device11, rasterizerDescription);
                        Device11.ImmediateContext.Rasterizer.SetViewport(new Viewport(0, 0, (int)form.panel1.ClientSize.Width, (int)form.panel1.ClientSize.Height));
                        Device11.ImmediateContext.OutputMerger.SetTargets(depthStencilView, renderTargetView);
                        goto OK1;
                    }
                    catch
                    {
                        goto Suite1;
                    }
                OK1:
                    Factory = new SharpDX.Direct2D1.Factory(FactoryType.SingleThreaded);
                    SharpDX.Direct3D11.Texture2D backBuffer11 = SharpDX.Direct3D11.Texture2D.FromSwapChain<SharpDX.Direct3D11.Texture2D>(SwapChain, 0);
                    Surface = backBuffer11.QueryInterface<Surface>();
                    Graphic = new RenderTarget(Factory, Surface, new RenderTargetProperties(new PixelFormat(Format.R8G8B8A8_UNorm, AlphaMode.Premultiplied)));
                    return;
                // DirectX 10
                Suite1:
                    SharpDX.Direct3D10.FeatureLevel[] levels10 ={SharpDX.Direct3D10.FeatureLevel.Level_10_1,SharpDX.Direct3D10.FeatureLevel.Level_10_0,
                                                               SharpDX.Direct3D10.FeatureLevel.Level_9_3,SharpDX.Direct3D10.FeatureLevel.Level_9_2,                   
                                                               SharpDX.Direct3D10.FeatureLevel.Level_9_1};
                    foreach (var level2 in levels10)
                    {
                        try
                        {
                            SharpDX.Direct3D10.Device1.CreateWithSwapChain(SharpDX.Direct3D10.DriverType.Hardware, SharpDX.Direct3D10.DeviceCreationFlags.BgraSupport,
                                                                            descriptionSwap, level2, out Device10, out SwapChain);
                            goto OK2;
                        }
                        catch (ArgumentException) // E_INVALIDARG
                        {
                            continue; // Try the next feature level
                        }
                        catch (OutOfMemoryException) // E_OUTOFMEMORY
                        {
                            continue; // Try the next feature level
                        }
                        catch (Exception) // SharpDX.Direct3D10.Direct3D10Exception D3DERR_INVALIDCALL or E_FAIL
                        {
                            continue; // Try the next feature level
                        }
                    }
                    throw new SystemException();
                OK2:
                    Factory = new SharpDX.Direct2D1.Factory(FactoryType.SingleThreaded);
                    SharpDX.Direct3D10.Texture2D backBuffer10 = SharpDX.Direct3D10.Texture2D.FromSwapChain<SharpDX.Direct3D10.Texture2D>(SwapChain, 0);
                    Surface = backBuffer10.QueryInterface<Surface>();
                    Graphic = new RenderTarget(Factory, Surface, new RenderTargetProperties(new PixelFormat(Format.R8G8B8A8_UNorm, AlphaMode.Premultiplied)));
                    Graphic.DotsPerInch = new Size2F(96, 96);
                }
                catch (Exception e)
                {
                    MessageBox.Show(e.Message + "  -> Erreur vue2D: construction du device graphique impossible.");
                    Dispose();
                    Environment.Exit(0);
                }
            }
     
            public void Dispose()
            {
                if (Device10 != null)
                {
                    Device10.Dispose();
                    Device10 = null;
                }
                if (Device11 != null)
                {
                    Device11.Dispose();
                    Device11 = null;
                }
                if (SwapChain != null)
                {
                    SwapChain.Dispose();
                    SwapChain = null;
                }
                if (Graphic != null)
                {
                    Graphic.Dispose();
                    Graphic = null;
                }
                if (Factory != null)
                {
                    Factory.Dispose();
                    Factory = null;
                }
                if (backBuffer == null)
                {
                    backBuffer.Dispose();
                    backBuffer = null;
                }
                if (renderTargetView == null)
                {
                    renderTargetView.Dispose();
                    renderTargetView = null;
                }
                if (depthBuffer == null)
                {
                    depthBuffer.Dispose();
                    depthBuffer = null;
                }
                if (depthStencilView == null)
                {
                    depthStencilView.Dispose();
                    depthStencilView = null;
                }
            }
     
            public void Render(Form1 form)
            {
                if (Graphic == null)
                    return;
                Graphic.BeginDraw();
                Graphic.Clear(SharpDX.Color.Black);
                StrokeStyleProperties strokeProperties = new StrokeStyleProperties() { StartCap = CapStyle.Round, EndCap = CapStyle.Round };
                StrokeStyle stroke = new StrokeStyle(Factory, strokeProperties);
                SolidColorBrush brush = new SolidColorBrush(Graphic, new Color(255, 255, 255, 255));
     
                Graphic.DrawLine(new Vector2(0, 0), new Vector2(form.panel1.Width, form.panel1.Height), brush, 1f, stroke);
     
                brush.Dispose();
                stroke.Dispose();
                Graphic.EndDraw();
                SwapChain.Present(0, PresentFlags.None);
            }
     
        }
    }
    Qui a une idée?

  3. #3
    Responsable 2D/3D/Jeux


    Avatar de LittleWhite
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Mai 2008
    Messages
    26 858
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Mai 2008
    Messages : 26 858
    Points : 218 577
    Points
    218 577
    Billets dans le blog
    120
    Par défaut
    Ne se poursuit plus ?
    Un freeze ? Un lag du pilote vidéo ?
    Hier, je n'avais pas remarqué d'erreur flagrante dans votre code. Peut être devriez vous tester avec PIX.
    Vous souhaitez participer à la rubrique 2D/3D/Jeux ? Contactez-moi

    Ma page sur DVP
    Mon Portfolio

    Qui connaît l'erreur, connaît la solution.

  4. #4
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2011
    Messages
    107
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Août 2011
    Messages : 107
    Points : 66
    Points
    66
    Par défaut
    En fait, lorsque je resize panel1, le code s'exécute jusqu'à

    "vue2D.SwapChain.ResizeBuffers(0, panel1.ClientSize.Width, panel1.ClientSize.Height, Format.Unknown, SwapChainFlags.None);"

    mais ne continue pas après: la Form se réaffiche, mais le code ne poursuit pas après cette ligne de code !

    Et qu'est ce que PIX?

    Ci-joint la Form avant redimensionnement et après. La ligne se pixelise !

  5. #5
    Responsable 2D/3D/Jeux


    Avatar de LittleWhite
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Mai 2008
    Messages
    26 858
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Mai 2008
    Messages : 26 858
    Points : 218 577
    Points
    218 577
    Billets dans le blog
    120
    Par défaut
    PIX est un débogueur spécialisé dans le débogage d'applications graphiques.
    Sinon, je trouve étrange que la ligne ne garde pas la même fin, mais ça doit être à cause du ratio (soit il est pas mis à jour, soit c'est mon cerveau qui doit faire une mise à jour).
    Vous souhaitez participer à la rubrique 2D/3D/Jeux ? Contactez-moi

    Ma page sur DVP
    Mon Portfolio

    Qui connaît l'erreur, connaît la solution.

  6. #6
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2011
    Messages
    107
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Août 2011
    Messages : 107
    Points : 66
    Points
    66
    Par défaut
    J'ai localisé une erreur à l'exécution:

    "vue2D.SwapChain.ResizeBuffers(0, panel1.Width, panel1.Height, Format.R8G8B8A8_UNorm, SwapChainFlags.AllowModeSwitch);"

    Mais je n'arrive pas à savoir comment la corriger: en fait l'erreur ne s'affiche pas comme d'habitude par un message classique (d'où le catch), mais la suite du code n'ai pas exécuté dans le bloc.

    Donc la seule solution consiste à corriger le bug et il me faut savoir comment supprimer cette erreur d'exécution et je ne trouve pas !

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
     
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using SharpDX;
    using SharpDX.Direct2D1;
    using SharpDX.DXGI;
     
    namespace WindowsFormsApplication1
    {
        public partial class Form1 : Form
        {
            public DirectX_2D vue2D;
     
            public Form1()
            {
                InitializeComponent();
                vue2D = new DirectX_2D(this);
            }
     
            private void Form1_SizeChanged(object sender, EventArgs e)
            {
                //this.panel1.Paint -= new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
                panel1.Width = this.Width - 40;
                panel1.Height = this.Height - 60;
                //// Redéfinie l'affichage
                if (vue2D.typeDirectX == "DirectX 11")
                {
                    try
                    {
                        if (vue2D.renderTargetView11 != null)
                            vue2D.renderTargetView11.Dispose();
                        if (vue2D.backBuffer11 != null)
                            vue2D.backBuffer11.Dispose();
                        if (vue2D.depthBuffer11 != null)
                            vue2D.depthBuffer11.Dispose();
                        if (vue2D.depthStencilView11 != null)
                            vue2D.depthStencilView11.Dispose();
                        vue2D.SwapChain.ResizeBuffers(0, panel1.Width, panel1.Height, Format.R8G8B8A8_UNorm, SwapChainFlags.AllowModeSwitch);
                    }
                    catch
                    {
                        MessageBox.Show("1ère Erreur");
                    }
                }           
            }       
     
            private void Form1_Load(object sender, EventArgs e)
            {
                panel1.Width = this.Width - 40;
                panel1.Height = this.Height - 60;
                if (vue2D == null)
                    vue2D = new DirectX_2D(this);
            }
     
            private void panel1_Paint(object sender, PaintEventArgs e)
            {
                 if (vue2D.typeDirectX == "DirectX 11")
                 {
                     try
                     {
                         vue2D.backBuffer11 = SharpDX.Direct3D11.Texture2D.FromSwapChain<SharpDX.Direct3D11.Texture2D>(vue2D.SwapChain, 0);
                         vue2D.renderTargetView11 = new SharpDX.Direct3D11.RenderTargetView(vue2D.Device11, vue2D.backBuffer11);
                         SharpDX.Direct3D11.Texture2DDescription depthBufferDescrition11 = new SharpDX.Direct3D11.Texture2DDescription
                         {
                             ArraySize = 1,
                             BindFlags = SharpDX.Direct3D11.BindFlags.DepthStencil,
                             CpuAccessFlags = SharpDX.Direct3D11.CpuAccessFlags.None,
                             Format = SharpDX.DXGI.Format.D32_Float,
                             Height = panel1.ClientSize.Height,
                             Width = panel1.ClientSize.Width,
                             MipLevels = 1,
                             OptionFlags = SharpDX.Direct3D11.ResourceOptionFlags.None,
                             SampleDescription = new SampleDescription(1, 0),
                             Usage = SharpDX.Direct3D11.ResourceUsage.Default
                         };
                         vue2D.depthBuffer11 = new SharpDX.Direct3D11.Texture2D(vue2D.Device11, depthBufferDescrition11);
                         vue2D.depthStencilView11 = new SharpDX.Direct3D11.DepthStencilView(vue2D.Device11, vue2D.depthBuffer11);
                         SharpDX.Direct3D11.RasterizerStateDescription rasterizerDescription = new SharpDX.Direct3D11.RasterizerStateDescription()
                         {
                             CullMode = SharpDX.Direct3D11.CullMode.None,
                             FillMode = SharpDX.Direct3D11.FillMode.Solid,
                             IsAntialiasedLineEnabled = true,
                             IsFrontCounterClockwise = true,
                             IsMultisampleEnabled = true,
                             IsDepthClipEnabled = true,
                             IsScissorEnabled = false
                         };
                         vue2D.Device11.ImmediateContext.Rasterizer.State = new SharpDX.Direct3D11.RasterizerState(vue2D.Device11, rasterizerDescription);
                         vue2D.Device11.ImmediateContext.Rasterizer.SetViewport(new Viewport(0, 0, (int)panel1.ClientSize.Width, (int)panel1.ClientSize.Height));
                         vue2D.Device11.ImmediateContext.OutputMerger.SetTargets(vue2D.depthStencilView11, vue2D.renderTargetView11);
                     }
                     catch
                     {
                         MessageBox.Show(" Erreur vue2D");
                     }
                 }
                 vue2D.Render(this);
            }
        }
    }

  7. #7
    Expert confirmé

    Profil pro
    Inscrit en
    Février 2006
    Messages
    2 382
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2006
    Messages : 2 382
    Points : 4 942
    Points
    4 942
    Par défaut
    j'ai tenté d'exécuter ton code, il y a 2 trucs qui ont pété direct :

    ce qui suit n'est pas à faire, tu fixes les dimensions de ton "panneau" sans te préoccuper si un contexte dx est déjà dessus ou pas, résultat, tu crées un depth stencil et une render target incompatibles entre eux :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    panel1.Width = this.Width - 40;
    panel1.Height = this.Height - 60;
    ensuite lors du ResizeBuffers, il y a encore des ressources attachées au pipeline et tu ne peux pas appeler cette méthode à cause de ça, il faut d'abord identifier ce qui est attaché au pipeline et le libérer, et ensuite tu pourras redimensionner.

    après petit truc qui m'a choqué : tu as des créations/destructions dx dans plusieurs fichiers, c'est plutôt dur à suivre et le risque de créer des trucs incompatibles est grand.

    attention : j'ai pas forcément utilisé tes derniers changements, donc ce que je viens de dire est à prendre avec des pincettes.
    si tu as facilement ta solution minimale visual studio avec ton problème, ça sera sûrement plus facile de t'aider.

  8. #8
    Membre habitué
    Inscrit en
    Avril 2011
    Messages
    59
    Détails du profil
    Informations forums :
    Inscription : Avril 2011
    Messages : 59
    Points : 154
    Points
    154
    Par défaut
    Moi ce qui m'a choqué c'est les goto en c#, bon ok c'est de la gestion d'erreur et je sais que certaines personnes le font comme ça en C, mais bon c'est moche
    Met ta méthode resize dans ton objet DirectX_2D, met en commun ce qu'il a à mettre en commun(genre la création du depth buffer), ça rendra la chose plus lisible pour toi et pour nous.

    Mais je crois que j'ai repérer un(le?) vrai problème, tu initialise les buffers DX à chaque paint(en tout cas dans la dernières version donnée), donc je ne sais pas s'il garde des ref sur chaque mais clairement tu créé des objets inutiles.

  9. #9
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2011
    Messages
    107
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Août 2011
    Messages : 107
    Points : 66
    Points
    66
    Par défaut
    Merci pour les réponses qui sont très judicieuses:

    1- Pour le redimensionnement du panel, j'ai décidé de le faire à la fin de la modification du pipeline (je ne sais pas si la bonne réponse?)

    2- Pour identifier les ressources du pipeline, je ne sais absolument pas comment faire. J'ai bêtement mis des dispose pour vider les instances mais cela ne marche pas et c'est cela qui me pose le plus de problème: si vous avez un bout de code, cela serait bien.

    3- Pour la fin, j'ai regrouper dans le même évènement le code de modification du pipeline pour simplifier et juste laissé le rendu dans l'évènement Paint

    Form1
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
     
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using SharpDX;
    using SharpDX.Direct2D1;
    using SharpDX.DXGI;
     
    namespace WindowsFormsApplication1
    {
        public partial class Form1 : Form
        {
            public DirectX_2D vue2D;
            public bool rsz = false;
     
            public Form1()
            {
                InitializeComponent();
                vue2D = new DirectX_2D(this);
            }
     
            private void Form1_SizeChanged(object sender, EventArgs e)
            {        
                //// Redéfinie l'affichage
                if (vue2D.typeDirectX == "DirectX 11")
                {
                    #region Libère le Pipeline ?
                    if (vue2D.renderTargetView11 != null)
                        vue2D.renderTargetView11.Dispose();
                    if (vue2D.renderTargetView11 != null)
                        vue2D.renderTargetView11.Dispose();
                    if (vue2D.backBuffer11 != null)
                        vue2D.backBuffer11.Dispose();
                    if (vue2D.depthBuffer11 != null)
                        vue2D.depthBuffer11.Dispose();
                    if (vue2D.depthStencilView11 != null)
                        vue2D.depthStencilView11.Dispose();
                    #endregion
                    try
                    {                   
      ->Bug          vue2D.SwapChain.ResizeBuffers(1, this.Width - 40, this.Height - 60, Format.R8G8B8A8_UNorm, SwapChainFlags.AllowModeSwitch);
     
                         vue2D.backBuffer11 = SharpDX.Direct3D11.Texture2D.FromSwapChain<SharpDX.Direct3D11.Texture2D>(vue2D.SwapChain, 0);
                         vue2D.renderTargetView11 = new SharpDX.Direct3D11.RenderTargetView(vue2D.Device11, vue2D.backBuffer11);
                         SharpDX.Direct3D11.Texture2DDescription depthBufferDescrition11 = new SharpDX.Direct3D11.Texture2DDescription
                         {
                             ArraySize = 1,
                             BindFlags = SharpDX.Direct3D11.BindFlags.DepthStencil,
                             CpuAccessFlags = SharpDX.Direct3D11.CpuAccessFlags.None,
                             Format = SharpDX.DXGI.Format.D32_Float,
                             Height = panel1.ClientSize.Height,
                             Width = panel1.ClientSize.Width,
                             MipLevels = 1,
                             OptionFlags = SharpDX.Direct3D11.ResourceOptionFlags.None,
                             SampleDescription = new SampleDescription(1, 0),
                             Usage = SharpDX.Direct3D11.ResourceUsage.Default
                         };
                         vue2D.depthBuffer11 = new SharpDX.Direct3D11.Texture2D(vue2D.Device11, depthBufferDescrition11);
                         vue2D.depthStencilView11 = new SharpDX.Direct3D11.DepthStencilView(vue2D.Device11, vue2D.depthBuffer11);
                         SharpDX.Direct3D11.RasterizerStateDescription rasterizerDescription = new SharpDX.Direct3D11.RasterizerStateDescription()
                         {
                             CullMode = SharpDX.Direct3D11.CullMode.None,
                             FillMode = SharpDX.Direct3D11.FillMode.Solid,
                             IsAntialiasedLineEnabled = true,
                             IsFrontCounterClockwise = true,
                             IsMultisampleEnabled = true,
                             IsDepthClipEnabled = true,
                             IsScissorEnabled = false
                         };
                         vue2D.Device11.ImmediateContext.Rasterizer.State = new SharpDX.Direct3D11.RasterizerState(vue2D.Device11, rasterizerDescription);
                         vue2D.Device11.ImmediateContext.Rasterizer.SetViewport(new Viewport(0, 0, (int)panel1.ClientSize.Width, (int)panel1.ClientSize.Height, 0, 1));
                         vue2D.Device11.ImmediateContext.OutputMerger.SetTargets(vue2D.depthStencilView11, vue2D.renderTargetView11);
                        // Redimensionne le Panel
                        panel1.Width = this.Width - 40;
                        panel1.Height = this.Height - 60;
                    }
                    catch (Exception ee)
                    {
                        MessageBox.Show(ee.Message);
                    }
                }
            }
     
            private void Form1_Load(object sender, EventArgs e)
            {
                panel1.Width = this.Width - 40;
                panel1.Height = this.Height - 60;
                if (vue2D == null)
                    vue2D = new DirectX_2D(this);
            }
     
            private void panel1_Paint(object sender, PaintEventArgs e)
            {
                if (vue2D.typeDirectX == "DirectX 11")
                    vue2D.Render(this);
            }
        }
    }
    Si vous avez un bout de code pour rebondir, ce serait super.

  10. #10
    Expert confirmé

    Profil pro
    Inscrit en
    Février 2006
    Messages
    2 382
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2006
    Messages : 2 382
    Points : 4 942
    Points
    4 942
    Par défaut
    poste un projet visual studio minimal s'il te plait, là on se retrouve à devoir deviner quelle est le contenu de ta solution. (en tout cas, moi ça m'aiderait)

  11. #11
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2011
    Messages
    107
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Août 2011
    Messages : 107
    Points : 66
    Points
    66
    Par défaut
    Voici un dossier du projet, attention il faut recharger les packages SharpDX.

  12. #12
    Expert confirmé

    Profil pro
    Inscrit en
    Février 2006
    Messages
    2 382
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2006
    Messages : 2 382
    Points : 4 942
    Points
    4 942
    Par défaut
    pas grand chose de constructif, mais si tu détruis toute la vue2d quand tu redimensionnes et que tu recréés from scratch, ça fonctionne sans erreur.

    je vais regarder plus demain ... enfin tout à l'heure.

  13. #13
    Membre habitué
    Inscrit en
    Avril 2011
    Messages
    59
    Détails du profil
    Informations forums :
    Inscription : Avril 2011
    Messages : 59
    Points : 154
    Points
    154
    Par défaut
    Je ne suis pas très sur de l’intérêt de garder dx10 quand tu utilise déjà dx11, m'enfin. Et si tu veux vraiment l'implémenter les deux, fait deux versions de DirectX_2D avec une interface commune, plutôt que de tout placer dans une seule classe.

    Continue dans des try catch, meh? (http://msdn.microsoft.com/en-us/library/923ahwt1.aspx)

    Finally t'éviterait des goto (EDIT: En fait non, ça m'apprendra à répondre à 1h30 je raconte n'importe quoi).


    Sinon je me demande si c'est pas soit Surface, Graphic qu'il faudrait disposer en plus avant le ResizeBuffers.
    Surface = backBuffer11.QueryInterface<Surface>();
    Graphic = new RenderTarget(Factory, Surface, new RenderTargetProperties(new PixelFormat(Format.R8G8B8A8_UNorm, SharpDX.Direct2D1.AlphaMode.Premultiplied)));

  14. #14
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2011
    Messages
    107
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Août 2011
    Messages : 107
    Points : 66
    Points
    66
    Par défaut
    Je ne sais pas si c'est un début de réponse, mais il me semble qu'il faut mieux utiliser "RemoveAndDispose" ou "ToDispose" que "Dispose" d'^près ce lien:
    http://www.getcodesamples.com/src/4B95A0E9/40FFD6EA

  15. #15
    Expert confirmé

    Profil pro
    Inscrit en
    Février 2006
    Messages
    2 382
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2006
    Messages : 2 382
    Points : 4 942
    Points
    4 942
    Par défaut
    Anything a pointé, je pense également, ce qui ne va pas, Surface et Graphic ne sont pas libéré.
    j'ai testé, et une fois détruit, le resize fonctionne.

  16. #16
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2011
    Messages
    107
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Août 2011
    Messages : 107
    Points : 66
    Points
    66
    Par défaut
    Et vous avez un bout de code pour voir les modifications?

  17. #17
    Expert confirmé

    Profil pro
    Inscrit en
    Février 2006
    Messages
    2 382
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2006
    Messages : 2 382
    Points : 4 942
    Points
    4 942
    Par défaut
    j'ai pas poussé très loin, mais ça a l'air de plus faire d'erreur.
    Fichiers attachés Fichiers attachés

  18. #18
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2011
    Messages
    107
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Août 2011
    Messages : 107
    Points : 66
    Points
    66
    Par défaut
    Merci beaucoup, it's works !

    J'ai refait des modifications minimes.
    Au passage, j'ai tenté de remplacer "Dispose" par "RemoveAndDispose", mais l'affichage ne se fait pas correctement, je ne comprends après avoir trouvé un autre exemple qui utilise ResizeBuffers après RemoveAndDispose: https://github.com/sharpdx/SharpDX/b...csPresenter.cs

    Au passage, le mode debug est-il utile ici? Je ne sais pas bien l'utiliser, que faut-il en attendre dans ce cas précis ?

    Si vous avez une explication sur ce point (?)
    J'attends vos éventuelles explications, puis je mettrai "Résolu" à ce post après.

  19. #19
    Expert confirmé

    Profil pro
    Inscrit en
    Février 2006
    Messages
    2 382
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2006
    Messages : 2 382
    Points : 4 942
    Points
    4 942
    Par défaut
    alors le mode debug sert à tracer les allocations/libérations des ressources directx, à émettre des warnings sur des opérations invalides, etc., pour avoir la panoplie il faut:
    - autoriser le debogage de code natif dans ta solution ;
    - créer un device en mode debug ;
    - utiliser le panneau de configuration directx pour mettre des options en plus.

    ce mode t’avertit aussi quand tu essaies de faire des choses invalides, par exemple dans un de tes codes, créer un stencil en R8G8B8A8_UNorm.
    pour plus de facilité pour déboguer du dx, il faudrait que tu regardes à utiliser PIX (ou un autre débogueur dx), c'est plutôt pratique.

    pour le RemoveAndDispose, visiblement ça fait appel à une sorte de garbage collector, je ne sais pas trop ce que ça implique, c'est la première fois que je regarde du sharpdx.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Problème avec redimensionnement tableau
    Par PoZZyX dans le forum Réseau
    Réponses: 18
    Dernier message: 20/04/2006, 15h46
  2. [CSS] problème de redimensionnement
    Par cootchy dans le forum Mise en page CSS
    Réponses: 4
    Dernier message: 14/02/2006, 17h42
  3. [SWT][Layout]problème de redimensionnement d'un Text
    Par McFoggy dans le forum SWT/JFace
    Réponses: 1
    Dernier message: 05/08/2004, 12h10
  4. Problème de redimensionnement
    Par routouf dans le forum Agents de placement/Fenêtres
    Réponses: 2
    Dernier message: 16/07/2004, 16h27
  5. Problème de redimensionnement
    Par david71 dans le forum Agents de placement/Fenêtres
    Réponses: 6
    Dernier message: 14/05/2004, 17h39

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo