Switching to mac

Hi, im a pc user and im planning to switch to a mac. will there be any difference on how opengl performs?? how hard is it to port some code from windows to mac?.

Performance on the Mac is generally a little less than on the PC. If you don’t use immediate mode, it’s not usually enough of a difference to be problematic, though.

Porting the PC OpenGL code should be relatively easy, depending on which OpenGL extensions it uses. Apple is typically behind the PC card vendors on extension support. For example, there is still no GLSL support on the Mac.

im using some very basic opengl code, most of it taken from nehe’s tutorials, also the bass library and a jpeg library i found at morrowland. another question, will codewarrior work with opengl?? and what do you think of the mac mini could it be a good choice?

You should use XCode instead of Codewarrior (XCode is free of charge).

The Mac mini is using an ATI 9200 as video card.

So you don’t have fragment shading (ARB_fragment_program).

You can uses the ATI extensions, but it’s very hard to program and poorly documented (in fact, only Doom 3 used it).

This link:
http://www.csee.umbc.edu/~olano/s2001c24/ch13.pdf

Is a document of how to use the ATI_fragment_shader.

The ATI 9200 has a ‘pixel shader 1.4’ features.

Writing PS1.4 with DirectX is nice (you can write good effect like bump+specular in one pass), but there is no equivalent in OpenGL.

See this link : Convert DirectX PS1.4 shaders to GL_ATI_fragment_shader ? Looks interesting …

http://nifelheim.dyndns.org/~cocidius/ps14toATIfs/

thanks!

the Mac uses ATI_text_fragment_shader, which is /substantially/ easier to program than ATI_fragment_shader, and I know of at least one mac game that takes advantage of it :slight_smile:

the 9200 in the Mini is not a bad card, but if you can afford to spring for a Mac with a GeForce 5200 or Radeon 9600 or better, you’ll get ARB_fragment_program, which gives you a bit of extra future-proofing.

Yes, but ATI_text_fragment_shader is undocumented, and only works on Mac (there is no Windows counterpart).

The PS14toATIfs is better for this, because DX Pixel Shader 1.4 are well documented and there is a ton of examples using this.

Also PS14toATIfs works on Windows and Linux as well.

I’ve just tried a couple of shaders with it, and it works pretty nicely and very simple to use.

ATI_text_fragment_shader spec: http://oss.sgi.com/projects/ogl-sample/registry/ATI/text_fragment_shader.txt

and ATI_fragment_shader doesn’t exist on the Mac at all.

Mac GL extensions guide: http://developer.apple.com/graphicsimaging/opengl/extensions.html

Oh well

I’ve seen that page. But did you tried a Google to
GL_ATI_fragment_shader ? barely 1 page of result. Do the same on GL_ATI_fragment_shader, then you’ve got much more pages, and actual demos to download.

A bit a shame that ATI_fragment_shader is not supported on MacOS X.

Doom 3 is using it for the ATI R200 video cards, and I’ve just ported all my shaders with it (using PS14toPS).

Since I don’t have ATI_text_fragment_shader on my PC, I cannot adapt my pixel shader code to this platform (so it ARB_fragment or nothing ).

They could do something to not have those extensions mutually exclusive across platforms … (and ATI ones ! not even an APPLE extension).

One huge disadvantage on the mac are developer tools. If you goto nvidia and ati all the tools ( nearly all ) are exclusively for windows. eg. Render Monkey. Here is a big problem I have right now: would like to do bump mapping. But you need to create a normal map. No tool to do that on a mac that I’ve found.

ATI and NVidia both have command-line tools in their SDKs to create normal maps from heightmaps, but they’re a bit of a pain to get working on the Mac. It would be a handy quick app for some Cocoa developer out there to create (or perhaps a CoreImage filter)

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.