Recent Changes - Search:

Support

Site

Links

FAQ /

General

<< | Frequently asked questions | Drawing >>

1. Graphics32 supports only 32-bit color, what about other pixel formats?

From the very beginning I decided to restrict my attention exclusively to 32 bit pixel format. Here are the reasons:

  • Almost any function, even in GDI is faster in 32-pixel format compared to other formats, including 8-bpp;
  • 4-byte aligned memory access is much faster on modern generation of CPUs;
  • Alpha blending can be implemented much faster in 32 bpp than in 16 bpp and is almost impossible in 8 bpp;
  • I do not have to write some monster multi-format functions (or create separate functions and then mess with linking);
  • Using only 32-bit pixels allows for deeper optimization. A perfect example is DrawLine? function, there I was able to get rid of function calls from the inner loop, and write directly into memory;

However, this does not mean that I don't like other formats, probably, the library some day will have a limited support for 8-bit bitmaps (which now may be simulated with ByteMaps), or maybe some other pixel formats.

2. I'm getting some strange floating point errors what's happening?

If you are using some low-level blending functions and forgot to put EMMS command after it, this can be a source for absolutely unpredictable floating point errors and exceptions. Be very careful with low-level blending routines.

3. I would like to include Graphics32 in my commercial product. Can I do so without having to open up the code to my product?

Graphics32 is licensed under the terms of the Mozilla Public License (MPL), which explicitly permits including code under its terms in commercial products. You may sell your product without having to release the source code as well. In this way it is different from the General Public license (GPL). However, if you make changes to the Graphics32 library you need to release these changes, so we can incorporate them in future releases. Also, you don't need to pay any royalty fees. However, we appreciate any donation if your product is successful. :)

Edit - History - Print - Recent Changes - Search
Page last modified on May 17, 2009, at 04:38 PM