Exemple #1
0
    public static void renderLoop()
    {
        sCamera = new Snippets.Camera(new(50.0f, 50.0f, 50.0f), new(-0.6f, -0.2f, -0.7f));

        SnippetRender.setupDefaultWindow("PhysX Snippet Serialization");
        SnippetRender.setupDefaultRenderState();

        //glutIdleFunc(idleCallback);
        glutDisplayFunc(&renderCallback);
        glutKeyboardFunc(&keyboardCallback);
        glutMouseFunc(&mouseCallback);
        glutMotionFunc(&motionCallback);
        motionCallback(0, 0);

        glutMainLoop();
        exitCallback();
    }
Exemple #2
0
    public static void renderLoop()
    {
        sCamera = new Snippets.Camera(new(10.0f * gLengthScale, 10.0f * gLengthScale, 10.0f * gLengthScale), new(-0.6f, -0.2f, -0.7f));

        SnippetRender.setupDefaultWindow("PhysX Snippet VehicleScale");
        SnippetRender.setupDefaultRenderState();

        //glutIdleFunc(idleCallback);
        glutDisplayFunc(&renderCallback);
        glutKeyboardFunc(&keyboardCallback);
        glutMouseFunc(&mouseCallback);
        glutMotionFunc(&motionCallback);
        motionCallback(0, 0);

        initPhysics();
        glutMainLoop();
        exitCallback();
    }
Exemple #3
0
    public static void renderLoop()
    {
        Debug.Assert(sCamera is null);
        sCamera = new Snippets.Camera(new(8.757190f, 12.367847f, 23.541956f), new(-0.407947f, -0.042438f, -0.912019f));

        SnippetRender.setupDefaultWindow("PhysX Snippet Triggers");
        SnippetRender.setupDefaultRenderState();

        //glutIdleFunc(&idleCallback);
        glutDisplayFunc(&renderCallback);
        glutKeyboardFunc(&keyboardCallback);
        glutSpecialFunc(&keyboardCallback2);
        glutMouseFunc(&mouseCallback);
        glutMotionFunc(&motionCallback);
        motionCallback(0, 0);

        initPhysics(true);
        glutMainLoop();
        exitCallback();
    }