Altivec data types and opengl

Hello, and sorry my english, I have a couple of question about altivec:

Regarding data types like “vector float…” It is possible to use these plain vector with opengl (eg.: casting in glfloat type) or I must copy any result in “standard” float?

again: altivec math is significantly faster than gpu (for example: implementing rotation of a vertex with altivec or is better to leave the gpu handles this one thru ogl standard glrotate) ?

thanks in advance

If you have a vector float*, it’s safe (barring future changes to the size of GLfloat) to cast it to a GLfloat*.

The GPU will almost always be faster than the CPU, and Apple’s GL implementation will use altivec internally anyway, so there’s almost certainly nothing to be gained from implementing stuff yourself.

>The GPU will almost always be faster
>than the CPU

uhmm, judging from the performances of
my humble onboard 9200 I’m not sure … :wink:
ok ok, but I’m forced anyway to use
some math code (eg.: the frustum culling)
and if it’s faster with altivec and the
“float” is safe … I’m happy

thanks again


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