## ATI Truform code

Anyone know where to find an ATI Truform example for mac? Please help me!

It looks like the extension is supported under MacOSX 10.1, though I don't actually have a Radeon 8500 to verify:

(from /System/Library/Frameworks/OpenGL.framework/Headers/glext.h)

Code:

`#define GL_ATIX_pn_triangles 1`

I've included OpenGL Framework...

#include <OpenGL/OpenGL.h>

...Declared the tassellation level int...

int gPNTrianglesLevel;

...and write the ATI code in InitGL...

glEnable(GL_PN_TRIANGLES_ATI);

glPNTrianglesiATI( GL_PN_TRIANGLES_POINT_MODE_ATI, GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI);

gPNTrianglesLevel=5;

glPNTrianglesiATI( GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI, gPNTrianglesLevel);

...and Project Builder say:

'GL_PN_TRIANGLES_ATI' undeclared (first use of this function)

'GL_PN_TRIANGLES_POINT_MODE_ATI' undeclared (first use of this function)

'GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI' undeclared (first use of this function)

'GL_PN_TRIANGLES_TESSELLATION_LEVEL_ATI' undeclared (first use of this function)

I don't know how to do... Thanks a lot!

You need to include <OpenGL/glext.h>

I have some ATI libraries for PC. But they don't work. Where I can find the mac versions? Thanks.

If this is different from the PC version and you want the same code to work, you could always declare the functions and constants yourself:

Code:

`#if defined(GL_ATIX_pn_triangles) && GL_ATIX_pn_triangles`

#define GL_ATI_pn_triangles 1

#define GL_PN_TRIANGLES_ATI 0x6090

#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x6091

#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x6092

#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x6093

#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x6094

#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x6095

#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x6096

#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x6097

#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x6098

#define glPNTrianglesiATI(pname, param) glPNTrianglesiATIX(pname, param)

#define glPNTrianglesfATI(pname, param) glPNTrianglesfATIX(pname, param)

#endif