[ODE] Problem's when profiling graphics engine

Kyle Hubert khubert at gmail.com
Mon Dec 11 17:34:26 MST 2006


I'm profiling my application and got interesting results. This is my
worst funtion and eating 40% of my time:

/* Convert ODE's rotation matrix and pos into a GL matrix */
void convert_ode_to_gl(float *m, const float *p, const float *r) {
  m[0] = r[0]; m[4] = r[1]; m[8]  = r[2];  m[12] = p[0];
  m[1] = r[4]; m[5] = r[5]; m[9]  = r[6];  m[13] = p[1];
  m[2] = r[8]; m[6] = r[9]; m[10] = r[10]; m[14] = p[2];
  m[3] = 0;    m[7] = 0;    m[11] = 0;     m[15] = 1;
}

Is there something I can do better? (Forgive the white space problems,
it only looks aligned on a fixed width font)

I would appreciate any pointers, thank you.

-Kyle


More information about the ODE mailing list