LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: elias4444 on February 05, 2007, 04:22:40

Title: Weird issues on Macbooks?
Post by: elias4444 on February 05, 2007, 04:22:40
Just wondering if anyone else had noticed this...

I was walking through my local Mac store, downloading the latest build of my game onto all the machines in order to test it out (hey, where else can you test on every version of Mac computers?). It worked fine on all of them except for the Macbook (and admittedly, they didn't have a mac mini out to test on). It loaded no problem, but anytime I used glPoints or glLines, they didn't appear on screen. Everything else worked perfectly. Can anyone else verify this with their own code on a Mac Mini and/or Macbook?
Title: Re: Weird issues on Macbooks?
Post by: numberR on February 05, 2007, 05:04:40
Is there anything that I can test?
I don't use those functions in my LWJGL stuff...

I have MacBook and PPC Mac mini.
Title: Re: Weird issues on Macbooks?
Post by: princec on February 05, 2007, 11:25:52
I use lines and points without problems on my MacBooks. Well, I would, if it would switch on, but it's broken and won't.

Cas :)
Title: Re: Weird issues on Macbooks?
Post by: Fool Running on February 05, 2007, 14:56:16
I use points and lines in my engine. I noticed when I got my new computer (it has a GeForce 7950) the lines and points disappeared.  I did a little research and determined that it was because I was anti-aliasing my points and lines with
        glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
        glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);

Unfortunately, I don't know exactly why they weren't displaying, but you might be having a similar problem. ;D

EDIT: I vaugley recall reading something somewhere that the smoothed lines and points aren't (or can't be) hardware accelerated. This might be the cause of the problem somehow.
Title: Re: Weird issues on Macbooks?
Post by: elias4444 on February 05, 2007, 16:23:18
I'll try switching those off... thanks!
Title: Re: Weird issues on Macbooks?
Post by: darkmoon on February 09, 2007, 15:03:23
Just today I noticed a problem which might be related. It's actually the opposite, I have lines appearing where they shouldn't be!

When I build my game on my iMac, and run it on the Powerbook G4, I see a thin diagonal line over each quad i draw, with or without texture! I don't see these on my iMac, nor do I see the problem when I build it on the Powerbook! :o

I didn't have this problem before. And yes, the files used for building are a straight copy, so no differences there... How bizarre...
Title: Re: Weird issues on Macbooks?
Post by: elias4444 on February 09, 2007, 16:33:08
I can't be certain... but I've seen that diagonal line issue before... it also has something to do with enabling polygon smoothing in openGL. In my current game, I went ahead and turned off all the openGL smoothing options, and am just setting anti-aliasing in the pixelformat when available.
Title: Re: Weird issues on Macbooks?
Post by: darkmoon on February 09, 2007, 17:56:18
Indeed, disabling polygon smoothing fixed it! Thanks man!!! :)

What do you mean with "setting anti-aliasing in the pixelformat"?
Title: Re: Weird issues on Macbooks?
Post by: Fool Running on February 09, 2007, 18:11:43
QuoteWhat do you mean with "setting anti-aliasing in the pixelformat"?
Its the samples parameter in the PixelFormat constructor.
QuoteIn my current game, I went ahead and turned off all the openGL smoothing options, and am just setting anti-aliasing in the pixelformat when available.
Does that mean it worked to turn that off? Did you find any logical reason why it works on some graphics cards and not others?
Title: Re: Weird issues on Macbooks?
Post by: elias4444 on February 10, 2007, 19:04:40
I haven't been able to test it yet, but it sure makes sense. On the machines that had the problem, only the things I used openGL smoothing for would not draw. I'll be uploading a new beta of my game to the server this week, so I'll try to stop by the Mac store here and try it again.  :)

Logical? No... just that it seems to happen on cheaper hardware (so far, all instances have been on integrated Intel graphic chips). My guess is that it's a driver issue. I wish I could just dismiss it, and tell the users to use better hardware, but now that Intel graphic chips are in a lot of Macs, as well as PCs, that gets complicated.