Faster than GDI+ ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marco Trapanese

    #1

    Faster than GDI+ ?



    Hi,

    I wrote an application that draw on a form complex graphics. Tons of
    image with transparencies. I used GDI+ of course... but they are so
    slow! The paint event takes about 250 ms... I need to refresh the screen
    about five times faster.

    What might I use else? DirectX ?

    I need only to draw, rotate and translate bitmap with alpha channel.

    Bye
    Marco / iw2nzm

  • Herfried K. Wagner [MVP]

    #2
    Re: Faster than GDI+ ?

    "Marco Trapanese" <marcotrapanese NOSPAM@libero.i tschrieb:
    I wrote an application that draw on a form complex graphics. Tons of image
    with transparencies. I used GDI+ of course... but they are so slow! The
    paint event takes about 250 ms... I need to refresh the screen about five
    times faster.
    Note that GDI+ is (other than GDI and DirectX) not hardware-accelerated.
    That's why it is so slow compared to technologies which make use of hardware
    acceleration.
    What might I use else? DirectX ?
    Yes, for example.

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

    Comment

    • Rad [Visual C# MVP]

      #3
      Re: Faster than GDI+ ?

      On Thu, 22 Mar 2007 17:12:05 +0100, Herfried K. Wagner [MVP] wrote:
      "Marco Trapanese" <marcotrapanese NOSPAM@libero.i tschrieb:
      >I wrote an application that draw on a form complex graphics. Tons of image
      >with transparencies. I used GDI+ of course... but they are so slow! The
      >paint event takes about 250 ms... I need to refresh the screen about five
      >times faster.
      >
      Note that GDI+ is (other than GDI and DirectX) not hardware-accelerated.
      That's why it is so slow compared to technologies which make use of hardware
      acceleration.
      >
      >What might I use else? DirectX ?
      >
      Yes, for example.
      Or OpenGL for that matter...
      --
      Bits.Bytes

      Comment

      • Marco Trapanese

        #4
        Re: Faster than GDI+ ?

        Rad [Visual C# MVP] wrote:
        >>What might I use else? DirectX ?
        >Yes, for example.
        >
        Or OpenGL for that matter...
        I don't know DirectX neither OpenGl :)
        Is it simple to convert the GDI+ code into one of these?

        What is the difference (in two words...) between DX and OGL?

        Thanks
        Marco / iw2nzm

        Comment

        • \(O\)enone

          #5
          Re: Faster than GDI+ ?

          Marco Trapanese wrote:
          What is the difference (in two words...) between DX and OGL?
          DX is a Windows-specific API written by Microsoft.

          OpenGL is a cross-platform open API written by Silicon Graphics.

          DX is probably harder to learn than OpenGL, but once you've got the hang of
          them and worked your way around how each one works, they're fairly
          comparable in terms of ease of use.

          DX is probably easier to interact with than OpenGL from VB.NET as it has
          managed interface DLLs provided with Visual Studio -- but I've never used
          either from VB (only from C++) so others may be better able to provide
          information on this point.

          DX also covers lots of additional functions than graphics, such as sound and
          music, networking, input devices, etc. If you go with OpenGL you will need
          to find alternative libraries to offer this functionality (although I
          appreciate these probably aren't relevant for your requirements).

          There's a fairly detailed comparison here:



          --

          (O)enone


          Comment

          • Robert

            #6
            Re: Faster than GDI+ ?

            I wrote an application that draw on a form complex graphics. Tons of image
            with transparencies. I used GDI+ of course... but they are so slow! The
            paint event takes about 250 ms... I need to refresh the screen about five
            times faster.
            >
            What might I use else? DirectX ?
            >
            I need only to draw, rotate and translate bitmap with alpha channel.
            You might want to look at WPF in the .Net 3.0 update. A simple test app
            was 3x faster doing jpeg loading compared to the stock 2.0 image libraries.
            It is layered on top of DirectX so hardware acceleration is possible.

            The WPF API is a lot more VB friendly, as opposed to DirectX which
            requires some C++ style thinking (error codes, allocating and cleaning up
            resources, etc). There are not as many online references yet..



            Comment

            • Marco Trapanese

              #7
              Re: Faster than GDI+ ?

              Robert wrote:
              You might want to look at WPF in the .Net 3.0 update. A simple test app
              was 3x faster doing jpeg loading compared to the stock 2.0 image libraries.
              It is layered on top of DirectX so hardware acceleration is possible.
              >
              The WPF API is a lot more VB friendly, as opposed to DirectX which
              requires some C++ style thinking (error codes, allocating and cleaning up
              resources, etc). There are not as many online references yet..

              Thanks for the advice.

              Marco / iw2nzm


              Comment

              Working...