Programming => Graphics => Graphics and Multimedia => BGRABitmap and LazPaint => Topic started by: Leledumbo on June 04, 2012, 11:00:07 am

Title: Just checked out the 3D demo: WOW!
Post by: Leledumbo on June 04, 2012, 11:00:07 am
At first I thought it uses OpenGL / something else backend, but after looking at the source, it seems like everything is self drawn! It's quite fast despite the software level rendering used, but is there any plan on using hardware acceleration? There's almost never enough "fast" for programmers :-[
Title: Re: Just checked out the 3D demo: WOW!
Post by: circular on June 04, 2012, 02:12:50 pm
Thanks. Well no there is no plan to use hardware acceleration. At least by me.  :)

In fact my philosophy is to do everything with Pascal, and possibly assembler. So I implemented everything I found useful : lighting effect, gouraud, transparency, Z buffer.

There could be some enhancements of course, notably shadow casting. But this is a very complex issue. Bump mapping too could be added, but it could be too slow. So basically I think you can find everything that is at the same time necessary/useful, and fast enough to be rendered without hardware acceleration.

I would like to add more support for 3D files. It can read obj files, but very basic ones. It could be useful to read material definitions (mtl) of obj files. And read other 3D formats. Maybe code from Asphyre Sphinx library for this could be inserted in some way.

As far as assembler optimization is concerned, I've added SSE3, which is a little faster, but not so much. Maybe some optimization can be done, or other special instructions used like SSE4 or AVX. But I feel lazy about it (and in fact, I don't have so much free time).

Apparently there is a problem of compilation under MacOS. But this is kind of mysterious. I guess this is rather a compiler issue. It's in the following topic:,16584.0.html
TinyPortal © 2005-2018