Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /branches/vis12/test/vr-lite-cam/main.c
ViewVC logotype

View of /branches/vis12/test/vr-lite-cam/main.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1734 - (download) (as text) (annotate)
Tue Mar 13 14:32:29 2012 UTC (7 years, 7 months ago) by jhr
File size: 690 byte(s)
  Bug fix for output
/*! \file main.c
 *
 * \author John Reppy
 */

/*
 * COPYRIGHT (c) 2012 The Diderot Project (http://diderot-language.cs.uchicago.edu)
 * All rights reserved.
 */

#include "vr-lite-cam.h"

int main (int argc, const char **argv)
{
    VR_World_t *wrld = VR_Init ();

    VR_SetVerbose (wrld, true);

    VR_Initially (wrld);

    uint32_t nSteps = VR_Run (wrld, 0);

  // get results
    Nrrd *nData = nrrdNew();
    if (VR_Get_outRGBA (wrld, nData)) {
      // error
    }

    if (nrrdSave("out.nrrd", nData, NULL)) {
        char *err = biffGetDone(NRRD);
        fprintf(stderr, "Trouble saving nrrd struct: %s\n", err);
        return 1;
    }

    VR_Shutdown (wrld);

    return 0;
}

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0