View Full Version : ATI Truform code
ObjectCreator
2002.07.24, 05:17 AM
Anyone know where to find an ATI Truform example for mac?:( Please help me!
OneSadCookie
2002.07.24, 06:13 AM
The code should work precisely the same on the Mac as on the PC. Is there some reason you can't find a PC example and use that?
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)
#define GL_ATIX_pn_triangles 1
ObjectCreator
2002.07.24, 06:30 AM
It doesn't work...
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!
OneSadCookie
2002.07.24, 06:45 AM
You need to include <OpenGL/glext.h>
ObjectCreator
2002.07.24, 06:48 AM
I have tried it... it doesn't work. The same error.
Mars_999
2002.07.24, 06:50 AM
Yeah you don't have the ext library included, how is it supposed to know how to use those ()'s unless you code them yourself? =)
ObjectCreator
2002.07.24, 06:54 AM
I have some ATI libraries for PC. But they don't work. Where I can find the mac versions? Thanks.
Mars_999
2002.07.24, 06:59 AM
You will have to search around ATI's web site, I think they have a page just for developers of ATI cards? Can't remember the address but thought I seen something on it before? HTH
ObjectCreator
2002.07.24, 07:05 AM
There are some mac examples but maybe the link is wrong because it download the PC version... The link is http://www.ati.com/developer/macos.html.
ObjectCreator
2002.07.24, 07:06 AM
http://www.ati.com/developer/macos.html
OneSadCookie
2002.07.24, 08:07 AM
The Mac glext.h declares the extension as GL_ATIX_pn_triangles, so all the symbols end with ATIX rather than ATI. Changing the code you posted earlier by replacing ATI with ATIX everywhere allowed it to compile.
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:
#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
ObjectCreator
2002.07.24, 09:31 AM
Oh great!!! That's work! Thanks a lot. I've writed your name in the credits.
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.