PDA

View Full Version : Poor OpenGL quality on Mac OS 10.5.8, even demos



MattPhillips
23rd February 2010, 00:56
Hi,

I'm finding that on the Mac, under Qt (4.5, 4.6) everything is rendering very slowly and textures are oddly distorted--as though the viewport sides had been expanded each by 2x and the actual screen occupied the upper left-hand quadrant. You can see what I'm talking about with the attached screenshot from the 'HelloGL' demo--note the position of the central 'Qt'. Also, QGLFormat won't accept the QGL::StereoBuffers flag--the graphics fail completely if I include that. I don't have these problems with Ubuntu. Anyone know how I can fix this? Thank you!

Matt

spud
23rd February 2010, 09:44
I've also noted a regression with the latest releases. This is how it looks on my netbook with XP.
4320

MattPhillips
26th February 2010, 16:39
Two general possibilities occur to me as a way to resolve this--

--There are #include's I should be putting in or path variables I need to modify,

--or the issue is with the Qt OpenGL library and I need to get it so that Qt uses the system library instead (speculating here).

Does anything along these lines sound right? If it's the second one, could someone tell me how to get Qt to use the system OpenGL library?

Matt

MattPhillips
6th March 2010, 04:55
Okay I figured it out--at least my specific problem. The cause of the slowdown and distortions was non-power-of-2 textures sizes. While Qt on Linux and, I think, previous Qt versions on the Mac had no problem with textures of arbitrary height/widths, with Qt 4.6. this was the difference. When I rewrote my code to force power-of-2 sizes, the problems disappeared. The only caveat is that I was not able to repair the 2D painting example by changing the OpenGL image from 200x200 to 256x256 pixels. The image got larger but retained the same distortions. Lastly, according to the 2.1 red book, only OpenGL versions prior to 2.0 have a problem with non-^2 textures. Has Qt 4.6 regressed to an earlier version of OpenGL? I haven't been able to successfully query the OpenGL version string for some reason.

Matt