示例#1
0
int main(int argc, const char* argv[]) {
    initGLG3D();

    GApp::Settings settings(argc, argv);

    // Change the window and other startup parameters by modifying the
    // settings class.  For example:
    settings.window.caption			= argv[0];

    // Some popular resolutions:
    // settings.window.width        = 640;  settings.window.height       = 400;
    // settings.window.width		= 1024; settings.window.height       = 768;
    settings.window.width         = 1280; settings.window.height       = 720;
    // settings.window.width        = 1920; settings.window.height       = 1080;
    // settings.window.width		= OSWindow::primaryDisplayWindowSize().x; settings.window.height = OSWindow::primaryDisplayWindowSize().y;

    // Set to true for a significant performance boost if your app can't render at 60fps,
    // or if you *want* to render faster than the display.
    settings.window.asynchronous	    = true;
    settings.depthGuardBandThickness    = Vector2int16(64, 64);
    settings.colorGuardBandThickness    = Vector2int16(16, 16);
    settings.dataDir			        = FileSystem::currentDirectory();
//    settings.screenshotDirectory	    = "../journal/";

    return App(settings).run();
}
示例#2
0
int main(int argc, const char* argv[]) {
    initGLG3D();

    GApp::Settings settings(argc, argv);
    
    settings.window.caption     = argv[0];
    settings.window.width       = 1280; 
    settings.window.height      = 720;

    return App(settings).run();
}
示例#3
0
int main(int argc, const char* argv[]) {
    initGLG3D();

    GApp::Settings settings(argc, argv);
    
    // Has to be small to avoid overloading the network
    settings.window.caption      = argv[0];
    settings.window.width        = 1280; 
    settings.window.height       = 720;
    settings.guardBandThickness  = Vector2int16(0, 0);
    
    return ChatApp(settings).run();
}
示例#4
0
int main(int argc, const char* argv[]) {
    initGLG3D();

    GApp::Settings settings(argc, argv);

    settings.window.caption      = "Remote Rendering Demo";
    settings.window.width        = 640;    settings.window.height       = 400;

#   ifdef G3D_OSX
        debugPrintf("You may need to disable your firewall. See http://support.apple.com/kb/PH11309\n\n");
#   endif

    alwaysAssertM(FileSystem::exists("www"), "Not running from the contents of the data-files directory");
    
    return App(settings).run();
}
示例#5
0
文件: App.cpp 项目: elfprince13/G3D10
int main(int argc, const char* argv[]) {
    {
        G3DSpecification g3dSpec;
        g3dSpec.audio = false;
        initGLG3D(g3dSpec);
    }

    VRApp::Settings settings(argc, argv);
    settings.vr.debugMirrorMode = //VRApp::DebugMirrorMode::NONE;//
        VRApp::DebugMirrorMode::PRE_DISTORTION;

    settings.vr.disablePostEffectsIfTooSlow = false;

    settings.window.caption             = argv[0];

    // The debugging on-screen window, and the size of the 2D HUD virtual layer in VR in pixels.
    // Because DK2 is relatively low resolution, don't make this too large.
    settings.window.width               = 1280; settings.window.height       = 700;

    // Full screen minimizes latency (we think), but when debugging (even in release mode) 
    // it is convenient to not have the screen flicker and change focus when launching the app.
    settings.window.fullScreen          = false;
    settings.window.resizable           = false;
    settings.window.framed              = ! settings.window.fullScreen;

    // Oculus already provides a huge guard band
    settings.hdrFramebuffer.depthGuardBandThickness    = Vector2int16(0, 0);
    settings.hdrFramebuffer.colorGuardBandThickness    = Vector2int16(0, 0);

    // Async must be true for VR
    settings.window.asynchronous        = true;

    settings.renderer.deferredShading   = true;
    settings.renderer.orderIndependentTransparency = true;

    settings.dataDir                    = FileSystem::currentDirectory();
    settings.screenshotDirectory        = "";

    const int result = App(settings).run();
    
    return result;
}
示例#6
0
int main(int argc, const char* argv[]) {
    initGLG3D();

#   ifdef G3D_WINDOWS
      if (! FileSystem::exists("phong.pix", false) && FileSystem::exists("G3D.sln", false)) {
          // The program was started from within Visual Studio and is
          // running with cwd = G3D/VC10/.  Change to
          // the appropriate sample directory.
          chdir("../samples/pixelShader/data-files");
      } else if (FileSystem::exists("data-files")) {
          chdir("data-files");
      }
#   endif

    GApp::Settings settings(argc, argv);  
    settings.colorGuardBandThickness  = Vector2int16(0, 0);
    settings.depthGuardBandThickness  = Vector2int16(0, 0);

    return App(settings).run();
}
示例#7
0
文件: App.cpp 项目: elfprince13/G3D10
int main(int argc, const char* argv[]) {
    {
        G3DSpecification g3dSpec;
        g3dSpec.audio = false;
        initGLG3D(g3dSpec);
    }

    GApp::Settings settings(argc, argv);

    // Change the window and other startup parameters by modifying the
    // settings class.  For example:
    settings.window.caption             = argv[0];
    // settings.window.debugContext     = true;

    // settings.window.width              =  854; settings.window.height       = 480;
    // settings.window.width            = 1024; settings.window.height       = 768;
    settings.window.width            = 1280; settings.window.height       = 720;

//    settings.window.width               = 1920; settings.window.height       = 1080;
    // settings.window.width            = OSWindow::primaryDisplayWindowSize().x; settings.window.height = OSWindow::primaryDisplayWindowSize().y;
    settings.window.fullScreen          = false;
    settings.window.resizable           = ! settings.window.fullScreen;
    settings.window.framed              = ! settings.window.fullScreen;

#	ifdef G3D_DEBUG
		settings.window.debugContext = true;
#	endif

    // Set to true for a significant performance boost if your app can't render at 60fps,
    // or if you *want* to render faster than the display.
    settings.window.asynchronous        = false;

    settings.hdrFramebuffer.depthGuardBandThickness    = Vector2int16(0, 0);
    settings.hdrFramebuffer.colorGuardBandThickness    = Vector2int16(0, 0);
    settings.dataDir                    = FileSystem::currentDirectory();
    settings.screenshotDirectory        = "";

	//settings.window.defaultIconFilename		= "icon.png";

    return App(settings).run();
}
示例#8
0
void testFullRender(bool generateGoldStandard) {
    initGLG3D();

    GApp::Settings settings;

    settings.window.caption			= "Test Renders";
    settings.window.width        = 1280; settings.window.height       = 720;
    settings.film.preferredColorFormats.clear();
    settings.film.preferredColorFormats.append(ImageFormat::RGB32F());

	// Enable vsync.  Disable for a significant performance boost if your app can't render at 60fps,
	// or if you *want* to render faster than the display.
	settings.window.asynchronous	= false;
    settings.depthGuardBandThickness    = Vector2int16(64, 64);
    settings.colorGuardBandThickness    = Vector2int16(16, 16);
    settings.dataDir				= FileSystem::currentDirectory();
    if(generateGoldStandard) { // Warning! Do not change these directories without changing the App... it relies on these directories to tell what mode we are in
        settings.screenshotDirectory	= "../data-files/RenderTest/GoldStandard";
    } else {
        settings.screenshotDirectory	= "../data-files/RenderTest/Results";
    }  
    int result = App(settings).run();
    testAssertM(result == 0 ,"App failed to run");
}