Re: OpenGL Shading Issues on PPC
Re: OpenGL Shading Issues on PPC
- Subject: Re: OpenGL Shading Issues on PPC
- From: Peter Willsey <email@hidden>
- Date: Tue, 20 Apr 2010 13:04:29 -0700
Hi Thanks for your reply. .obj is an ASCII file format, I don't think byte order would be an issue here.
On 2010-04-20, at 11:55 AM, A.M. wrote:
>
> On Apr 19, 2010, at 12:33 PM, Peter Willsey wrote:
>
>> Hello All,
>>
>> I've been developing a screensaver in Objective-C using OpenGL to render an object in wavefront .obj format. The object is displayed and rotated on the X, Y and Z axis. I have enabled lighting and I'm calculating surface normals so that shading works properly.
>>
>> I have been developing this plugin on a 2.4Ghz Intel Core 2 Duo Mac Book Pro with a GeForce 8600M GT video card with 256 MB of VRAM. Everything was working great until I compiled a PPC version of my screensaver and tried running it on my Power Mac G5 Tower with a GeForce FX 5200 video card. The Screensaver loads and displays, but there appears to be some issues with shading and lighting. As the model rotates areas of the model flash, and dark colors pass over top in strange patterns. From certain angles areas of the model almost completely disappear.
>>
>> Not sure if this is relevant, but I'm not using any textures in the model. I've also tried importing the .obj file into a 3D program and exporting it back into .obj format with vertex normals included in the file, and using those instead of calculating surface normals myself. I've tried using GL_FLAT and GL_SMOOTH shading models.
>>
>> This does not occur on my Intel machine. Both machines are running Mac OS X 10.5.8. I'm not sure if this is related to the video card, the driver, the fact that the machine is a PPC or if it's just older hardware that I should not try and support ?
>
> This is almost certainly an endianness issue. Make sure that you are reading the correct endianness out of the file and converting it, if necessary.
>
> http://developer.apple.com/mac/library/documentation/Darwin/Conceptual/64bitPorting/MakingCode64-BitClean/MakingCode64-BitClean.html
>
> Cheers,
> M
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden