GLUT ?

Post questions, comments and feedback to our 3Dconnexion Mac Development Team.

Moderator: Moderators

GLUT ?

Postby akeller » Wed Aug 20, 2008 1:04 am

I like to use the GLUT/OpenGL framework with my SpaceMouse.
I followed the PDF instruction of the development kit, everything
compiles fine, but no single call to the MyMessageHandler...

Code: Select all
#ifdef WIN32
INT WINAPI WinMain(HINSTANCE hInst,HINSTANCE hPrevInst, LPSTR lpCmdLine,INT nCmdShow)
{
   glutInit(&nCmdShow, &lpCmdLine);
#else
   int main(int nCmdShow,char ** lpCmdLine)
   {
      glutInit(&nCmdShow, lpCmdLine);
#endif
     
      glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE);
     
      glutInitWindowSize(xres,yres);
      glutCreateWindow("mental images High Performance Ray Tracing");
     
      initialize();
     
      glutDisplayFunc(displayBuffer);
      glutReshapeFunc(reshape);
      glutKeyboardFunc(keyboard);
      glutMouseFunc(mouse);
      glutMotionFunc(motion);
      glutIdleFunc(idle);
     
      TDx::OSErr result = TDx::InstallConnexionHandlers(TDx::MyMessageHandler, 0L, 0L);
     
 /*UInt16*/ clientID = TDx::RegisterConnexionClient((unsigned short int) '3Dm1'/*0/*'MCTt'*/, 0/*name/*(unsigned char *) "\pCarDisplay"*/,
   TDx::kConnexionClientModeTakeOver, kConnexionMaskAll);

      glutMainLoop();
     
 TDx::UnregisterConnexionClient(clientID);
TDx::CleanupConnexionHandlers();
     
      return 0;
   }

What is wrong ?

-Alex
akeller
 
Posts: 3
Joined: Wed Aug 20, 2008 12:43 am

Postby flomotan » Mon Aug 25, 2008 10:23 am

Arg 1 to RegisterConnexionClient is a UInt32. It's being truncated in your call.
flomotan
Moderator
Moderator
 
Posts: 287
Joined: Mon Jan 08, 2007 3:37 pm


Return to Developer's Forum for Mac OS X

Who is online

Users browsing this forum: No registered users and 0 guests