• Class members not working right over dll?
    1 replies, posted
I should be seeing: [img]http://localhostr.com/files/06e57b/Velocity%20Engine.png[/img] But I'm seeing: [img]http://localhostr.com/files/ff406a/VelocityEngine.png[/img] The value of my Vectors are nowhere near what the should be; -80000000 =/= 0. I believe it has to do with the fact that my m_Camera class is inside a DLL, I can't be sure. [cpp] // Set the Camera position m_Engine.m_Camera.m_Eye.x = 0.0; m_Engine.m_Camera.m_Eye.y = 1.0; m_Engine.m_Camera.m_Eye.z = 6.0; m_Engine.m_Camera.m_Target.x = 0.0; m_Engine.m_Camera.m_Target.y = 0.0; m_Engine.m_Camera.m_Target.z = 0.0; m_Engine.m_Camera.m_Up.x = 0.0; m_Engine.m_Camera.m_Up.y = 1.0; m_Engine.m_Camera.m_Up.z = 0.0; [/cpp] [cpp] void Velocity::ECamera::Apply() { // Select The Modelview Matrix glMatrixMode(GL_MODELVIEW); // Reset The Modelview Matrix glLoadIdentity(); // Apply gluLookAt(m_Eye.x, m_Eye.y, m_Eye.z, m_Target.x, m_Target.y, m_Target.z, m_Up.x, m_Up.y, m_Up.z); } [/cpp]
[img]http://localhostr.com/files/ec9b5f/Velocity%20Engine.png[/img] After two long days I got it working! For any who uses GLUT, it sends a window resize when the window is first created. I didn't implement a method to copy over the Camera details so it reset to 0.
Sorry, you need to Log In to post a reply to this thread.