Menu

#30 support for hardware accelerated 2D rendering?

closed
nobody
None
5
2010-08-03
2010-06-05
Anonymous
No

I read in some of the reviews that people found kidbasic to render too slowly, and I was wondering it it would be particularly complicated to change the rendering area to an OpenGL enabled rendering context?

While this should not be any slower than the current implementation on systems without hardware acceleration, it would certainly be much faster on systems with working hardware acceleration.

Of course this would require a re-implementation of the 2D drawing primitives using OpenGL calls, but I think Qt supports this out of the box, so to speak?

This should be relatively straightforward to do given that it would only boil down to a handful of 2D drawing primitives, which would render in orthographic mode. Still, there are a number of possible speedups, such as for example the use of cached OpenGL display lists for the compiled bytecode.

It seems, looking into QPainter and QGLWidget might be worthwhile: http://doc.qt.nokia.com/4.1/opengl-2dpainting.html

Any other opinions on this?

Discussion

  • Jim Reneau

    Jim Reneau - 2010-08-03
    • status: open --> closed
     
  • Jim Reneau

    Jim Reneau - 2010-08-03

    The graphics statements refresh the QImage and renders it every time that a graphics command is executed. The FASTGRAPHICS statement turns off the automatic render and will only draw the screen when the REFRESH statement is executed. Very complex pixel by pixel drawing becomes quite fast when these statements are used.

    Jim

     

Log in to post a comment.