Recent

Author Topic: TOpenGLControl vs TPaintBox Canvas for Simple 2D Drawing  (Read 4286 times)

DrT

  • Newbie
  • Posts: 3
TOpenGLControl vs TPaintBox Canvas for Simple 2D Drawing
« on: July 06, 2012, 06:23:08 pm »
I am writing some 2D physics simulations and need to draw some basic shapes (e.g. circles, boxes, vectors, etc).  If all goes well, I may decide to distribute these to multiple platforms.

So far, I have been able to do this using TOpenGLControl and the canvas for TPaintBox.  What are the relative advantages and disadvantages between these two approaches?

Are there other approaches I should consider?

Thanks.

User137

  • Hero Member
  • *****
  • Posts: 1791
    • Nxpascal home
Re: TOpenGLControl vs TPaintBox Canvas for Simple 2D Drawing
« Reply #1 on: July 06, 2012, 06:34:24 pm »
TPaintBox uses processing power of the CPU to draw, whereas OpenGL is using graphics card for it. It is a very clear speed difference in favor of OpenGL. If you do physics, that is also using CPU... The lower the hardware, the faster your application may start to slow down if you keep ignoring existence of graphics card  :)  Both should be multiplatform though, and not really such alternatives available.

 

TinyPortal © 2005-2018