PDA

View Full Version : altivec data types and opengl



06-23-2004, 12:35 AM
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
Gio

OneSadCookie
06-23-2004, 12:06 PM
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.

06-24-2004, 01:58 AM
>The GPU will almost always be faster
>than the CPU

uhmm, judging from the performances of
my humble onboard 9200 I'm not sure .. ;)
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

Gio