[Qt-interest] [Qt-Interest] Visual Studio 2010 Compile of 64 bit Qt 4.7.1 Results in bad executables

Mihail Naydenov mlists at ymail.com
Wed Dec 29 10:53:39 CET 2010





----- Original Message ----
> From: Konrad Rosenbaum <konrad at silmor.de>
> To: qt-interest at qt.nokia.com
> Sent: Wed, December 29, 2010 11:24:06 AM
> Subject: Re: [Qt-interest] [Qt-Interest] Visual Studio 2010 Compile of 64 bit 
>Qt 4.7.1 Results in bad executables
> 
> On Tuesday 28 December 2010, Michael Jackson wrote:
> > I don't want to  start any type of argument, but let's pretend for a
> > second that I don't  actually know what each and every possible
> > configuration option does and  so I need to depend on the help from the
> > "configure" script. So using  "configure --help" I see the following:
> > 
> >      -graphicssystem <sys> Specify which graphicssystem should be  used.
> >                            Available values for <sys>:
> >   *                          raster - Software rasterizer
> >                             opengl - Using  OpenGL acceleration,
> > experimental! openvg - Using OpenVG acceleration,  experimental!
> 
> With Qt: if you do not know what the option does, leave it  to Qt to chose a 
> good default. It usually works. If it does not then it is  time to read very 
> deeply into the matter.
> 
> > Now, since I am  creating a program that displays very large images (10k x
> > 10k pixels) i  certainly don't want the "raster - Software Rasterizer".
> 
> You don't want  to send images that large to your graphics system. Period.
> 
> By a quick  calculation the ARGB version of that image is about 400MB big! 
> Add to this  shadow copies at various places in the system (application, 
> graphics  subsystem, driver, double buffering) and you are out of memory.
> 
> Besides:  most graphics systems have a limit on coordinates - usually in the 
> realm of  4096 or 8192 pixels in each direction.
> 
> In short: you'll have to do  extensive preprocessing with those images, so 
> that the graphics system can  swallow the pieces or zooms that you actually 
> want to  see.
> 

I have made many test on the matter at hand.

Here is my real-world experience:
 - Only raster can handle big images (w/h > ~8 000)  fine. On opengl these will 
fail*.
 - The best way is to use drawImage() with these, not QPixmap::fromImage first, 
otherwise it will either fail (empty qpixmap) or consume double amount of mem. 
The draw is slower but (completely) usable and reliable.

*In general Qt should, sooner or later, implement tiling (to automatically slice 
big image into smaller texs) for the opengl backhand to handle bigger images. 
Right now is a "shoot in the dark" - it might fail or it might not and no way to 
tell beforehand. The situation is worsen by the fact that various machines have 
different texture limits so on a new desktop it will work, on older comp (not to 
mention handheld) it will display scary black/white texture without warning!

So if you plan displaying big images - use raster and drawImage().
I don't know why you think it is not a good idea. 

MihailNaydenov

PS I have made the tests under windows with recent versions, I assume it uses 
raster.

> 
>     Konrad
> 


      



More information about the Qt-interest-old mailing list