Andorra 2D to replace GDI and GDI+

General
Bernd82
2011-11-26
2013-05-14
  • Bernd82
    Bernd82
    2011-11-26

    Hello all,

    we use GDI and GDI+ with Delphi 7 for grapics in our programs at the moment. But those two are very slow, as they do not support hardware acceleration on all machines. Can we replace them using Andorra 2D?

    I guess we need unit(s) and a DLL? I had a glance at several postings, but I was missing a kind of "Hello World" example. It seemed to me that everything was oriented only towards games programming?!?

    Is there a possibility to draw lines, cirles and texts into a normal Windows window?

    Thanks, Bernd82

     
  • Hi,

    yes Andorra 2D is directed towards game-programming. Lines, circles and text can be drawn, but this is not the main focus of Andorra 2D and can only be done onto an Andorra 2D surface. Plus Unicode is not supported in the text rendering engine.

    I hope that helps you,
    Andreas

     
  • Bernd82
    Bernd82
    2011-11-26

    Thanks Andreas for your lightning fast answer!

    Is there a kind of "Hello World" example for Delphi? We have a Windows window handle and want to draw a line for example.

    Is it unhandy to have an Andorra 2D surface in a Windows window?

    Do lines use DirectX to get rendered? Does it support the hardware acceleration of the graphics card?

    Would it use hardware acceleration, if we tried to switch to Free-Pascal+Lazarus under Linux? Via OpenGL?

    Thanks again, Bernd82

     
  • Hi,

    for examples have a look into the "demos/simple" folder - there's also a canvas demo.

    To answer your questions: Yes, Andorra 2D uses Hardware-Acceleration for all canvas functions, and yes, Andorra 2D uses OpenGL when using Free-Pascal+Lazarus+Linux.

    But please be aware, that the Canvas-Functionality may have some bugs (like the hash function used to identify recurrent canvas elements being to weak) and was more thought as an "extra".

    If you really want to use it, you should be willing to fix the problems and probably extend the canvas. If you're going so far, the only benefit of Andorra 2D is to provide an platform independent abstraction layer for opengl and directx, so you should be capable of doing all the math and low-level 3D-api stuff.

    Andreas

     
  • Bernd82
    Bernd82
    2011-11-28

    Hi Andreas,

    I will have to toy around a little with Andorra's drawing capabilities. I will report my experience.

    Thanks a lot for your advice!

    Bernd82